tGrabs says video is empty #146
Replies: 36 comments 1 reply
-
This could have likely been an instance of a nullpointer that wasn't checked. Should be fixed with the next release. Thank you for the report! |
Beta Was this translation helpful? Give feedback.
-
Getting a similar case sometimes, but seemlingly only for a really short (5 sec) video and not 4-12h ones, e.g.: [16:01:06] pv::File<V7, 921.67KB, '/Users/roaldarbol/tracking/trex/experiments/2022-02-01/videos_pv/2022-02-01_16.39.58_vid1', [1280 x 720], 0 frames, no mask>
crop_offsets: [0,0,0,0]
Time of recording: 'Wed Feb 2 16:01:06 2022'
Length of recording: '00d:00h:00m:00s'
Framerate: -1fps (0ms)
Metadata empty.
[16:01:06] Property<float>('gui_interface_scale') = 1
[16:01:07] Creating images.
0 TGrabs 0x000000010de8ee2e _ZL9dumpstackv + 46
1 TGrabs 0x000000010de864ca _ZL14signal_handleri + 810
2 libsystem_platform.dylib 0x00007fff20472d7d _sigtramp + 29
3 ??? 0x0000000000000000 0x0 + 0
4 TGrabs 0x000000010de6d853 _ZN4grab3GUI11update_loopEv + 371
5 TGrabs 0x000000010de8b2f2 main + 19522
6 libdyld.dylib 0x00007fff20448f3d start + 1
7 ??? 0x0000000000000009 0x0 + 9
FATAL: Segmentation Fault. Logged StackTrace
libc++abi: terminating with uncaught exception of type cv::Exception: OpenCV(4.3.0) /Users/tristan/opt/miniconda3/envs/trex/conda-bld/trex_1642026671057/work/Application/build/opencv/src/CustomOpenCV/modules/core/src/ocl.cpp:4867: error: (-215:Assertion failed) u->refcount == 0 && "UMat deallocation error: some derived Mat is still alive" in function 'deallocate'
Converted /Users/roaldarbol/tracking/trex/experiments/2022-02-01.
/Users/roaldarbol/Downloads/2022-02-01_16.39.58_vid1.mp4
Using conda prefix '/opt/anaconda3/envs/tracking/bin/'.
Calling '/opt/anaconda3/envs/tracking/bin/TRex.app/Contents/MacOS/TRex -d /Users/roaldarbol/tracking/trex/experiments/2022-02-01/results -i ../videos_pv/2022-02-01_16.39.58_vid1.pv -s /Users/roaldarbol/tracking/trex/trex_beetles.settings -log_file track_2022-02-01_16.39.58_vid1.log -track_max_individuals 1 -auto_quit -auto_no_results'... |
Beta Was this translation helpful? Give feedback.
-
I am looking into this at the moment, just so you know. I have an explanation for the short videos (namely that, at least in my current dev version) sometimes more or fewer frames are getting into the final video (we are talking like max. ~10 frames here). But the error you have there is part of the GUI and should be fixed (6279d0e) once I finish my updates. v1.1.7 will take some time, because it ships a lot of internal changes, but I am working hard on it :-) At least the code will be much nicer (which nobody other than me cares about)! If this is currently a breaking thing for you, you can try compiling the dev-branch (at your own risk). |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for this info! I was already periodically checking if the update was already up. Can you give a rough eta of it? If it's still a few months out, it might be worth trying the dev-branch. |
Beta Was this translation helpful? Give feedback.
-
I think this week seems realistic :-) I am currently just running tests and fixing some visual bugs. Will keep you posted! |
Beta Was this translation helpful? Give feedback.
-
Not sure you have seen, but I updated the software recently. Let me know if it does/doesn't work for you :-) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the notification!
Let me know which information you need and I'll be happy to help how I can. |
Beta Was this translation helpful? Give feedback.
-
Just updated (well, reinstalled as I had to reinstall everything conda...) to
This doesn't matter to me too much, but it also seems that performance has decreased dramatically. I used to run TGrabs at around 250fps on my Mac, but now it's running at max. 90fps. I'll update once I've run it a bit more, but also happy to test out more if needed. |
Beta Was this translation helpful? Give feedback.
-
Hey, @StefanMPopp So first of all I released a version 1.1.7 which I had to retract - so probably should update again (sorry). Let me know if this helps, or if you are seeing the same issue. If so, is it reproducible/always empty? Now to 118: interesting. Compared to which version is it much slower? I have had a similar decrease in performance and simply deactivate and reactivate of the environment somehow fixed it for me. Not sure what happened there. Next, the empty video does not seem to have a problem though that it find's on your side. Whereas the other Problem report seems connected to a crash that does not happen anymore on my side with 118. Does your video have a size on the file browser? Also, are there individuals / frames actually processed? It seems that it just ends, or no objects are found. And is this reproducible? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! My reinstallation was not due to TRex, just having multiple anaconda installations and a lot of path issues. ;-)
Deactivating and reactivating the environment makes no difference for me. Very odd. |
Beta Was this translation helpful? Give feedback.
-
Hm. Are you sure this is a new version? OpenCV 4.3.0 is not in use and has not been for a long time. Either your paths are weird, or I made a mistake with my build, or this is an old version! I am using OpenCV 4.5.5 statically linked. |
Beta Was this translation helpful? Give feedback.
-
Good question. The |
Beta Was this translation helpful? Give feedback.
-
Check if you have any environment variables pointing anywhere - like in PATH or something like that. Although I am worried how they could get in there anyway, since its a static link (does only depend on the ffmpeg extension of OpenCV, not any other DLLs). If you use Anaconda Powershell (which you should), you can enter:
also |
Beta Was this translation helpful? Give feedback.
-
Oh, sorry - is this macOS? @roaldarbol |
Beta Was this translation helpful? Give feedback.
-
Yup, MacOS.
and inside the env I get
I think it is due to reinstalling anaconda - I've just installed
So I guess if I can add |
Beta Was this translation helpful? Give feedback.
-
Actually, it seems that it's setting the frame rate correctly a bit further up, but maybe just prints the wrong value further down?
|
Beta Was this translation helpful? Give feedback.
-
Lastly, this is a log from a few days ago for comparison - and found in the TRex log that I was running v
|
Beta Was this translation helpful? Give feedback.
-
Since it is cropped off - is there a frame_rate in the end? If you finish converting the video, can you let me know what |
Beta Was this translation helpful? Give feedback.
-
I can tell you when it's done tracking sometime tomorrow. If you see the log however, it states Should I create a separate issue about the performance decrease or are you happy to proceed with it here? It seems to have occured in switching from 1.1.6 to 1.1.8. |
Beta Was this translation helpful? Give feedback.
-
I can confirm the performance drop to ~20% of the previous frame rate. The pvinfo of a video I just converted correctly states 25fps (40ms). |
Beta Was this translation helpful? Give feedback.
-
Thank you for your investigation, didn't expect people to be doing things at this hour - but who knows where you are! I am compiling a new version for you and it'll be uploaded tomorrow. This is interesting, however, because across all of my systems I currently get around a 10% speed INCREASE. Wondering what's going wrong. I will post here once I updated the conda repo! BTW: This is just tgrabs with the performance decrease, not trex - right? |
Beta Was this translation helpful? Give feedback.
-
Haha, yeah this was a late night session - I always leave it to track overnight. ;-) Thank YOU for being so swift. @StefanMPopp whew, at least that confirms my computer has not just gone bonkers. Mine is still running TGrabs, will update once TRex has been doing its thing. |
Beta Was this translation helpful? Give feedback.
-
UPDATE: TRex runs just fine - and I see an increased performance from ~1100 fps to ~1500 fps 🥳 |
Beta Was this translation helpful? Give feedback.
-
Arizona here ;) |
Beta Was this translation helpful? Give feedback.
-
🥳🥳🥳 I'm seeing the same as @StefanMPopp, works well again and even with a ~10% performance increase! Thanks a ton @mooch443! |
Beta Was this translation helpful? Give feedback.
-
Wow that's insane. Well, I have just uploaded an update 1.1.8_1 and would like to hear if this improves anything - at least OpenCV is now not compiled in Debug mode anymore. :-) If you are running into trouble/too high CPU, try disabling threading in some parts via new options: If you set these to false, fewer threads will be doing things in parallel. I have no way to test whether these improve/break things on other systems, so if you could give me some feedback on their effects that'd be super helpful! On all of my systems CPU increased, but also the conversion/tracking speed. Glad to hear that it works well now though, both of you! Still would like to hear how the above parameters affect it. On my Linux machine it works better if I disable Actually, @StefanMPopp, you seem to have downloaded before I uploaded 2-3 hours ago, so I am wondering why it changed for you at all :-D These options I mentioned are only available in this new upload, so you probably have to install it again if you wanna test, sorry :S |
Beta Was this translation helpful? Give feedback.
-
I'll give it a test on Tuesday. 👍🏼 @mooch443 I noticed that the conda on trex.run had reverted to 1.1.7 earlier in the day, so maybe that's what @StefanMPopp had reverted to. |
Beta Was this translation helpful? Give feedback.
-
After a quick test, setting |
Beta Was this translation helpful? Give feedback.
-
Going to use this as an opportunity to try out the Discussions feature, seeing as this is not a "bug" per-se. |
Beta Was this translation helpful? Give feedback.
-
I was annoyed that I couldn't re-open this issue anyway. On my Linux machine I don't see any significant improvement with disabling either _use_threads. |
Beta Was this translation helpful? Give feedback.
-
I cut long videos into 30min pieces with an FFmpeg script and run trex over the shorter videos. On some, trex works just fine, while with others it creates averages but then indicates that the video contains 0 frames with a framerate of -1.
I tried doing the FFmpeg conversion several times with reproducible outcome.
I run the latest trex version.
Any pointers to how to resolve this?
Thank you!
One case:
Another, slightly different case:
Beta Was this translation helpful? Give feedback.
All reactions