A tensorflow based Faster RCNN inception v2 python model to detect and count humans in real time images, videos & camera.
Used pre-trained frozen_inference_graph.pb frozen graph to handle the detection.
Visualize the data using Enumeration Plot and Avg. Accuracy Plot.
📌REQUIREMENTS :
python 3
tkinter
messagebox
PIL
cv2
argparse
matplotlib.pyplot
numpy
time
os
tensorflow
fpdf
📌How this Script works :
User just need to download the file and run the main.py on their local system.
On the starting window of the application, user will be able to see START and EXIT option, using which user can start the application or exit from the application.
When user starts the application using START button, a new window will open, which allows user with options like, DETECT FROM IMAGE, DETECT FROM VIDEO or DETECT FROM CAMERA.
When user selects any of the first two option, he/she needs to select the respective files using SELECT button.
User can preview the selected file using PREVIEW button, and detect and count the humans using DETECT button.
And when user selects, the last option of detecting through camera, user need to open the Camera, using OPEN CAMERA button, As soon as camera opens, detection process will start.
After detection process gets completed or user manually completes it, two graph get plotted,
1.) Enumeration Plot(Human Count Vs. time) and
2.) Avg. Accuracy Plot(Avg. Accuracy Vs. time).
Along with this two plots, an option to generate crowd report also appears, On clicking on it, a crowd report in form of PDF is generated ans saved autmatically at the project file location.
In the crowd report genrated, there will be information like, What is Max Human Count, Max Accuracy, Max Avg. Accuracy, and also a two line status about crowd.
📌Purrpose :
This scripts helps user to easily get the count of human through real time image, video or camera, and thereafter also analysis of crowd through crowd report.
📌Compilation Steps :
Install all the required libraries.
After that download the code file, and run main.py on local system.
Then the script will start running and user can explore it by detecting the human and also getting the count of it.
Hello:
My recent work is to detect moving objects in video and do a closed-loop processing, so I'd like to ask how much processing latency there will be for real-time processing of video streams, or what kind of computer configuration is needed to make the latency as small as possible? Looking forward to your answer.Thank you!
Tensorflow 2.10 is enough for this project.
Pip install tensorflow in cmd is enough for install tensorflow.In some website they tell to install miniconda. how can I install tensorflow please provide a proper guide.
Can I get your help as I'm getting error after detecting people when I click the 'Enumeration plot' and 'Avg. accuracy plot'. Here's the error show:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\tkinter_init_.py", line 1892, in call
return self.func(*args)
File "E:\FYP\Real-Time-Human-Detection-Counting-main\main.py", line 158, in img_enumeration_plot
plt.get_current_fig_manager().canvas.set_window_title("Plot for Image")
AttributeError: 'FigureCanvasTkAgg' object has no attribute 'set_window_title'
Hi Bro,
I'm also doing my final year project on this same thing can you just please explain in short about the working of this project please
1.Are you using the tesorflow model to detect human in images too I red the report I got confused weather you are using Haar Cascade Classifier or HOG(Histogram of Oriented Gradients) or Tensorflow for all the three options(detecting from image,video,camera) ?
2.If you are using tensorflow for all three options what is the use of haarcadefullbody.xml file can just please explain ?
Hi, may I know which model did you use in the frozen_inference_graph.pb for human detection? Is it a YOLO or any other object detection model? Thank you very much!