Besides the more analytical cues mentioned above, there's a certain degree of I know one when I see one with some species, especially if you've had them before. That said, certain features, as mentioned above, point you in one direction or another.
Don't know its size, guessing 3" by comparing it with the other fish, in any case the one in the photo looks most likely female to me. And if you put a gun to my head, after a second look I'm thinking not red head Tapajos, at least not pure, based on the middle bar running through the side blotch as opposed to the double bar running on either side of the blotch common in red heads.