Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to run this model as a Real-Time Detection? #5

Open
Mert-Cihangiroglu opened this issue Jul 6, 2021 · 11 comments
Open

Comments

@Mert-Cihangiroglu
Copy link

Mert-Cihangiroglu commented Jul 6, 2021

My high view of question : I want to run this model on a network consist of 8 cameras is it possible?

-In the demo.py file (line 93 ) I see that for loop gets videos one after the other so model now only works on videos which are ready, I want to connect this model into RTSP stream, do you have any suggestion?

@duggydoo
Copy link

Any progress with this?

@samihormi
Copy link
Owner

samihormi commented Jul 24, 2021

Hi there, sorry for the late answer.

For real-time detection, I think there is several points you have to address:

First of all, this repo is by no means a solution for such a task. It's more of a pseudo "tracker" as the videos are looped through one by one. For Real-Time Detection you would have to run inference on each frame.
Which brings me to my second point, you could make some non-trivial changes to the code and have a "real-time" model. The issue lies in how useful it will be for you(ie. your FPS is largely determined by your computational capabilities).

I haven't looked into the code in quite some time, but I will try to adjust the code for "real-time" conditions on my side, and I will come back to you with the observations I find.

@Arun1053
Copy link

Hi @samihormi any update from your side ?

@drushtig
Copy link

Hi @samihormi !
Is there any update regarding the realtime detection ?

@zuusz
Copy link

zuusz commented Sep 25, 2023

Hi~ @samihormi
Has the latest version been updated?

@manojramanathan
Copy link

Hi @samihormi ,
I tried to use the model for real time detection by running inference and feature extraction on every frame, but the inference speed of the model even on GPU is 1.3s for each frame, which is very slow. Is there a better way to run the real time detection.

@manojramanathan
Copy link

Hi everyone,
I had passed the image directly to the _features function instead of sending as an array of images. I changed this and the inference speed is also faster. I can run my code in real time.

@fritz-31
Copy link

Hi @manojramanathan
Could you please elaborate more on how you have passed images to _features function in order to run the model in real-time with increased inference speed.
Is the accuracy of the model good ? How to increase the accuracy of the model?

@manojramanathan
Copy link

Hi @fritz-31 ,
the _features expects an array of images rather than the image itself.
So, you just need to create an array of images you wish to pass, that is instead of w x h x 3, pass a structure N x w x h x 3. N is the number of images.
For running in real time, the initial target person's ID is fixed by YOLO + deep sort combination here. You could use the ID of this person as input and pass it on to the reid model used here, so that you can reliably follow the intended target.
You could use the initial 50-100 frames to learn the target person's reid features and then compare it with each detected person's reid features for the later frames.
The accuracy of the model depends mainly on the threshold you fix based on the compute_distance metric. This threshold is very much dependent on a lot of factors like lighting etc. So, i wouldn't say the accuracy is really good.

@fritz-31
Copy link

Thanks @manojramanathan for the explanation.
Could you please suggest any other model or github repo which has a good accuracy and can be made into a real-time product, like person re-identification using human gait is one of the other approaches.
I want a build a real-time system having good accuracy.

@Varun18122002
Copy link

I just want to know how to do for long sized video and how can i make it real time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants