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

[Learning a unified label space]: FileNotFoundError: [Errno 2] No such file or directory for "json.load(open(unified_label_file, 'r'))" #9

Open
jichengyuan opened this issue Jul 24, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@jichengyuan
Copy link

jichengyuan commented Jul 24, 2021

Hi,

thank you for this awesome idea on this nice multi-dataset-object-detectror.

I've trained a "Partitioned detector" on coco, oid and obejcts365-V2. (for V2, because MEGVII have updated their dataset, we could not download v1 anymore.)

When I tried the second step: Learning a unified label space:
I followed the tutorial and run:

python projects/UniDet/train_net.py \
--config-file projects/UniDet/Partitioned_COI_R50_2x.yaml \
--num-gpus 1 \
--eval-only MULTI_DATASET.UNIFIED_EVAL True

It raised a "FileNotFoundError". When I checked config file, I found that the key "UNIFIED_LABEL_FILE" in the config file has been set as ' ' (None), as shown in images below.

Could you give me some hints about how could I generate this this file or label space?

many thanks!

FileNotFoundError:

fileNotFoundErroe_unified_label

config.yaml:

UNIFIELD_LABEL_FILE

@jichengyuan jichengyuan added the documentation Improvements or additions to documentation label Jul 24, 2021
@jichengyuan
Copy link
Author

I also tried with the command below for “Learning a unified label space”:

python projects/UniDet/train_net.py \
--config-file projects/UniDet/Partitioned_COI_R50_2x.yaml \
--num-gpus 1 \
--eval-only \
MULTI_DATASET.UNIFIED_EVAL True \
MODEL.WEIGHTS output/UniDet/Partitioned_COI_R50_2x/model_final.pth \
MULTI_DATASET.UNIFIED_LABEL_FILE datasets/label_spaces/manual.json

Then I got very low mAP:

learning_unified_label_space

but when I validated the model as partitioned detectors, it works fine:

python projects/UniDet/train_net.py \
--config projects/UniDet/configs/Partitioned_COI_R50_2x.yaml \
--eval-only \
--num-gpus 1 \
MODEL.WEIGHTS output/UniDet/Partitioned_COI_R50_2x/model_final.pth

partitioned_validation

@HXZhong1997
Copy link

Same question when I tried to train on my two custom datasets. Didn't have a clue yet 😢

@jichengyuan
Copy link
Author

I have checked this file "projects\UniDet\unidet\evaluation\multi_dataset_evaluator.py"

For the "_unified_results", the label_space is a specific one (such as coco) rather than a unified label space.

That means, if we execute an evaluation on coco dataset, the "_unified_results" from the unified detector is same as the the "coco_results" from the partitioned detector.

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

No branches or pull requests

2 participants