torchvision_finetuning_instance_segmentation.ipynb updates
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
Issue 1:
On following the colab notebook posted here, the run fails
ValueError Traceback (most recent call last)
[<ipython-input-19-b563ca732476>](https://83yy92n3d-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230302-060133-RC02_513678701#) in <module>
4 # let's adda color palette to the mask.
----> 5 mask.putpalette([
6 0, 0, 0, # black background
7 255, 0, 0, # index 1 is red
2 frames
[/usr/local/lib/python3.8/dist-packages/PIL/Image.py](https://83yy92n3d-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230302-060133-RC02_513678701#) in _getdecoder(mode, decoder_name, args, extra)
431 except AttributeError as e:
432 raise OSError(f"decoder {decoder_name} not available") from e
--> 433 return decoder(mode, *args + extra)
434
435
ValueError: unknown raw mode for given image mode
Issue 2:
Path to MaskRCNN and FasterRCNN model architectures do not load

Fix:
- Enable
Pmode in mask before callingputpalette() - Update image paths in colab
Since I do not have access to the original notebook and am unable to find the source, I have made a copy and updating the link in tutorial.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with intermediate_source/torchvision_tutorial.rst and follow its linked Colab notebook. Check the mask setup around putpalette() and the MaskRCNN and FasterRCNN image paths; done means the notebook loads the models and runs past the palette error with the updated link and paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100