karpathy / neuraltalk2

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

init.lua:235: Not a JPEG file: starts with 0x47 0x49 #206

Open beyondguo opened 4 years ago

beyondguo commented 4 years ago

I have more than 10000 pictures to caption. It successfully captioned 1000 pictures and then I got this error:

/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/image/init.lua:235: Not a JPEG file: starts with 0x47 0x49
stack traceback:
        [C]: in function 'load'
        /root/torch/install/share/lua/5.1/image/init.lua:235: in function 'loader'
        /root/torch/install/share/lua/5.1/image/init.lua:388: in function 'load'
        ./misc/DataLoaderRaw.lua:82: in function 'getBatch'
        eval.lua:116: in function 'eval_split'
        eval.lua:173: in main chunk
        [C]: in function 'dofile'
        /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00406670

It dosen't tell me which picture is wrong, I have no idea how to fix this. Can anybody help me?

linghusmile commented 5 months ago

I have more than 10000 pictures to caption. It successfully captioned 1000 pictures and then I got this error:

/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/image/init.lua:235: Not a JPEG file: starts with 0x47 0x49
stack traceback:
        [C]: in function 'load'
        /root/torch/install/share/lua/5.1/image/init.lua:235: in function 'loader'
        /root/torch/install/share/lua/5.1/image/init.lua:388: in function 'load'
        ./misc/DataLoaderRaw.lua:82: in function 'getBatch'
        eval.lua:116: in function 'eval_split'
        eval.lua:173: in main chunk
        [C]: in function 'dofile'
        /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00406670

It dosen't tell me which picture is wrong, I have no idea how to fix this. Can anybody help me?

this picture is a gif not a jpg file