karpathy / neuraltalk2

Efficient Image Captioning code in Torch, runs on GPU
5.51k stars 1.26k forks source link

Skimage module import error when language_eval is set to 1 #139

Closed achag-spec closed 8 years ago

achag-spec commented 8 years ago

Has anyone run into this when training with language_eval set to 1 for computing CIDEr scores?

Traceback (most recent call last): File "myeval.py", line 6, in from pycocotools.coco import COCO File "/var/lib/neuraldata/neuraltalk2/coco-caption/pycocotools/coco.py", line 54, in from skimage.draw import polygon ImportError: No module named skimage.draw /home/adityac/torch/install/bin/luajit: ./misc/utils.lua:17: attempt to index local 'file' (a nil value) stack traceback: ./misc/utils.lua:17: in function 'read_json' ./misc/net_utils.lua:202: in function 'language_eval' train.lua:218: in function 'eval_split' train.lua:305: in main chunk [C]: in function 'dofile' ...tyac/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x004064f0

Then I try to install skimage:

$ pip install skimage Collecting skimage Could not find a version that satisfies the requirement skimage (from versions: ) No matching distribution found for skimage

wrat commented 6 years ago

when I am trying to calculate CIDEr scores with this command

th train.lua -input_h5 coco/cocotalk.h5 -input_json coco/cocotalk.json -start_from model_id.t7 -language_eval 1

Traceback (most recent call last): File "myeval.py", line 6, in from pycocotools.coco import COCO File "/home/cse/Image_Description_project/neuraltalk2/coco-caption/pycocotools/coco.py", line 52, in from skimage.draw import polygon File "/usr/local/lib/python2.7/dist-packages/skimage/draw/init.py", line 1, in from .draw import (circle, ellipse, set_color, polygon_perimeter, File "/usr/local/lib/python2.7/dist-packages/skimage/draw/draw.py", line 5, in from ._draw import (_coords_inside_image, _line, _line_aa, File "init.pxd", line 163, in init skimage.draw._draw ValueError: numpy.dtype has the wrong size, try recompiling. Expected 88, got 96 /home/cse/torch/install/bin/luajit: ./misc/utils.lua:17: attempt to index local 'file' (a nil value) stack traceback: ./misc/utils.lua:17: in function 'read_json' ./misc/net_utils.lua:202: in function 'language_eval' train.lua:218: in function 'eval_split' train.lua:305: in main chunk [C]: in function 'dofile' .../cse/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00406670

@AdityaChaganti have any solution for this ???