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

Fix device of the tensors in set_nms #10574

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

max-unfinity
Copy link
Contributor

@max-unfinity max-unfinity commented Jun 29, 2023

Motivation

Fixed RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) when running CrowdDet model on cuda device (the model uses MultiInstanceBBoxHead roi_head)

Modification

Just added tensor.to(device) to fix the issue in set_nms method.

        keep = keep.to(bboxes.device)
        ruler = ruler.to(bboxes.device)

versions:

  • torch==2.0.1
  • mmdet==3.0.0
  • mmengine==0.7.4

@CLAassistant
Copy link

CLAassistant commented Jun 29, 2023

CLA assistant check
All committers have signed the CLA.

@hhaAndroid hhaAndroid changed the base branch from main to dev-3.x July 12, 2023 05:56
@hhaAndroid
Copy link
Collaborator

@max-unfinity Hi. please fix the lint

@max-unfinity
Copy link
Contributor Author

max-unfinity commented Jul 12, 2023

@hhaAndroid HI!
I've fixed the lint. But now it is failed on unittest:
ImportError: class "CocoPanopticDataset" in mmdet/datasets/coco_panoptic.py: Please install petrel_client to enable PetrelBackend
I don't know how to fix this

@OpenMMLab-Assistant-004

Hi @max-unfinity,

We'd like to express our appreciation for your valuable contributions to the mmdetection. Your efforts have significantly aided in enhancing the project's quality.
It is our pleasure to invite you to join our community thorugh Discord_Special Interest Group (SIG) channel. This is a great place to share your experiences, discuss ideas, and connect with other like-minded people. To become a part of the SIG channel, send a message to the moderator, OpenMMLab, briefly introduce yourself and mention your open-source contributions in the #introductions channel. Our team will gladly facilitate your entry. We eagerly await your presence. Please follow this link to join us: ​https://discord.gg/UjgXkPWNqA.

If you're on WeChat, we'd also love for you to join our community there. Just add our assistant using the WeChat ID: openmmlabwx. When sending the friend request, remember to include the remark "mmsig + Github ID".

Thanks again for your awesome contribution, and we're excited to have you as part of our community!

@hhaAndroid hhaAndroid merged commit 3edcc16 into open-mmlab:dev-3.x Jul 21, 2023
yumion pushed a commit to yumion/mmdetection that referenced this pull request Jan 31, 2024
yumion pushed a commit to yumion/mmdetection that referenced this pull request Jan 31, 2024
@gitac10
Copy link

gitac10 commented Oct 24, 2024

@hhaAndroid HI! I've fixed the lint. But now it is failed on unittest: ImportError: class "CocoPanopticDataset" in mmdet/datasets/coco_panoptic.py: Please install petrel_client to enable PetrelBackend I don't know how to fix this

hi,have solved the problem? could you tell me how to do? thank you

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.

6 participants