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

[WIP] Integration with DeepLabCut 3.0 - PyTorch Engine #121

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

n-poulsen
Copy link
Collaborator

This pull requests updates DeepLabCut-Live for models exported with DeepLabCut 3.0. TensorFlow models can still be used, and the code is siloed so that only the engine used to run the code is required as a package (i.e. no need to install TensorFlow if you want to run live pose estimation with PyTorch models).

If you want to give this PR a try, you can install the code in your local conda environment by running:

pip install "git+https://github.com/DeepLabCut/DeepLabCut-live.git@dlclive3"

Comment on lines +58 to +59
- Feb 2021: DeepLabCut-Live! was featured in **Nature Methods**: [
"Real-time behavioral analysis"](https://www.nature.com/articles/s41592-021-01072-z)

Choose a reason for hiding this comment

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

Suggested change
- Feb 2021: DeepLabCut-Live! was featured in **Nature Methods**: [
"Real-time behavioral analysis"](https://www.nature.com/articles/s41592-021-01072-z)
- Feb 2021: DeepLabCut-Live! was featured in **Nature Methods**:
["Real-time behavioral analysis"](https://www.nature.com/articles/s41592-021-01072-z)

resize=resize,
cropping=cropping,
dynamic=dynamic,
display=display,
max_detections=max_detections,

Choose a reason for hiding this comment

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

DLCLive's constructor doesn't have a max_detections argument

iterator = range(n_frames) if (print_rate) or (display) else tqdm(range(n_frames))
for i in iterator:
iterator = range(n_frames)
if print_rate or display:

Choose a reason for hiding this comment

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

Shouldn't we check if has_tqdm here?

frame_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
frame_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

vwriter = cv2.VideoWriter(

Choose a reason for hiding this comment

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

Let's name it vid_writer as in benchmark()? I find vid_writer indeed better

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

Successfully merging this pull request may close these issues.

4 participants