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

change channel order according to cfg #504

Merged
merged 4 commits into from
Feb 26, 2021

Conversation

liuxin9608
Copy link
Collaborator

No description provided.

if args.video_path != '':
cap = cv2.VideoCapture(args.video_path)
else:
cap = cv2.VideoCapture(0)
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

agree

@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #504 (9182f36) into master (a207089) will decrease coverage by 0.02%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            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              
Flag Coverage Δ
unittests 80.94% <60.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmpose/apis/inference.py 54.71% <60.00%> (-0.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a207089...9182f36. Read the comment docs.

results['image_file'] = ''
img = mmcv.imread(results['img_or_path'], self.color_type,
self.channel_order)
if self.channel_order == 'rgb':
Copy link
Contributor

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

@innerlee innerlee merged commit abd0ca9 into master Feb 26, 2021
@innerlee innerlee deleted the inference_change_channel_order branch February 26, 2021 14:57
rollingman1 pushed a commit to rollingman1/mmpose that referenced this pull request Nov 5, 2021
* add lazy ops docs

* polish some sentences
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
* change channel order according to cfg

* fix docstring

* support webcam

* rm webcam

Co-authored-by: jinsheng <jinsheng@sensetime.com>
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
* change channel order according to cfg

* fix docstring

* support webcam

* rm webcam

Co-authored-by: jinsheng <jinsheng@sensetime.com>
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.

None yet

3 participants