-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object detection speed in a high-resolution camera #14
Comments
Here are my thoughts:
|
Also, if you want the ultimate in frame rate @ 5 MP, there are options, but they are not going to be super easy:
|
OK on a Custom Desktop Intel Core i7-5820K CPU @ 3.30GHz GeForce GTX 970 GPU with CUDA 7.5, I get 108 FPS with However, during the course of testing I uncovered some very strange behavior that is likely related to your problem and that I don't understand yet:
The first issue is puzzling and annoying and definitely needs to be fixed. Can you try to reproduce this issue on your end? |
To your points in the first comment:
I tried to compile in debug, but looks like there is a problem with boost:
I also ran into an issue with RAM and encoding. I have 8 GB, and they fill up within about 20 seconds, then goes into swap. Memory load persists for up to a minute after oat is killed (if I catch it before RAM runs out), but writing threads keep going and go away and clear memory after a while . This only happens when I am writing video to hard drive. Would adding memory help with this? |
|
- This addresses part of #14 - Linker was not being provided with a complete set of libraries during test compilation and this was causing linking issues in some build environments.
OK, I just fixed the |
Awesome, thanks! I should be able to test that soon. I ordered an SSD as well, so we'll see if it mitigates the issue of writing. The framerate of the webcam is currently 15 FPS, I don't think I can influence it at all. Off-topic question: Have you figured out a way to sync frames to open-ephys data? Thanks! |
Yeah, webcams seems like in general they should be treated as asychronous IO. Basically, they are gonna do what they're gonna do and you just have to write down the timestamps of frames. In 89498c0 I introduced a montonic timer that measures and packs the arrival time with each frame (in microseconds) when using The For these reasons, it might be good to have a text file saved with each video that specifies timing information of each frame within the video. Packing them with the video seems complicated and not simple to parse. What do you think? I wonder if we will have to save uncompressed video to ensure no frame loss. I am not sure. Answer to off topic question: Yes, but lets move that discussion to the OE forums so others may benefit more directly from the answer. |
I have begun to understand why CUDA does not seem to be working in |
How about saving the timing in json along with position information? A separate file might be ok as well, but since in most cases there will be a tracking file already, why not use it at least. As far as CUDA, I am not in a good positiion to test this right now, but I can try in a couple of weeks. It does not seem like a huge hurdle to wait a minute. I wonder if this varies with GPU. Discussion in forums created here |
|
I finally set up my hi-res camera on a nicer computer with 2 processors (24 threads) and 16 Gb of RAM. It seems that Oat can indeed keep up with tracking, but recording video still does not work. Strangely, it records the same amount of video data to a regular hard drive and an SSD (1m52s vs 2m06s) before all 16 Gb fill up. However, all 24 threads are working at 100% capacity throughout... I wonder if they just can't keep up with the encoding. The resulting file is 861 Mb, so 861Mb/130s=7Mb/s, right? Is there a way to try a less demanding codec or less compression perhaps? |
All right, recording uncompressed video seems to work even with a HDD. I just changed the line The resulting files are huge, but hey, it works. |
Hi Jon, Since you are refactoring things, what do you think about adding an option to change the encoding type? I've been recording non-compressed, raw video files. That works quite well and leaves processing power for real-time stuff. I just compress everything at the end of the day using ffmpeg. However, it would be nice to have the option to have some frameserves being compressed on the fly and some raw. The compression option would just switch from
in Recorder.cpp, line 287 to
|
yes! Great idea. I will certainly do that. I'm refactoring oat-record now and will be sure to do that. I'm almost done here -- all but two components (oat-record and oat-posigen) to go. I hope it won't take too much longer. |
OK, I'm closing this since |
We are getting slow object detection using a 5MP, 2448 x 2048 Point Grey Blackfly camera.
Frameserve is fast, about 22 fps I think, which I set manually as it is the declared capability of the device. MOG slows it down dramatically, and object detection does though not as much as MOG. I did not time it but MOG+detection feels like 1fps, and bsub+detection seems like 5 fps.
I'd prefer to keep the resolution if possible, we ordered a Point Grey for that reason. I am considering keeping real-time detection on a webcam and saving the video from the Point Grey for further off-line analysis.
Thanks!
The text was updated successfully, but these errors were encountered: