mmsegmentation/mmseg/datasets
Siddharth Ancha d1c0a3efd4
[Fix] Unfinished label conversion from `-1` to `255` in 1.x (#2516)
## Motivation

This is motivated by a previously unfinished PR (#2332). In that PR, the
label -1 was changed to 255 in `BaseSegDataset`, which is correct.
However, it was changed at only one location. There is another location
in `mmseg/datasets/basesegdataset.py` where -1 was still being used that
was not converted to 255. I have now converted it to 255.

This is exactly same as a similar fix to the `master` branch via #2515 .

## Modification

I've simply converted the snipped

```python
if new_id != -1:
    new_palette.append(palette[old_id])
```
to 
```python
if new_id != 255:
    new_palette.append(palette[old_id])
```

## Checklist

- [x] Pre-commit or other linting tools are used to fix the potential
lint issues.
  - _I've fixed all linting/pre-commit errors._
- [x] The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
  - _No unit tests need to be added or were affected.
- [x] If the modification has potential influence on downstream
projects, this PR should be tested with downstream projects, like MMDet
or MMDet3D.
  - _I don't think this change affects MMDet or MMDet3D._
- [x] The documentation has been modified accordingly, like docstring or
example tutorials.
- _This change fixes an existing bug and doesn't require modifying any
documentation/docstring._
2023-01-30 12:35:55 +08:00
..
transforms [Fix] Switch order of `reduce_zero_label` and applying `label_map` in 1.x (#2517) 2023-01-30 12:17:15 +08:00
__init__.py CodeCamp #141 [Feature] Add BioMedical3DRandomFlip. (#2404) 2023-01-20 15:34:11 +08:00
ade.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
basesegdataset.py [Fix] Unfinished label conversion from `-1` to `255` in 1.x (#2516) 2023-01-30 12:35:55 +08:00
chase_db1.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
cityscapes.py [Fix] Fix repo based on refactoring standard (#1869) 2022-08-19 20:50:02 +08:00
coco_stuff.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
dark_zurich.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
dataset_wrappers.py [Feature] Add P1 DataTransform (#1843) 2022-08-19 20:50:01 +08:00
decathlon.py [Feature]Add Decathlon dataset (#2227) 2022-10-26 20:10:42 +08:00
drive.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
hrf.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
isaid.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
isprs.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
lip.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
loveda.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
night_driving.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
pascal_context.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
potsdam.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
stare.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00
synapse.py CodeCamp #140 [New] [Feature] Add synapse dataset and data augmentation in dev-1.x. (#2432) 2023-01-06 16:14:54 +08:00
voc.py [Fix]Add input argument for datasets (#2379) 2022-12-05 22:27:04 +08:00