NeuralTalkAnimator
NeuralTalkAnimator copied to clipboard
result_struct.json not found/generated
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 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.
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.
@mateuszbuda thanks. rookie mistake. it was my caffe path in getImageFeatures. works now