neuraltalk2
neuraltalk2 copied to clipboard
can't run prepro.py
python prepro.py --input_json coco/coco_raw.json --num_val 5000 --num_test 5000 --images_root coco/images --word_count_threshold 5 --output_json coco/cocotalk.json --output_h5 coco/cocotalk.h5
I run this code but say
Traceback (most recent call last): File "prepro.py", line 34, in
from scipy.misc import imread, imresize ImportError: No module named scipy.misc
How to solve problem ? T_T
Can you confirm to install scipy probably?
I install scipy with
pip install -U scipy
and run again it say
parsed input parameters: { "output_json": "coco/cocotalk.json", "images_root": "coco/images", "input_json": "coco/coco_raw.json", "word_count_threshold": 5, "max_length": 16, "output_h5": "coco/cocotalk.h5", "num_test": 5000, "num_val": 5000 } Traceback (most recent call last): File "prepro.py", line 240, in
main(params) File "prepro.py", line 157, in main imgs = json.load(open(params['input_json'], 'r')) IOError: [Errno 2] No such file or directory: 'coco/coco_raw.json'
What will i do ?
@thechurem as the error message clearly pointed out, you don't have coco_raw.json file. Follow Karpathy's instructions step by step and everything should work fine