FewX icon indicating copy to clipboard operation
FewX copied to clipboard

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

Open lllying opened this issue 4 years ago • 4 comments

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'

lllying avatar Aug 20 '20 08:08 lllying

finetune training will generate the support_feature.pkl.

fanq15 avatar Aug 20 '20 09:08 fanq15

Problem solved! Thank you so much!

lllying avatar Aug 20 '20 11:08 lllying

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.

msw6468 avatar Aug 27 '20 05:08 msw6468

Bug fixed.

fanq15 avatar Aug 31 '20 06:08 fanq15