Hi again, I have a customer dataset with only one class called 'plant. Could you please kindly give me some advice how to modify the coco.py file? I did the following and python main.py can run, but I am not sure if it is correct.
import torch
from torch.utils.data import Dataset
from .voc import (InstSegVOC, BoxLabelVOC, BoxLabelVOCLMDB, InstSegVOCLMDB,
InstSegVOCwithBoxInput)
Hi again, I have a customer dataset with only one class called 'plant. Could you please kindly give me some advice how to modify the coco.py file? I did the following and python main.py can run, but I am not sure if it is correct.
import torch from torch.utils.data import Dataset from .voc import (InstSegVOC, BoxLabelVOC, BoxLabelVOCLMDB, InstSegVOCLMDB, InstSegVOCwithBoxInput)
import numpy as np
things = ["plant"] semistuff = ["plant"]
categories = [{'supercategory': 'plant', 'id': 1, 'name': 'plant'}]
cat_mapping = dict([ (cat['id'], idx+1) for idx, cat in enumerate(categories)])
training_config = { 'train_img_data_dir': 'data/coco/train', 'val_img_data_dir': 'data/coco/val', 'test_img_data_dir': 'data/coco/test', 'dataset_type': 'coco', 'train_ann_path': "data/coco/annotations/instances_train.json", 'val_ann_path': "data/coco/annotations/instances_val.json" }
generating_pseudo_label_config = { 'train_img_data_dir': 'data/coco/train', 'train_ann_path': "data/coco/annotations/instances_train.json", 'val_img_data_dir': 'data/coco/train', 'dataset_type': 'coco', 'val_ann_path': "data/coco/annotations/instances_train.json", }