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

Crop Video frames #10

Open
manza-ari opened this issue Feb 26, 2019 · 1 comment
Open

Crop Video frames #10

manza-ari opened this issue Feb 26, 2019 · 1 comment

Comments

@manza-ari
Copy link

Hi @bbatha @weikaolun @kossak @dte @soliton4

Kindly guide how to crop images detected by the object detection method YOLO v3

I have a video file which I have converted in frames with bounding boxes.

@Piyush-k-singh
Copy link

Hi @bbatha @weikaolun @kossak @dte @soliton4

Kindly guide how to crop images detected by the object detection method YOLO v3

I have a video file which I have converted in frames with bounding boxes.

Update your code in detect.py

if save_img or save_crop or view_img: # Add bbox to image
c = int(cls) # integer class
label = None if hide_labels else (names[c] if hide_conf else f'{names[c]} {conf:.2f}')
annotator.box_label(xyxy, label, color=colors(c, True))
save_one_box(xyxy, imc, file=save_dir / 'crops' / names[c] / f'{p.stem}.jpg', BGR=True) #this line will crop image frame video

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

2 participants