Charged particle tracks registered in high energy and nuclear physics (HENP) experiments are to be reconstructed on the very important stage of physical analysis named the tracking. It consists in joining into clusters a great number of so-called hits produced on sequential co-ordinate planes of tracking detectors. Each of these clusters joins all hits belonging to the same track, one of many others, discarding noise and fake hits. The tracking procedure is especially difficult for modern HENP experiments with heavy ions where detectors register events with very high multiplicity. Furthermore, this problem is seriously hampered due to the famous shortcoming of quite popular multiwired, strip and GEM detectors where the appearance of fake hits is caused by extra spurious crossings of wires or strips, while the number of those fakes is greater for some order of magnitude than for true hits. Here we propose two steps technique based on hit preprocessing by a k-d tree search followed by applying a deep learning neural network. Preliminary results of our approach for simulated events of the BM@N GEM detector are presented.