Skip to content

Add Complete Support for Live Inferencing#139

Open
Pranjal2041 wants to merge 1 commit intomkocabas:masterfrom
Pranjal2041:master
Open

Add Complete Support for Live Inferencing#139
Pranjal2041 wants to merge 1 commit intomkocabas:masterfrom
Pranjal2041:master

Conversation

@Pranjal2041
Copy link
Copy Markdown

Enable live Inferencing from webcam. For fast performance program stores result of mpt and hmr of last few frames and combines them with that of latest frame and feeds them to encoder and regressor. Achieves speed of approximately 12fps(for sequence_length=16) on my gtx1060. Only caveat is rendering results can't be displayed in real time and only single person can be tracked at a time.
Arguments:-

  1. live_display :- Show bbox around person in realtime.(Slows inferencing by a small amount)
  2. max_frames :- Max number of recorded frames after which recording will automatically stop(Can be stopped in middle by pressing 'q')
  3. sequence_length :- Number of frames to be fed to encoder.
    [FEATURE] How can i modified the demo.py to inferece the camera? #115 Online Inference #40

@mkocabas
Copy link
Copy Markdown
Owner

mkocabas commented Oct 16, 2020

Hi @Pranjal2041,

This looks awesome. I plan to test it over the weekend, if everything works fine I will merge it. Thanks for your time and effort!

Comment thread live_inference.py


# ========= Save recent images from webcam for person tracking========= #
def saveToDir(images):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def saveToDir(images):
def save_to_dir(images):

Comment thread live_inference.py
orig_dim = (orig_height,orig_width)


saveToDir(images)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
saveToDir(images)
save_to_dir(images)

@magrenimish
Copy link
Copy Markdown

magrenimish commented Jun 3, 2021

Hi @mkocabas
were you able to test these changes for webcam demo?
If yes, what speed did you approximately achieve?
Thanks

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

Successfully merging this pull request may close these issues.

3 participants