-
Notifications
You must be signed in to change notification settings - Fork 45.4k
DeepLab: Cityscapes splits refactoring #8870
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
Conversation
aquariusjay
left a comment
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.
Thanks, ruslo! It looks great! Much more readable than before.
Just a few suggestions. Please take a look. Thanks!
| A list of sorted file names or None when getting label for | ||
| test set. | ||
| """ | ||
| if data == 'label' and dataset_split == 'test': |
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 still need this, since test_fine does not have label.
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 still need this, since test_fine does not have label.
The files themselves are there, but they don't contain useful information:
> find gtFine/train/ -type f -name '*.json' | wc -l
2975
> find gtFine/test/ -type f -name '*.json' | wc -l
1525
Example of a list of labels from the train set:
> grep label gtFine/train/zurich/zurich_000121_000019_gtFine_polygons.json | sort -u
"label": "bicycle",
"label": "building",
"label": "car",
"label": "ego vehicle",
"label": "license plate",
"label": "motorcycle",
"label": "out of roi",
"label": "person",
"label": "pole",
"label": "rider",
"label": "road",
"label": "sidewalk",
"label": "sky",
"label": "static",
"label": "terrain",
"label": "traffic light",
"label": "traffic sign",
"label": "vegetation",
"label": "wall",
Example of a list of labels from the test set:
> grep label gtFine/test/munich/munich_000152_000019_gtFine_polygons.json | sort -u
"label": "ego vehicle",
"label": "out of roi",
Basically, they are all the same in the test set (as far as I understand):
> openssl sha1 gtFine/test/munich/munich_00000*_000019_gtFine_polygons.json
SHA1(gtFine/test/munich/munich_000000_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000001_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000002_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000003_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000004_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000005_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000006_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000007_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000008_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
SHA1(gtFine/test/munich/munich_000009_000019_gtFine_polygons.json)= 349dd446df6a4066cd47bc898b5d72360dad4946
If you add this line to build_cityscapes_data.py:
print('split: {}, images: {}, labels: {}'.format(dataset_split, num_images, num_labels))
Output will be:
split: train_fine, images: 2975, labels: 2975
split: val_fine, images: 500, labels: 500
split: test_fine, images: 1525, labels: 1525
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.
Thanks for double-checking it, ruslo!
| # Only support converting 'train' and 'val' sets for now. | ||
| for dataset_split in ['train', 'val']: | ||
| # Only support converting 'train_fine', 'val_fine' and 'test_fine' sets for now. | ||
| for dataset_split in ['train_fine', 'val_fine', 'test_fine']: |
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.
Let's change it back to
for dataset_split in ['train_fine', 'val_fine']:
It seems that we need to do more changes in order to support test_fine (e.g., skip reading groundtruth).
Let's change it back, since this should be orthogonal to your this pull request.
Sorry about going back and forth.
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.
Let's change it back
I can change it back, but as I said, the vis.py is working fine. That's the only place where I can see the test_fine can be used.
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.
Oh, yes, you are right. I totally forgot that Cityscapes has default groundtruth (all ignore labels) for test set.
Thanks for the clarification, ruslo!
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.
You are right. Thanks for double-checking it, ruslo!
aquariusjay
left a comment
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.
Looks great! Thanks for double checking it, ruslo!
| # Only support converting 'train' and 'val' sets for now. | ||
| for dataset_split in ['train', 'val']: | ||
| # Only support converting 'train_fine', 'val_fine' and 'test_fine' sets for now. | ||
| for dataset_split in ['train_fine', 'val_fine', 'test_fine']: |
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.
You are right. Thanks for double-checking it, ruslo!
| A list of sorted file names or None when getting label for | ||
| test set. | ||
| """ | ||
| if data == 'label' and dataset_split == 'test': |
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.
Thanks for double-checking it, ruslo!
* DeepLab: Cityscapes splits refactoring * DeepLab: Process 'test_fine' split in Cityscapes
* DeepLab: Cityscapes splits refactoring * DeepLab: Process 'test_fine' split in Cityscapes
Description
Refactoring, follow-up for #8866
Type of change
Tests
Checklist