Once the fry get to a particular size you can tell, but before then it's tough.
Eric West has posted some good fry pics of both species on this website. Perhaps he can direct us to the post or post them again?
In my case there are only bluegills in one pond and yellow perch in another. So no problem knowing what they are. One year I did get some fatheads in one of the ponds, but I'm careful not to do that again.
Believe it or not I pumped water with a sump pump from one pond to the other and some fathead fry apparently survived the pumping.