Skip to content
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

iSAID dataset IoU/ACC nan #3760

Open
lypan1208 opened this issue Aug 22, 2024 · 0 comments
Open

iSAID dataset IoU/ACC nan #3760

lypan1208 opened this issue Aug 22, 2024 · 0 comments

Comments

@lypan1208
Copy link

I tried pspnet on iSAID dataset, as the instruction, I ran tools/dataset_converters/isaid.py to get the dataset as follows:

├── data
│ ├── iSAID
│ │ ├── img_dir
│ │ │ ├── train
│ │ │ ├── val
│ │ │ ├── test
│ │ ├── ann_dir
│ │ │ ├── train
│ │ │ ├── val

then I use the command
python tools/train.py configs/pspnet/pspnet_r50-d8_4xb4-80k_isaid-896x896.py

the model started to train, but the validation got something wrong:
2024/08/22 10:32:06 - mmengine - INFO - Iter(val) [11600/11644] eta: 0:00:02 time: 0.0648 data_time: 0.0024 memory: 1224
2024/08/22 10:32:09 - mmengine - INFO - per class results:
2024/08/22 10:32:09 - mmengine - INFO -
+--------------------+-------+-------+
| Class | IoU | Acc |
+--------------------+-------+-------+
| background | 96.65 | 100.0 |
| ship | 0.0 | 0.0 |
| store_tank | nan | nan |
| baseball_diamond | nan | nan |
| tennis_court | nan | nan |
| basketball_court | nan | nan |
| Ground_Track_Field | nan | nan |
| Bridge | nan | nan |
| Large_Vehicle | nan | nan |
| Small_Vehicle | nan | nan |
| Helicopter | nan | nan |
| Swimming_pool | nan | nan |
| Roundabout | nan | nan |
| Soccer_ball_field | nan | nan |
| plane | nan | nan |
| Harbor | nan | nan |
+--------------------+-------+-------+

mmsegmentation/mmseg/datasets/isaid.py
`import mmengine.fileio as fileio

from mmseg.registry import DATASETS
from .basesegdataset import BaseSegDataset

@DATASETS.register_module()
class iSAIDDataset(BaseSegDataset):
""" iSAID: A Large-scale Dataset for Instance Segmentation in Aerial Images
In segmentation map annotation for iSAID dataset, which is included
in 16 categories. reduce_zero_label is fixed to False. The
img_suffix is fixed to '.png' and seg_map_suffix is fixed to
'_manual1.png'.
"""

METAINFO = dict(
    classes=('background', 'ship', 'store_tank', 'baseball_diamond',
             'tennis_court', 'basketball_court', 'Ground_Track_Field',
             'Bridge', 'Large_Vehicle', 'Small_Vehicle', 'Helicopter',
             'Swimming_pool', 'Roundabout', 'Soccer_ball_field', 'plane',
             'Harbor'),
    palette=[[0, 0, 0], [0, 0, 63], [0, 63, 63], [0, 63, 0], [0, 63, 127],
             [0, 63, 191], [0, 63, 255], [0, 127, 63], [0, 127, 127],
             [0, 0, 127], [0, 0, 191], [0, 0, 255], [0, 191, 127],
             [0, 127, 191], [0, 127, 255], [0, 100, 155]])

def __init__(self,
             img_suffix='.png',
             seg_map_suffix='_instance_color_RGB.png',
             reduce_zero_lavel=True,
             ignore_index=255,
             **kwargs) -> None:
    super().__init__(
        img_suffix=img_suffix,
        seg_map_suffix=seg_map_suffix,
        ignore_index=ignore_index,
        **kwargs)
    assert fileio.exists(
        self.data_prefix['img_path'], backend_args=self.backend_args)

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant