This code can be used as a person counter from images.
The original Code was from :
https://pysource.com/2019/06/27/yolo-object-detection-using-opencv-with-python/
Changes were made so that images would be read from the images folder. Hence add images to be detected in that folder.
Download yolov3.weights from darknet or anywhere else: https://pjreddie.com/media/files/yolov3.weights
This code doesnt even need darknet to be installed.
Outputs the number of persons detected.