1. A computer-implemented method for partially occluded object detection, comprising: obtaining a response map for a detection window of an input image, wherein the response map is based on a trained model and the response map includes a root layer and a parts layer; determining visibility flags for each root cell of the root layer and each part of the parts layer based on the response map, wherein the visibility flag is one of visible or occluded; determining an occlusion penalty for each root cell with a visibility flag of occluded and for each part with a visibility flag of occluded, wherein the occlusion penalty is based on a location of the root cell or the part with respect to the detection window, and the occlusion penalty is lower for root cells and parts located in a lower part of the detection window than root cells and parts located in a higher part of the detection window; determining a detection score for the detection window based on the visibility flags and the occlusion penalties; and generating an estimated visibility map for object detection based on the detection score.