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

Error #6

Open
OxInsky opened this issue Sep 8, 2023 · 4 comments
Open

Error #6

OxInsky opened this issue Sep 8, 2023 · 4 comments

Comments

@OxInsky
Copy link

OxInsky commented Sep 8, 2023

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:

image

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!

@wzhiyuan2016
Copy link

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:

image

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?

@guozix
Copy link
Owner

guozix commented Sep 23, 2023

Refer to this issue to prepare the data.

@guozix
Copy link
Owner

guozix commented Oct 16, 2023

@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.

@iamxiaoyubei
Copy link

iamxiaoyubei commented Nov 27, 2023

import nltk
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
nltk.download('wordnet')

After downloading using the above code, the 'nltk' problem is solved.

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

No branches or pull requests

4 participants