-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
change channel order according to cfg #504
Conversation
if args.video_path != '': | ||
cap = cv2.VideoCapture(args.video_path) | ||
else: | ||
cap = cv2.VideoCapture(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for live camera?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to https://github.com/open-mmlab/mmaction2/blob/master/demo/webcam_demo.py for an implementation of webcam. It uses two threads for capturing and analyzing, which improves user experience
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I suggest writing a separate file for webcam, and make this pr focus on channel order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
==========================================
- Coverage 81.06% 81.03% -0.03%
==========================================
Files 138 138
Lines 9479 9486 +7
Branches 1519 1521 +2
==========================================
+ Hits 7684 7687 +3
- Misses 1451 1455 +4
Partials 344 344
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
mmpose/apis/inference.py
Outdated
results['image_file'] = '' | ||
img = mmcv.imread(results['img_or_path'], self.color_type, | ||
self.channel_order) | ||
if self.channel_order == 'rgb': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add check for color_type for this if statement
* add lazy ops docs * polish some sentences
* change channel order according to cfg * fix docstring * support webcam * rm webcam Co-authored-by: jinsheng <jinsheng@sensetime.com>
* change channel order according to cfg * fix docstring * support webcam * rm webcam Co-authored-by: jinsheng <jinsheng@sensetime.com>
No description provided.