ziqi-jin / finetune-anything

Fine-tune SAM (Segment Anything Model) for computer vision tasks such as semantic segmentation, matting, detection ... in specific scenarios
MIT License
787 stars 56 forks source link

I want to learn with my data, but I found an error. #39

Open HONG-DEOK opened 1 year ago

HONG-DEOK commented 1 year ago

Traceback (most recent call last): File "D:\3. Develop\2.AI\segmentation_anything_yaml\train.py", line 32, in train_dataset = get_dataset(train_cfg.dataset) File "D:\segmentation_anything_yaml\datasets__init.py", line 28, in get_dataset return segment_datasets[name](**cfg.params, transform=transform, target_transform=target_transform) TypeError: init__() got an unexpected keyword argument 'root'

How can I resolve TypeError? a

I think it's a version issue. Can you tell me your version? my cuda is 11.3, cudnn is v8.2.0.53

ziqi-jin commented 1 year ago

my cuda is 10.2, the error seems that tell you there is a unexcepted parameter named 'root'

Caz-T commented 1 year ago

I guess you might have specified your own dataset class and left some parameters unchanged. In the configuration yaml file, the key name referes to the name of the dataset class rather than that of the dataset itself. If you're not using the default VOC dataset (say, BaseSematicDataset) you'll need to remove the key root since in BaseSematicDataset class you don't need a root parameter.

zsy7532 commented 1 year ago

How do you solve this problem?I met the same problem.