We present a new approach to identification of boosted neutral particles using electromagnetic calorimeters of the LHCb detector. The identification of photons and neutral pions is currently based on expected properties of the objects reconstructed in the calorimeter. This allows to distinguish single photons in the electromagnetic calorimeter from overlapping photons produced from high momentum pi0 decays. The proposed approach is based on applying machine learning techniques to primary calorimeter information, that are energies collected in individual cells around the energy cluster. The machine learning model employs extreme gradient boosting trees approach which is widely used nowadays, and separates pi0 and photon responses from “first principles”. This approach allowed to significantly improve separation performance score on simulated data, reducing primary photons fake rate by factor of four. In this presentation we will present the approach, evaluate its performance obtained on real data, and discuss specific issues when transferring discriminative models from simulation to real world.