Open OxInsky opened 1 year ago
Great work! Thanks for your share! but i meet error when i run the command:
!bash main.sh voc2007_distill rn50_voc2007 end 16 False voc2007_caption
the information as follow: `Loading trainer: Caption_distill_double Loading dataset: VOC2007_distill captions_train2017 nums: 591753 0% 0/118287 [00:00<?, ?it/s] Traceback (most recent call last): File "train_caption.py", line 219, in main(args) File "train_caption.py", line 154, in main trainer = build_trainer(cfg) File "/content/TaI-DPT/Dassl.pytorch-master/dassl/engine/build.py", line 11, in build_trainer return TRAINER_REGISTRY.get(cfg.TRAINER.NAME)(cfg) File "/content/TaI-DPT/Dassl.pytorch-master/dassl/engine/trainer.py", line 329, in init self.build_data_loader() File "/content/TaI-DPT/Dassl.pytorch-master/dassl/engine/trainer.py", line 352, in build_data_loader dm = DataManager(self.cfg) File "/content/TaI-DPT/Dassl.pytorch-master/dassl/data/data_manager.py", line 67, in init dataset = build_dataset(cfg) File "/content/TaI-DPT/Dassl.pytorch-master/dassl/data/datasets/build.py", line 11, in build_dataset return DATASET_REGISTRY.get(cfg.DATASET.NAME)(cfg) File "/content/TaI-DPT/datasets/voc2007_distill.py", line 92, in init tagged_sent = pos_tag(noum_list) File "/usr/local/lib/python3.7/site-packages/nltk/tag/init.py", line 165, in pos_tag tagger = _get_tagger(lang) File "/usr/local/lib/python3.7/site-packages/nltk/tag/init.py", line 107, in _get_tagger tagger = PerceptronTagger() File "/usr/local/lib/python3.7/site-packages/nltk/tag/perceptron.py", line 167, in init find("taggers/averaged_perceptron_tagger/" + PICKLE) File "/usr/local/lib/python3.7/site-packages/nltk/data.py", line 583, in find raise LookupError(resource_not_found) LookupError:
Resource averaged_perceptron_tagger not found. Please use the NLTK Downloader to obtain the resource:
import nltk nltk.download('averaged_perceptron_tagger')
For more information see: https://www.nltk.org/data.html
Attempted to load taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle
Searched in: - '/root/nltk_data' - '/usr/local/nltk_data' - '/usr/local/share/nltk_data' - '/usr/local/lib/nltk_data' - '/usr/share/nltk_data' - '/usr/local/share/nltk_data' - '/usr/lib/nltk_data' - '/usr/local/lib/nltk_data'
`
I checked the package of mltk, the information as follow:
please help me how to solve this error!thanks!
I also have the second question is that what's the version of the openImages datasets and can provide a link to download the caption json file! thanks!
Hello, have you found the download file 【open_images_train_v6_captions.jsonl】link?
@OxInsky I have never met this nltk related error. I uploaded a copy of cached filtered captions, and you can run the training using the prepared cache file here https://drive.google.com/file/d/1RXpaCC2E492GxnPIkyYvxFSIdqf-76wh/view?usp=sharing
Unzip and put all the files under the project root path should work well.
import nltk
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
nltk.download('wordnet')
After downloading using the above code, the 'nltk' problem is solved.
Great work! Thanks for your share! but i meet error when i run the command:
!bash main.sh voc2007_distill rn50_voc2007 end 16 False voc2007_caption
the information as follow: `Loading trainer: Caption_distill_double Loading dataset: VOC2007_distill captions_train2017 nums: 591753 0% 0/118287 [00:00<?, ?it/s] Traceback (most recent call last): File "train_caption.py", line 219, in
main(args)
File "train_caption.py", line 154, in main
trainer = build_trainer(cfg)
File "/content/TaI-DPT/Dassl.pytorch-master/dassl/engine/build.py", line 11, in build_trainer
return TRAINER_REGISTRY.get(cfg.TRAINER.NAME)(cfg)
File "/content/TaI-DPT/Dassl.pytorch-master/dassl/engine/trainer.py", line 329, in init
self.build_data_loader()
File "/content/TaI-DPT/Dassl.pytorch-master/dassl/engine/trainer.py", line 352, in build_data_loader
dm = DataManager(self.cfg)
File "/content/TaI-DPT/Dassl.pytorch-master/dassl/data/data_manager.py", line 67, in init
dataset = build_dataset(cfg)
File "/content/TaI-DPT/Dassl.pytorch-master/dassl/data/datasets/build.py", line 11, in build_dataset
return DATASET_REGISTRY.get(cfg.DATASET.NAME)(cfg)
File "/content/TaI-DPT/datasets/voc2007_distill.py", line 92, in init
tagged_sent = pos_tag(noum_list)
File "/usr/local/lib/python3.7/site-packages/nltk/tag/init.py", line 165, in pos_tag
tagger = _get_tagger(lang)
File "/usr/local/lib/python3.7/site-packages/nltk/tag/init.py", line 107, in _get_tagger
tagger = PerceptronTagger()
File "/usr/local/lib/python3.7/site-packages/nltk/tag/perceptron.py", line 167, in init
find("taggers/averaged_perceptron_tagger/" + PICKLE)
File "/usr/local/lib/python3.7/site-packages/nltk/data.py", line 583, in find
raise LookupError(resource_not_found)
LookupError:
Resource averaged_perceptron_tagger not found. Please use the NLTK Downloader to obtain the resource:
For more information see: https://www.nltk.org/data.html
Attempted to load taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle
Searched in:
`
I checked the package of mltk, the information as follow:
please help me how to solve this error!thanks!
I also have the second question is that what's the version of the openImages datasets and can provide a link to download the caption json file! thanks!