This disclosure provides a target detection method, apparatus, electronic device, and storage medium. The method includes: acquiring each predicted bounding box corresponding to the data to be detected and the classification confidence of each predicted bounding box; determining multiple original grids in the data to be detected; determining the heat information of the original grids based on the predicted bounding boxes whose center points are located within the original grids; determining at least one target output grid; and for each target output grid, outputting the predicted bounding box with the highest classification confidence among the predicted bounding boxes whose center points are located within the target output grid, thereby obtaining the target detection result of the data to be detected. This method does not require calculating the intersection-union ratio (IU), solving the problem of long IU calculation time in the prior art using NMS, greatly improving the efficiency of target detection. Furthermore, this method filters the original grids through heat information, achieving effective suppression of negative samples and solving the problem of low recall in the prior art.