giangnguyen2412 / Neural-Baby-Talk-python3

NBT with some changes to run smoothly with python3
MIT License
16 stars 3 forks source link

FileNotFoundError: [Error 2] No such file or directory: 'java' #5

Closed hengqiali closed 5 years ago

hengqiali commented 5 years ago

Why occur such error when i run main.py?

giangnguyen2412 commented 5 years ago

could you post the full log

hengqiali commented 5 years ago

when I do novel object caption,there is an error when I finished the first epoch. I think the error is occur when I decode the novel word. Have you ever met this question? I print the prediction for 5000 val images. It is right. when I do the nov_eval I met this question. Traceback (most recent call last): File "main.py", line 376, in lang_stats = eval(opt) File "main.py", line 183, in eval lang_stats = utils.noc_eval(predictions, str(1), opt.val_split, opt) File "/media/userdisk1/hq/gyq/Neural-Baby-Talk-python3-master/misc/utils.py", line 316, in noc_eval out = score_dcc(gt_template_novel, gt_template_train, pred, noc_object, split, cache_path) File "tools/sentence_gen_tools/coco_eval.py", line 123, in score_dcc score_dict = dcc_evaluator.get_dcc_scores() File "tools/sentence_gen_tools/coco_eval.py", line 46, in get_dcc_scores gts = tokenizer.tokenize(gts) File "tools/coco-caption/pycocoevalcap/tokenizer/ptbtokenizer.py", line 52, in tokenize stdout=subprocess.PIPE) File "/home/C/hq/anaconda3/envs/neuralbabytalk/lib/python3.5/subprocess.py", line 676, in init restore_signals, start_new_session) File "/home/C/hq/anaconda3/envs/neuralbabytalk/lib/python3.5/subprocess.py", line 1289, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'java'

giangnguyen2412 commented 5 years ago

Did you try this? https://github.com/jiasenlu/NeuralBabyTalk/issues/39

Cathyttt commented 4 years ago

It's not the same question. This is

FileNotFoundError:` [Errno 2] No such file or directory: 'java'

But what you referred is

FileNotFoundError: [Errno 2] No such file or directory: 'data/coco_noc/annotations/captions_split_set_bus_val_test_novel2014.json'

Cathyttt commented 4 years ago

So is there someone figure it out?

giangnguyen2412 commented 4 years ago

I am supposing that this is an error when you dont have Java installed. Could you validate?

Cathyttt commented 4 years ago

Thanks for your quick reply! It's true that I don't have java installed. After it's installed I'll try it again and post it on this issue.

Cathyttt commented 4 years ago

It works after installing java. Thanks!

shizhediao commented 2 years ago

Solved by:

sudo apt-get install default-jre
sudo apt-get install default-jdk