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

Action Recognition via IP Camera Stream #666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

muminkoykiran
Copy link

@muminkoykiran muminkoykiran commented Feb 28, 2022

  • By using basic auth credential info, the stream is received frame by frame over the specified IP and port.
  • Stream on Pillow, OpenCV etc. With 3rd libraries, the visual process goes through certain stages.
  • Frames received from the stream are passed through the action recognition algorithm with predict_frames().
  • Output of action recognition and frames read from ip camera are displayed in a widget on the screen.

Description

In the computervision-recipes/scenarios/action_recognition/00_webcam.ipynb study, the feature of performing the action recognition process for the instant stream provided over the information of an ip camera, similar to the action recognition process on the frame provided by the webcam.

Related Issues

Resolved #665

Checklist:

  • I have followed the contribution guidelines and code style for this project.
  • This branch is created from staging and not master.
  • This PR is being made to staging and not master.
  • I will squash merge this PR into staging.
  • I have added tests covering my contributions.
  • I have updated the documentation accordingly.

…y frame over the specified IP and port.

* Stream on Pillow, OpenCV etc. With 3rd libraries, the visual process goes through certain stages.
* Frames received from the stream are passed through the action recognition algorithm with predict_frames().
* Output of action recognition and frames read from ip camera are displayed in a widget on the screen.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ghost
Copy link

ghost commented Feb 28, 2022

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@PatrickBue PatrickBue left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution! I left a couple of comments in the code. More importantly however this would introduce a lot of duplicate code (since only the footage input changes, but not most of the other logic).
Also this is introducing a new dependency of this repo on OpenCV (see comment I left in code) which has its own challenges.
I believe the best way forward, given that most is duplicate code, could be to not add new functionality in the nodebook but rather to add a quick appendix with a few sentences explaining how one would implement IP camera streaming themselves.

"import os\n",
"from time import sleep, time\n",
"from threading import Thread\n",
"from IPython.display import Video\n",
"\n",
"# Third party tools\n",
"import cv2\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

This would add a new dependency on opencv to this repository. We made the decision to avoid such (at least no hard requirement) since OpenCV can lead to deployment problems.

"\n",
" w_text.value = \"checking 'is_playing_ip_camera'\"\n",
" \n",
" vidcap = cv2.VideoCapture('http://admin:[email protected]:8082/')\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should avoid hard-coded url.

"cell_type": "markdown",
"metadata": {},
"source": [
"Download the video to our data folder"
Copy link
Contributor

Choose a reason for hiding this comment

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

This cell is at the wrong place, should be one above/below.

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.

[FEATURE_REQUEST] Action Recognition via IP Camera Stream
2 participants