When found the data loss because of factory reset, you can use Android Data Recovery from RenewAndroid. Just a few simple steps:

1. Download and install tool to computer
2. Connect Android phone to computer via USB cable
3. Choose the lost files type to scan
4. Preview and recover data from scan result

Or you can read this guide:

How to Recover Deleted Photos on Samsung Galaxy S5?