MaybeShewill-CV / CRNN_Tensorflow

Convolutional Recurrent Neural Networks(CRNN) for Scene Text Recognition
MIT License
1.03k stars 388 forks source link

getting this error while trying to train model #418

Closed padmareddy21 closed 4 years ago

padmareddy21 commented 4 years ago

python train_shadownet.py --dataset_dir tfrecords --char_dict_path data/char_dict/char_dict.json --ord_map_dict_path data/char_dict/ord_map.json I0813 00:21:33.093167 20187 train_shadownet.py:569] Use single gpu to train the model Traceback (most recent call last): File "train_shadownet.py", line 575, in need_decode=args.decode_outputs File "train_shadownet.py", line 144, in train_shadownet flags='train' File "/home/avenir-dl/Desktop/ocr/CRNN_Tensorflow/tools/data_provider/shadownet_data_feed_pipline.py", line 240, in init raise ValueError('{:s} not exist, please check again'.format(self._tfrecords_dir)) ValueError: tfrecords/tfrecords not exist, please check again

MaybeShewill-CV commented 4 years ago

@padmareddy21 Generate tfrecords first:)

padmareddy21 commented 4 years ago

No I generated using python tools/write_tfrecords --dataset_dir PATH/TO/SYNTH90K_DATASET_ROOT_DIR --save_dir PATH/TO/TFRECORDS_DIR with this command

MaybeShewill-CV commented 4 years ago

@padmareddy21 replace PATH/TO/SYNTH90K_DATASET_ROOT_DIR with your own path

padmareddy21 commented 4 years ago

yes I used my data set's path python write_tfrecords.py --dataset_dir mnt/ramdisk/max/90kDICT32px --save_dir records_dir

MaybeShewill-CV commented 4 years ago

python train_shadownet.py --dataset_dir tfrecords --char_dict_path data/char_dict/char_dict.json --ord_map_dict_path data/char_dict/ord_map.json I0813 00:21:33.093167 20187 train_shadownet.py:569] Use single gpu to train the model Traceback (most recent call last): File "train_shadownet.py", line 575, in need_decode=args.decode_outputs File "train_shadownet.py", line 144, in train_shadownet flags='train' File "/home/avenir-dl/Desktop/ocr/CRNN_Tensorflow/tools/data_provider/shadownet_data_feed_pipline.py", line 240, in init raise ValueError('{:s} not exist, please check again'.format(self._tfrecords_dir)) ValueError: tfrecords/tfrecords not exist, please check again

--dataset_dir tfrecords is the wrong path. It should be the folder dir where the tfrecords was placed.

padmareddy21 commented 4 years ago

tfrecords are generated using this command (python write_tfrecords.py --dataset_dir mnt/ramdisk/max/90kDICT32px --save_dir records_dir) and I am giving same records_dir path exactly

MaybeShewill-CV commented 4 years ago

@padmareddy21 The error log was pretty clear. tfrecords folder was not found. Maybe you can figure it out by yourself:)

tankienleong commented 3 years ago

@padmareddy21 mkdir tfrecords inside records_dir and then move all the tfrecord files into tfrecords folder