Logic behind mask id
Zartris opened this issue · 3 comments
So I wanted to make a script that converts my already trained model to give the input for the PixelAnnotationTool (So generate x_mask.png, x_color_mask.png).
This will enable me to just correct the labels instead of creating them from scratch.
But these mask id's inside x_mask.png seem a little random to me. They are consistent between images and I think it has something to do with the config file, but I would love to reproduce this logic inside my script.
My script is as follows:
- Inference the images
- convert the model classes to a config file (matching colors with class).
- ??? (without the logic to convert colors or class-name into id, we are stuck here)
Thanks
I need to learn reading the config file...
It says freaking ID!
Hi @Zartris,
I'm stuck at the same point.
Can you explain it with more detail:
What is the difference between the "id" and the "color" mask, I still don't get it?
And which config-file do you mean?
Either you have to make your own config file or retrieve the id's from the existing.
Go under (tool > save config file) and find a place to save the default config file.
Mine looks something like:
{
"labels": {
"bicycle": {
"categorie": "vehicle",
"color": [
119,
11,
32
],
"id": 33,
"id_categorie": 7,
"name": "bicycle"
},
"bridge": {
"categorie": "construction",
"color": [
150,
100,
100
],
"id": 15,
"id_categorie": 2,
"name": "bridge"
},
....
}
Here you can see the ID's are specified for each class.