Closed JackyLin7414 closed 2 years ago
Hey could you be more specific as to what you're question is?
The file is called create_dataset.py and it replaces data/color150.mat so it should be run in the semantic-segmentation-pytorch folder. Not sure if that answers your question?
Hi, @xksteven Thank you for the quick response. So if I put this code in the semantic-segmentation-pytorch folder and run. I will get the pictures like you attached in annotations/test/t5/ folder?
If I have data/coler150.mat. I can just run create_dataset.py and unblock line 15-36 to get Semantic Segmentation pictures?
Thank you. I appreciate it. Jacky
That's correct. To get the pictures to be exact same colors I believe you'll need to add another entry into the array. Specifically another [0,0,0] in the beginning but I haven't tested it.
Let me know if you run into any issues.
Hi, @xksteven Thank you for the quick response. Your answer is exactly what i want. I appreciate it.
Jacky
[[[Hey so you can use the script below to undo the conversion from uint back to colors. The main difference that I had forgotten was that the counter starts at 1. The semantic segmentation pytorch code ignores the index 0 and this was our
hack
to get the code to learn the background class. I attached one of the examples below to demonstrate it working in converting back to the original colors.Example 300 converted back into standard RGB colors.
Hope you find the dataset helpful :)
Originally posted by @xksteven in https://github.com/hendrycks/anomaly-seg/issues/15#issuecomment-890300278](https://github.com/hendrycks/anomaly-seg/issues/15#issuecomment-890300278)](https://github.com/hendrycks/anomaly-seg/issues/15#issuecomment-890300278)](https://github.com/hendrycks/anomaly-seg/issues/15#issuecomment-890300278)
Hi, @xksteven I don't know where to run this code. Can you tell me.
Thank you. I appreciate it. Jacky