-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Audi's A2D2 dataset #175
Conversation
Codecov Report
@@ Coverage Diff @@
## master #175 +/- ##
==========================================
+ Coverage 83.69% 84.67% +0.98%
==========================================
Files 89 91 +2
Lines 4128 4425 +297
Branches 651 706 +55
==========================================
+ Hits 3455 3747 +292
- Misses 535 538 +3
- Partials 138 140 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Task linked: CU-4qt10u [Review] Audi's A2D2 dataset |
(241, 230, 255): 15, # Buildings | ||
(96, 69, 143): 255, # Blurred area | ||
(53, 46, 82): 255, # Rain dirt | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that the official website says that "The dataset features 41,280 frames with semantic segmentation in 38 categories", but there are only 35 categories in 'SEG_COLOR_DICT_A2D2'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double cross-checked the original class list (a2d2_root/camera_lidar_semantic/class_list.json)
. With instance segmentations collapsed into categorical segmentation classes, the number add up to 38 in both class_list.json
and SEG_COLOR_DICT_A2D2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied class_list.json
with an additional semantic class counter number to the right
{
"#ff0000": "Car 1",
"#c80000": "Car 2",
"#960000": "Car 3",
"#800000": "Car 4", 1
"#b65906": "Bicycle 1",
"#963204": "Bicycle 2",
"#5a1e01": "Bicycle 3",
"#5a1e1e": "Bicycle 4", 2
"#cc99ff": "Pedestrian 1",
"#bd499b": "Pedestrian 2",
"#ef59bf": "Pedestrian 3", 3
"#ff8000": "Truck 1",
"#c88000": "Truck 2",
"#968000": "Truck 3", 4
"#00ff00": "Small vehicles 1",
"#00c800": "Small vehicles 2",
"#009600": "Small vehicles 3", 5
"#0080ff": "Traffic signal 1",
"#1e1c9e": "Traffic signal 2",
"#3c1c64": "Traffic signal 3", 6
"#00ffff": "Traffic sign 1",
"#1edcdc": "Traffic sign 2",
"#3c9dc7": "Traffic sign 3", 7
"#ffff00": "Utility vehicle 1",
"#ffffc8": "Utility vehicle 2", 8
"#e96400": "Sidebars", 9
"#6e6e00": "Speed bumper", 10
"#808000": "Curbstone", 11
"#ffc125": "Solid line", 12
"#400040": "Irrelevant signs", 13
"#b97a57": "Road blocks", 14
"#64": "Tractor", 15
"#8b636c": "Non-drivable street", 16
"#d23273": "Zebra crossing", 17
"#ff0080": "Obstacles / trash", 18
"#fff68f": "Poles", 19
"#960096": "RD restricted area", 20
"#ccff99": "Animals", 21
"#eea2ad": "Grid structure", 22
"#212cb1": "Signal corpus", 23
"#b432b4": "Drivable cobblestone", 24
"#ff46b9": "Electronic traffic", 25
"#eee9bf": "Slow drive area", 26
"#93fdc2": "Nature object", 27
"#9696c8": "Parking area", 28
"#b496c8": "Sidewalk", 29
"#48d1cc": "Ego car", 30
"#c87dd2": "Painted driv. instr.", 31
"#9f79ee": "Traffic guide obj.", 32
"#8000ff": "Dashed line", 33
"#ff00ff": "RD normal street", 34
"#87ceff": "Sky", 35
"#f1e6ff": "Buildings", 36
"#60458f": "Blurred area", 37
"#352e52": "Rain dirt", 38
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SEG_COLOR_DICT_A2D2 = {
(255, 0, 0): 28, # Car 1
(200, 0, 0): 28, # Car 2
(150, 0, 0): 28, # Car 3
(128, 0, 0): 28, # Car 4
(182, 89, 6): 27, # Bicycle 1
(150, 50, 4): 27, # Bicycle 2
(90, 30, 1): 27, # Bicycle 3
(90, 30, 30): 27, # Bicycle 4
(204, 153, 255): 26, # Pedestrian 1
(189, 73, 155): 26, # Pedestrian 2
(239, 89, 191): 26, # Pedestrian 3
(255, 128, 0): 30, # Truck 1
(200, 128, 0): 30, # Truck 2
(150, 128, 0): 30, # Truck 3
(0, 255, 0): 32, # Small vehicles 1
(0, 200, 0): 32, # Small vehicles 2
(0, 150, 0): 32, # Small vehicles 3
(0, 128, 255): 19, # Traffic signal 1
(30, 28, 158): 19, # Traffic signal 2
(60, 28, 100): 19, # Traffic signal 3
(0, 255, 255): 20, # Traffic sign 1
(30, 220, 220): 20, # Traffic sign 2
(60, 157, 199): 20, # Traffic sign 3
(255, 255, 0): 29, # Utility vehicle 1
(255, 255, 200): 29, # Utility vehicle 2
(233, 100, 0): 16, # Sidebars
(110, 110, 0): 12, # Speed bumper
(128, 128, 0): 14, # Curbstone
(255, 193, 37): 6, # Solid line
(64, 0, 64): 22, # Irrelevant signs
(185, 122, 87): 17, # Road blocks
(0, 0, 100): 31, # Tractor
(139, 99, 108): 1, # Non-drivable street
(210, 50, 115): 8, # Zebra crossing
(255, 0, 128): 34, # Obstacles / trash
(255, 246, 143): 18, # Poles
(150, 0, 150): 2, # RD restricted area
(204, 255, 153): 33, # Animals
(238, 162, 173): 9, # Grid structure
(33, 44, 177): 21, # Signal corpus
(180, 50, 180): 3, # Drivable cobblestone
(255, 70, 185): 23, # Electronic traffic
(238, 233, 191): 4, # Slow drive area
(147, 253, 194): 24, # Nature object
(150, 150, 200): 5, # Parking area
(180, 150, 200): 13, # Sidewalk
(72, 209, 204): 255, # Ego car
(200, 125, 210): 11, # Painted driv. instr.
(159, 121, 238): 10, # Traffic guide obj.
(128, 0, 255): 7, # Dashed line
(255, 0, 255): 0, # RD normal street
(135, 206, 255): 25, # Sky
(241, 230, 255): 15, # Buildings
(96, 69, 143): 255, # Blurred area
(53, 46, 82): 255, # Rain dirt
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only difference is that the labeling in SEG_COLOR_DICT_A2D2 is not instance based, because I believe mmsegmentation is intended for categorical segmentation.
Which do you prefer? Perhaps adding an additional instance-based dictionary would be good?
(241, 230, 255): 2, # Buildings --> Building | ||
(96, 69, 143): 255, # Blurred area --> Ignore ? | ||
(53, 46, 82): 255, # Rain dirt --> Ignore ? | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 14 categories in 'SEG_COLOR_DICT_CITYSCAPES' which are subclasses of CITYSCAPES, so we can use subcalss train in dataset and model configs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, could you please elaborate on what you think should be modified?
data_root=data_root, | ||
img_dir='img_dir/train', | ||
ann_dir='ann_dir/train', | ||
pipeline=train_pipeline), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add custom classes train (PR #71)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also elaborate on what you mean with classes (str | Sequence[str], optional): Specify classes to load.
?
data_root=data_root, | ||
img_dir='img_dir/val', | ||
ann_dir='ann_dir/val', | ||
pipeline=test_pipeline), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add custom classes train (PR #71)
data_root=data_root, | ||
img_dir='img_dir/val', | ||
ann_dir='ann_dir/val', | ||
pipeline=test_pipeline)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add custom classes train (PR #71)
Hi @rufuzzz0 |
Hi @xvjiarui What does this part mean?
Ref: isort....................................................................Failed
yapf.....................................................................Failed
docformatter.............................................................Failed
|
Hi @rufuzzz0 |
tools/convert_datasets/a2d2.py
Outdated
try: | ||
symlink(img_filepath, img_symlink_path) | ||
except FileExistsError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what case the file would exist already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xvjiarui I imagine handling a scenario where a user might want to repair the converted dataset by re-running the conversion function without getting an error regarding existing symlink files (i.e. do not have to remember to manually delete the symlink directory structure)
Does this potential elimination of error messaging make sense to you?
Of course we can remove it and throw an error instead, reminding the user to delete the old symlink files?
Hi @xvjiarui As a demonstration of the PR's working condition, here is a DeepLabv3+ ResNet 50 40k iterations result achieving 81.25% mIoU on a validation set. The model is trained on a dual RTX3090 system. |
Hi @rufuzzz0 |
@xvjiarui Thank you for your rapid response! $ git fetch upstream
$ git merge upstream/master |
However, in the |
Yes, because these files were modified in my fork in order to sync with the upstream master branch, right? What would you like me to do? |
Not exactly, the file changed should display the difference between your branch and the upstream master branch. |
Sure, let me try to redo the PR later today. Sorry for missing the instructions originally. |
This PR adds the following functionalities
Dataset conversion, training, and evaluation are tested.
About the dataset: