We study the first-order flocking transition of birds flying in low-visibility conditions by employing three different representative types of neural network (NN) based machine learning architectures that are trained via either an unsupervised learning approach called learning by confusion or a widely used supervised learning approach. We find that after the training via either the unsupervised learning approach or the supervised learning one, all of these three different representative types of NNs, namely, the fully-connected NN, the convolutional NN, and the residual NN, are able to successfully identify the first-order flocking transition point of this nonequilibrium many-body system. This indicates that NN based machine learning can be employed as a promising generic tool to investigate rich physics in scenarios associated to first-order phase transitions and nonequilibrium many-body systems.