Closed GeorgeTouros closed 3 years ago
never seen that. @lobracost can you check as well?
I've checked and it works
analyze_visual|master⚡ ⇒ python3 analyze_visual.py -f ../V236_9150000.mp4 Using: cpu Using cache found in /Users/tyiannak/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub Using cache found in /Users/tyiannak/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub Began processing video : ../V236_915000__0.mp4 FPS = 23.976023976023978 Duration = 40.04 - 00:00:40.03 Finished processing on video :../V236_9150000.mp4 processing time: 00:03:09.44 processing ratio 1.1 fps processing ratio time 473 % Actual shape of feature matrix without object features: (200, 52) Shape of features' stats found: (208,) Number of shot changes: 19 Shape of feature matrix including object features (after smoothing object confidences): (198, 88) Shape of feature stats vector including object features (after smoothing object confidences): (244,)
@GeorgeTouros This is a known problem for the Nvidia's hub repo. I managed to fix it by editing a file from the repo. This manipulation is done only at the first time when the code is downloaded. Specifically these are the lines I wrote https://github.com/tyiannak/multimodal_movie_analysis/blob/cd91680daf675fa80f767885231951f9ec0943f7/analyze_visual/object_detection/generic_model.py#L52-L105
I tried it many times in the past and conclude that it works well for empty frames (I tried empty videos too). So I suggest you to remove the nvidia code (i.e. erase the contents of the directory home/zappatistas20/.cache/torch/) and run the script again. This way Nvidia's code will be fixed from our script.
Tell me if this works.
@lobracost do I have to pull again from master before I do this check?
@lobracost do I have to pull again from master before I do this check?
No I think it's fine if you don't pull.
Thanks @lobracost works fine after following your instructions. This NVIDIA model has been quite a pleasant experience to work with :stuck_out_tongue_closed_eyes:
Hello! I am trying to extract features from this video
I am using the following command:
python analyze_visual.py -f ../data/V236_915000__0.mp4
and I am getting the following result:Up to a point in the video, the process runs very smoothly. The same happens with a few other videos in my collection as well.
My guess is that there's an empty frame hidden somewhere in the file, and as a result an empty tensor is passed in the bboxes_out argument in decode_single. What would be the best way to try/catch this and return 0 or NaN, or just skip the frame completely, so that the process completes?
Thanks!