Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Labeling image segmentation. #217

Answered by vfdev-5
idkwid2022 asked this question in Q&A
Discussion options

Hi,

I want to ask about the code, I don't know where to ask since I don't know if it's bug or just my lack of understanding.

I'm using image segmentation template and on data.py there are lines that I don't understand

target_names = [
"background",
"aeroplane",
"bicycle",
"bird",
"boat",
"bottle",
"bus",
"car",
"cat",
"chair",
"cow",
"diningtable",
"dog",
"horse",
"motorbike",
"person",
"plant",
"sheep",
"sofa",
"train",
"tv/monitor",
]

I guessed it's the categories/classes names, but I can't find any reference to the list target_names, even on the parent classes VOCSegmentation, _VOCBase, VisionDataset, and Dataset.

And that brings the next question, how do I label the segmentation result? There are no link between the label and the image dataset right?

Using CVAT, I got labelmap.txt which contains label and mask color, so I was thinking it's the link, but then I can't find any code reading the file.

So, I'm confused. Could anyone please help me with this?

Thank you.

You must be logged in to vote

Good question, concerning target_names this image segmentation template was ported from ref example in ignite where we also plot Confusion Matrix : https://github.com/pytorch/ignite/blob/master/examples/references/segmentation/pascal_voc2012/main.py#L156
So yes, it is unused in this template.
Target names is basically a map between integer mask indices and names.

Replies: 1 comment 1 reply

Comment options

Good question, concerning target_names this image segmentation template was ported from ref example in ignite where we also plot Confusion Matrix : https://github.com/pytorch/ignite/blob/master/examples/references/segmentation/pascal_voc2012/main.py#L156
So yes, it is unused in this template.
Target names is basically a map between integer mask indices and names.

You must be logged in to vote
1 reply
Comment options

Thanks for clearing that up. I guess I have to read ignite's ref example. 😰

Answer selected by idkwid2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /