-
Notifications
You must be signed in to change notification settings - Fork 80
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
Model prediction is at 15 FPS, anyway to increase throughput? #20
Comments
pangshengwei
changed the title
Model prediction is slow, anyway to speed it up?
Model prediction is at 20 FPS, anyway to speed it up?
May 1, 2021
pangshengwei
changed the title
Model prediction is at 20 FPS, anyway to speed it up?
Model prediction is at 15 FPS, anyway to speed it up?
May 1, 2021
pangshengwei
changed the title
Model prediction is at 15 FPS, anyway to speed it up?
Model prediction is at 15 FPS, anyway to increase throughput?
May 1, 2021
Yes, we could batch images through the model. Are you using cpu only or also GPU acceleration? |
how can we change FPS for Model prediction? |
Consider setting the |
thanks for answering but after changing save_fps parameter, i have to retrain the model ? and if i give save_fps=3 or 4 then will model get decrease its accuracy? |
`save_fps` just changes how many frames are skipped when running inference
on the video. It doesn't change the model, only how it is applied to the
video.
…On Thu, Jun 17, 2021 at 11:59 AM Neelkanth ***@***.***> wrote:
thanks for answering but after changing save_fps parameter, i have to
retrain the model ? and if i give save_fps=3 or 4 then will model get
decrease its accuracy?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOLMZGQ6GMEXWXKLL4Z2BDTTHBONANCNFSM4355BPHQ>
.
|
Thank you so much. I just found where to put that and it's working fine.
and another doubt in my mind about whether we can have any solution to make
this entire process fast? I have a GPU too but still it takes too much time
for complete execution for just 1 minute video file.
On Thu, Jun 17, 2021 at 4:29 PM Neelkanth Bhavnagarwala <
***@***.***> wrote:
… means if i am using this below code then where do i make changes for
save_fps can you tell me please ?
def foremotion():
# fn contains the video file name (Ensure that you only upload one file)
videofile = "D://RR/integration/in.mp4"
# Face detection
detector = FER(mtcnn=True)
# Video predictions
video = Video(videofile)
# Output list of dictionaries
raw_data = video.analyze(detector, display=False)
# Convert to pandas for analysis
df = video.to_pandas(raw_data)
df = video.get_first_face(df)
df = video.get_emotions(df)
# Plot emotions
fig = df.plot(figsize=(20, 10), fontsize=14).get_figure()
# Filename for plot
fig.savefig('static/my_figure.png')
return render_template('try.html',img="static/my_figure.png")
On Thu, Jun 17, 2021 at 3:57 PM Justin Shenk ***@***.***>
wrote:
> `save_fps` just changes how many frames are skipped when running inference
> on the video. It doesn't change the model, only how it is applied to the
> video.
>
> On Thu, Jun 17, 2021 at 11:59 AM Neelkanth ***@***.***> wrote:
>
> > thanks for answering but after changing save_fps parameter, i have to
> > retrain the model ? and if i give save_fps=3 or 4 then will model get
> > decrease its accuracy?
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <#20 (comment)>,
> or
> > unsubscribe
> > <
> https://github.com/notifications/unsubscribe-auth/ACOLMZGQ6GMEXWXKLL4Z2BDTTHBONANCNFSM4355BPHQ
> >
> > .
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#20 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APU3EWCJ6K7JBELVNRU4DYDTTHEX5ANCNFSM4355BPHQ>
> .
>
|
It could be extended for this, maybe someone else will be kind enough to
contribute this feature.
…On Thu 17. Jun 2021 at 13:19 Neelkanth ***@***.***> wrote:
Thank you so much. I just found where to put that and it's working fine.
and another doubt in my mind about whether we can have any solution to make
this entire process fast? I have a GPU too but still it takes too much time
for complete execution for just 1 minute video file.
On Thu, Jun 17, 2021 at 4:29 PM Neelkanth Bhavnagarwala <
***@***.***> wrote:
> means if i am using this below code then where do i make changes for
> save_fps can you tell me please ?
>
> def foremotion():
> # fn contains the video file name (Ensure that you only upload one file)
> videofile = "D://RR/integration/in.mp4"
> # Face detection
> detector = FER(mtcnn=True)
> # Video predictions
> video = Video(videofile)
>
> # Output list of dictionaries
> raw_data = video.analyze(detector, display=False)
>
> # Convert to pandas for analysis
> df = video.to_pandas(raw_data)
> df = video.get_first_face(df)
> df = video.get_emotions(df)
>
> # Plot emotions
> fig = df.plot(figsize=(20, 10), fontsize=14).get_figure()
> # Filename for plot
> fig.savefig('static/my_figure.png')
>
> return render_template('try.html',img="static/my_figure.png")
>
>
> On Thu, Jun 17, 2021 at 3:57 PM Justin Shenk ***@***.***>
> wrote:
>
>> `save_fps` just changes how many frames are skipped when running
inference
>> on the video. It doesn't change the model, only how it is applied to the
>> video.
>>
>> On Thu, Jun 17, 2021 at 11:59 AM Neelkanth ***@***.***> wrote:
>>
>> > thanks for answering but after changing save_fps parameter, i have to
>> > retrain the model ? and if i give save_fps=3 or 4 then will model get
>> > decrease its accuracy?
>> >
>> > —
>> > You are receiving this because you commented.
>> > Reply to this email directly, view it on GitHub
>> > <#20 (comment)
>,
>> or
>> > unsubscribe
>> > <
>>
https://github.com/notifications/unsubscribe-auth/ACOLMZGQ6GMEXWXKLL4Z2BDTTHBONANCNFSM4355BPHQ
>> >
>> > .
>> >
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#20 (comment)>,
>> or unsubscribe
>> <
https://github.com/notifications/unsubscribe-auth/APU3EWCJ6K7JBELVNRU4DYDTTHEX5ANCNFSM4355BPHQ
>
>> .
>>
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOLMZDAKOEATIGQSX4RDV3TTHK5DANCNFSM4355BPHQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: