Welcome to Android Central! It did a full factory reset, meaning that you had to go through the whole setup wizard again, log on to your Google account, etc.? If that's the case, then you probably did lose any pictures saved in Internal Storage. If they were on an external SD card, then they're probably still there. Do you recall what the phone was doing when it reset? Or did you turn it on after not using it for a little while, only to find that it had reset? It's pretty rare, but I've seen one or two posts like this--can't remember if they were S5's. Probably some massive software glitch. Sorry to hear about it! You may want to notify Samsung.