Automatic gender identification under adverse conditions