Closed MuruganR96 closed 4 years ago
i was bit confused. please once explain me, help me anyone :)
i was tried this way.
python drive/My\ Drive/OpenNMT-py/translate.py -data_type img -model drive/My\ Drive/Pretrained_Word_Embeddings/detectron_table_detection/model.pt -src_dir drive/My\ Drive/datasets/table_dataset_sample/8.jpg \ -output pred.txt -max_length 150 -beam_size 5 -gpu 0 -verbose
i am getting same issue. i don't know what is -src_dir & -src
usage: translate.py [-h] [-config CONFIG] [-save_config SAVE_CONFIG] --model MODEL [MODEL ...] [--fp32] [--avg_raw_probs] [--data_type DATA_TYPE] --src SRC [--src_dir SRC_DIR] [--tgt TGT] [--shard_size SHARD_SIZE] [--output OUTPUT] [--report_bleu] [--report_rouge] [--report_time] [--dynamic_dict] [--share_vocab] [--random_sampling_topk RANDOM_SAMPLING_TOPK] [--random_sampling_temp RANDOM_SAMPLING_TEMP] [--seed SEED] [--beam_size BEAM_SIZE] [--min_length MIN_LENGTH] [--max_length MAX_LENGTH] [--max_sent_length] [--stepwise_penalty] [--length_penalty {none,wu,avg}] [--ratio RATIO] [--coverage_penalty {none,wu,summary}] [--alpha ALPHA] [--beta BETA] [--block_ngram_repeat BLOCK_NGRAM_REPEAT] [--ignore_when_blocking IGNORE_WHEN_BLOCKING [IGNORE_WHEN_BLOCKING ...]] [--replace_unk] [--phrase_table PHRASE_TABLE] [--verbose] [--log_file LOG_FILE] [--log_file_level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET,50,40,30,20,10,0}] [--attn_debug] [--dump_beam DUMP_BEAM] [--n_best N_BEST] [--batch_size BATCH_SIZE] [--gpu GPU] [--sample_rate SAMPLE_RATE] [--window_size WINDOW_SIZE] [--window_stride WINDOW_STRIDE] [--window WINDOW] [--image_channel_size {3,1}] translate.py: error: the following arguments are required: --src/-src
here docuentation (Image to text ) they said,
python translate.py -data_type img -model demo-model_acc_x_ppl_x_e13.pt -src_dir data/im2text/images \ -src data/im2text/src-test.txt -output pred.txt -max_length 150 -beam_size 5 -gpu 0 -verbose
-src_dir: The directory containing the images.
then why i need -src data/im2text/src-test.txt ?
we want image to text. but src why txt. what is that can any one clarify me.
Thank you all
solution here.:)
https://github.com/OpenNMT/OpenNMT-py/issues/1533#issue-482436956
i was bit confused. please once explain me, help me anyone :)
i was tried this way.
i am getting same issue. i don't know what is -src_dir & -src
here docuentation (Image to text ) they said,
-src_dir: The directory containing the images.
then why i need -src data/im2text/src-test.txt ?
we want image to text. but src why txt. what is that can any one clarify me.
Thank you all