aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.37k stars 646 forks source link

The error of CLASS_NAMES about Blendmask? #156

Closed zhangfusheng-163 closed 4 years ago

zhangfusheng-163 commented 4 years ago

I have register my dataset and the CLASS_NAMES before training my dataset,and it does work for train,however when I test my picture,the CLASS_NAMES of ouput is wrong,the CLASS_NAMES of output is coco's CLASS_NAMES ,is not my register CLASS_NAMES ,what is wrong? But when I trained my dataset for detectron2,it does not happend.

This is my register code: `CLASS_NAMES =["hand"]

DATASET_ROOT = '/root/detectron2/AdelaiDet/datasets/handdata' ANN_ROOT = os.path.join(DATASET_ROOT, 'hand')

TRAIN_PATH = os.path.join(DATASET_ROOT, 'train') VAL_PATH = os.path.join(DATASET_ROOT, 'val')

TRAIN_JSON = os.path.join(ANN_ROOT, 'hand_train.json') VAL_JSON = os.path.join(ANN_ROOT, 'hand_val.json')

PREDEFINED_SPLITS_DATASET = { "coco_my_train": (TRAIN_PATH, TRAIN_JSON), "coco_my_val": (VAL_PATH, VAL_JSON), }

def plain_register_dataset(): DatasetCatalog.register("coco_my_train", lambda: load_coco_json(TRAIN_JSON, TRAIN_PATH)) MetadataCatalog.get("coco_my_train").set(thing_classes=CLASS_NAMES,
evaluator_type='coco', json_file=TRAIN_JSON, image_root=TRAIN_PATH) DatasetCatalog.register("coco_my_val", lambda: load_coco_json(VAL_JSON, VAL_PATH)) MetadataCatalog.get("coco_my_val").set(thing_classes=CLASS_NAMES evaluator_type='coco', json_file=VAL_JSON, image_root=VAL_PATH) `

if you know that ,please tell me ,thank you very much!

kimile599 commented 2 years ago

hey, i got same issue, how do you solve the problem?