WXinlong / SOLO

SOLO and SOLOv2 for instance segmentation, ECCV 2020 & NeurIPS 2020.
Other
1.69k stars 307 forks source link

training my dataset error #125

Open LiangYong1216 opened 3 years ago

LiangYong1216 commented 3 years ago

KeyError: 'Pig_Data is not in the dataset registry' when i training my dataset,an error occured,i have registed my dataset,but i don not know why this error occured???

WXinlong commented 3 years ago

@LiangYong1216 Can you post your related code? I can help check it.

LiangYong1216 commented 3 years ago

those are my related code: My environment:         cuda:10.1  cudnn:7.6.5  mmcv:0.2.16  mmdet:1.0 pytorch:1.4 torchvision:0.5

my dataset only have 3 classes:          so i set num_classes=4, dataset_type = 'CocoToyDataset' data_root = '/home/liangyong/data/coco/'

this my dataset:

from .coco import CocoDataset from .registry import DATASETS

@DATASETS.register_module class CocoToyDataset(CocoDataset):

CLASSES = ['date', 'fig', 'hazelnut']

from .coco import CocoDataset from .coco_toy import CocoToyDataset from .custom import CustomDataset from .dataset_wrappers import ConcatDataset, RepeatDataset from .loader import DistributedGroupSampler, GroupSampler, build_dataloader from .registry import DATASETS from .voc import VOCDataset from .wider_face import WIDERFaceDataset from .xml_style import XMLDataset

all = [ 'CustomDataset', 'XMLDataset', 'CocoDataset', 'VOCDataset', 'CocoToyDataset', 'CityscapesDataset', 'GroupSampler', 'DistributedGroupSampler', 'build_dataloader', 'ConcatDataset', 'RepeatDataset', 'WIDERFaceDataset', 'DATASETS', 'build_dataset' ] when i training my dateset,an error occured:

UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode))

how should i handle this error? thank you very much!!

gcg0210 commented 3 years ago

hello! my dataset is little special .some data has no foreground ,and some data has no background. I don't konw if it would work when facing these dataset.thank you .

jolt2017 commented 3 years ago

KeyError: 'Pig_Data is not in the dataset registry' when i training my dataset,an error occured,i have registed my dataset,but i don not know why this error occured???

those are my related code: My environment:         cuda:10.1  cudnn:7.6.5  mmcv:0.2.16  mmdet:1.0 pytorch:1.4 torchvision:0.5 my dataset only have 3 classes:          so i set num_classes=4, dataset_type = 'CocoToyDataset' data_root = '/home/liangyong/data/coco/' #this my dataset: from .coco import CocoDataset from .registry import DATASETS @DATASETS.register_module class CocoToyDataset(CocoDataset): CLASSES = ['date', 'fig', 'hazelnut'] from .coco import CocoDataset from .coco_toy import CocoToyDataset from .custom import CustomDataset from .dataset_wrappers import ConcatDataset, RepeatDataset from .loader import DistributedGroupSampler, GroupSampler, build_dataloader from .registry import DATASETS from .voc import VOCDataset from .wider_face import WIDERFaceDataset from .xml_style import XMLDataset all = [ 'CustomDataset', 'XMLDataset', 'CocoDataset', 'VOCDataset', 'CocoToyDataset', 'CityscapesDataset', 'GroupSampler', 'DistributedGroupSampler', 'build_dataloader', 'ConcatDataset', 'RepeatDataset', 'WIDERFaceDataset', 'DATASETS', 'build_dataset' ] when i training my dateset,an error occured: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode)) how should i handle this error? thank you very much!!

i got the same error, how did you solve it ?

jolt2017 commented 3 years ago

@LiangYong1216 Can you post your related code? I can help check it. 很可能是 mmdet 没有正确安装,我重新安装环境后 问题解决。

ssocean commented 3 years ago

follow the instructions 'Use my own datasets' from https://github.com/WXinlong/SOLO/blob/master/docs/GETTING_STARTED.md#use-my-own-datasets Don't forget to change the 'dataset_type' from 'CocoDataset' to your 'Pig_Data' in config file(eg. configs/solo/*.py)