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

Fixe the bug in the visualization step. #2326

Merged
merged 5 commits into from
Nov 21, 2022
Merged

Fixe the bug in the visualization step. #2326

merged 5 commits into from
Nov 21, 2022

Conversation

VoyagerXvoyagerx
Copy link
Contributor

Motivation

  • It does not need to install torch again in this tutorial because users usually have installed torch following get_started.md , or use default environment on colab.
  • The api show_result_pyplot() does not have the parameter palette .
  • Save the bug AttributeError: 'EncoderDecoder' object has no attribute 'dataset_meta' in vis_result = show result pyplot(model, img, result, palette) . The 'dataset_meta' is saved in the checkpoint.

Modification

  • Remove the step of torch installation.
  • Init the model from the checkpoint before inference and visualization.
  • Remove the needless parameter palette in show_result_pyplot(model, img, result, palette) .

"!nvcc -V\n",
"# Check GCC version\n",
"!gcc --version"
"!gcc - -version\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"!gcc - -version\n",
"!gcc --version\n",

Comment on lines 52 to 53
"import torch\n",
"import torchvision\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think not everyone has torch installed, so it would be better to install torch before call import torch

@MeowZheng MeowZheng merged commit 8ea777e into open-mmlab:dev-1.x Nov 21, 2022
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
Fixe the bug in the visualization step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Related issue of 1.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants