NeuralTalkAnimator icon indicating copy to clipboard operation
NeuralTalkAnimator copied to clipboard

result_struct.json not found/generated

Open adamhrv opened this issue 9 years ago • 3 comments

When I run: python extract.py there seems to be something missing and it's not creating theresult_struct.json file in the videos/myvideofile/ directory.

(5/6) createImageOverlay: videos/2001_test_02 Traceback (most recent call last): File "extract.py", line 165, in <module> extractVideo(mypath+video,mypath+foldername,captionfrequency) File "extract.py", line 139, in extractVideo addToList(outputdir,framefreq, framerate) File "extract.py", line 104, in addToList getImageFeatures(inputdir,framerate) File "extract.py", line 87, in getImageFeatures getImageSentence(inputdir,framerate) File "extract.py", line 76, in getImageSentence createImageOverlay(inputdir,framerate) File "extract.py", line 46, in createImageOverlay with open(inputdir + '/result_struct.json') as data_file: IOError: [Errno 2] No such file or directory: 'videos/2001_test_02/result_struct.json' The script successfully generates still frames for the video file and creates the audio file. It stops at (5/6) where it tried to load the .json file

adamhrv avatar Apr 15 '16 16:04 adamhrv

@adamhrv each processing step in extract.py script is executed as a subprocess. If one of those steps fails (in your case the one that generates captions for selected frames) the execution is not interrupted. My advice is to print those commands that are executed and call them 'manually' and check if they work and produce what they should. I guess that maybe you don't have caffe installed or you may need to change its installation path that is passed to extract_features.py called in method getImageFeatures (it's set to /caffe by default). You will also notice that imagernn folder is in the wrong place in directory structure so you need to move it one level up from vis_resources.

mateuszbuda avatar Apr 17 '16 08:04 mateuszbuda

Not entirely sure what is going wrong on your end. I would recommend looking into newer backends anyhow, e.g. neuralnets for video recog. Check GitXiv, there are a couple libs there.

samim23 avatar Apr 17 '16 09:04 samim23

@mateuszbuda thanks. rookie mistake. it was my caffe path in getImageFeatures. works now

adamhrv avatar Apr 19 '16 15:04 adamhrv