Comments (6)
I will double check on it later tonight. I believe the colors should be the same as what's on the semantic maps.
Also your correct in that we do not follow the ADE color scheme as you mentioned. For the ground truth labels or maps the colors should correspond to uint values of the semantic segmentation maps. As in the colors are converted from RGB to grey scale 0,1,2, etc.
from anomaly-seg.
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.
import numpy as np
from PIL import Image as image
import os
root = "annotations/test/t5/"
test_images = os.listdir(root)
#StreetHazards colors
colors = np.array([[ 0, 0, 0], # // unlabeled = 0,
[ 70, 70, 70], # // building = 1,
[190, 153, 153], # // fence = 2,
[250, 170, 160], # // other = 3,
[220, 20, 60], # // pedestrian = 4,
[153, 153, 153], # // pole = 5,
[157, 234, 50], # // road line = 6,
[128, 64, 128], # // road = 7,
[244, 35, 232], # // sidewalk = 8,
[107, 142, 35], # // vegetation = 9,
[ 0, 0, 142], # // car = 10,
[102, 102, 156], # // wall = 11,
[220, 220, 0], # // traffic sign = 12,
[ 60, 250, 240], # // anomaly = 13,
])
for im_path in test_images:
im = image.open(root+im_path)
pic = np.array(im)
new_img = np.zeros((720, 1280, 3))
for index, color in enumerate(colors):
new_img[pic==(index+1)] = colors[index]
new_img = image.fromarray(new_img.astype('uint8'), 'RGB')
new_img.save(root+"rgb_"+str(im_path))
Example 300 converted back into standard RGB colors.
Hope you find the dataset helpful :)
from anomaly-seg.
Hi Steven,
Thank you for the quick response. Yes. the dataset is extremely helpful, thank you! :)
I still have some questions. On running eval_ood.py , the semantic map are generated and concatenate with corresponding input and ground truth. I see the colors don't
match the image you attached (image 300 in T5 folder). I believe the color encoding is from ADE instead. hence the confusion.
The colors used for road, sidewalk, fence, building, and novel objects
vary. The color encoding list you provided does not list sky. Any specific reason? Please clarify
from anomaly-seg.
I can update the eval_ood.py script. The colors as mentioned in the earlier post had an off by one issue. So there were no zeroes output from the labels.
The reason we couldn't include sky was due to time and resource constraints. Adding a semantic label into Carla for the rays that hit infinity "sky" was possible but hard to finish at the time the dataset was released. We were literally helping in it's development but we didn't want to delay the paper and dataset months or possibly over a year to add in one extra label. Hope that helps clarify the reason we didn't include sky.
from anomaly-seg.
Hi Steven,
Thank you for clarifying! will look forward to the changes in eval_ood.py script.
Regards,
Shravanthi
from anomaly-seg.
Could you add [0,0,0]
here and then rerun it? I think that should fix the issue.
You'd only need to rerun the over writing of color150.mat here.
I won't be able to test it until tomorrow. I think that's the quickest way to recreate our color scheme.
from anomaly-seg.
Related Issues (20)
- Question: Paper Section 3 HOT 4
- pretrained model HOT 4
- Issues with evaluate the model on OOD test set HOT 1
- Couldn't match the BDD100K file paths HOT 3
- Some questions about the CAOS benchmark HOT 2
- Some points to confirm about the CAOS benchmark HOT 4
- Two more stages in resnet HOT 2
- how about the class define? HOT 2
- how to show the anomaly scores? HOT 1
- Evaluation based on each image vs entire dataset HOT 1
- What is the true label of -1 in seg_label HOT 1
- Anomaly detecting and visualization HOT 2
- Training Error?? HOT 7
- About metrics AUPR, AUROC, and FPR95 HOT 2
- About ground truth Semantic Segmentation images HOT 4
- Broken link to BDD-Anomaly dataset HOT 1
- Updating the google drive link of the Species OOD dataset HOT 4
- Question about CAOS dataset training HOT 13
- BDD100K Data Processing Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anomaly-seg.