On 12 weeks scans you can sometimes see a genital nub. It will be at the base of the spine. So it depends on scan angle as legs often in the way! If the genital nub is parallel to the spine then the foetus is female. If the genital nub points slightly upwards at around a 30-45 degree angle the foetus is male. This is an accurate way that sonographers determine gender - my mum is a retired ob-gyn and she says it is a real theory!