I believe one way is to generate a frequency similar to female wingbeat frequency that attracts male mosquitoes and separate them that way. I am unsure if there is a difference in the frequency between genders.
This is how the photo fence from intellectual ventures detects and destroys female mosquitoes.Unfortunately they never released that tech as open source