fanq15 / FewX

FewX is an open-source toolbox on top of Detectron2 for data-limited instance-level recognition tasks.
https://github.com/fanq15/FewX
MIT License
347 stars 48 forks source link

No such file or directory: './support_dir/support_feature.pkl' #9

Open lllying opened 4 years ago

lllying commented 4 years ago

Thanks for your code! but I meet this error when I run your code on COCO dataset, could you please tell me what is this file for?and where could I get it?It seems that the file,train_support_df.pkl,and 10_shot_support_df.pkl organize the support data, so I'm confused about this error.

[08/18 14:15:37 d2.evaluation.evaluator]: Start inference on 5000 images /home/ly/anaconda3/envs/py3_torch151/lib/python3.7/site-packages/setuptools/distutils_patch.py:26: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first. "Distutils was imported before Setuptools. This usage is discouraged " Traceback (most recent call last): File "fsod_train_net.py", line 118, in args=(args,), File "/home/ly/anaconda3/envs/py3_torch151/lib/python3.7/site-packages/detectron2/engine/launch.py", line 62, in launch main_func(args) File "fsod_train_net.py", line 101, in main res = Trainer.test(cfg, model) File "/home/ly/anaconda3/envs/py3_torch151/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 516, in test results_i = inference_on_dataset(model, data_loader, evaluator) File "/home/ly/anaconda3/envs/py3_torch151/lib/python3.7/site-packages/detectron2/evaluation/evaluator.py", line 141, in inference_on_dataset outputs = model(inputs) File "/home/ly/anaconda3/envs/py3_torch151/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(input, **kwargs) File "/home/ly/few-shot-object-detection/FewX-master/fewx/modeling/fsod/fsod_rcnn.py", line 126, in forward self.init_model() File "/home/ly/few-shot-object-detection/FewX-master/fewx/modeling/fsod/fsod_rcnn.py", line 302, in init_model with open(support_file_name, 'wb') as f:

FileNotFoundError: [Errno 2] No such file or directory: './support_dir/support_feature.pkl'

fanq15 commented 4 years ago

finetune training will generate the support_feature.pkl.

lllying commented 4 years ago

Problem solved! Thank you so much!

msw6468 commented 4 years ago

Hello. I still have this problem. when I ran this code, it never made the support_feature.pkl... (even ./support_dir/)

After I made /support_dir manually, it works.

fanq15 commented 4 years ago

Bug fixed.