6
Oct 01 '18
I've actually seen this article before. I was wondering ... when you actually run this algorithm over these videos is the result that you're showing here, sped up, or is this how it actually ran on your machine? Because I ran the results on my laptop and it took the algorithm 7.5 minutes to process a 5 second clip
5
u/spmallick Oct 02 '18
It is not real time. If you look on the top right corner, in small font you can see it says each frame takes about 2 seconds to process on a CPU. Even the GPU implementation is Caffe2 and Tensorflow are about 5 FPS.
3
Oct 02 '18
Ah so this video is actually took closer to an hour for the computer to process through right? maybe longer?
3
u/spmallick Oct 02 '18
30 fps x 30 seconds x 2 seconds / frame = 1800 seconds. Yeah so half hour or so.
5
u/its_not_me_boss Oct 01 '18
How close is it to real time? On a single gpu, let's say a 1060TI
8
u/spmallick Oct 01 '18
Mask R-CNN is not real time. On a GPU it is around 5 FPS. If you use a GPU, you should try the Tensorflow / caffe2 version and not the OpenCV version.
3
u/its_not_me_boss Oct 02 '18
Is there any other segmentation method with at least similar accuracy that works in real time?
3
12
u/nazipanzer Oct 01 '18
What's the performance and what's the hardware?
3
Oct 02 '18
Would really like an answer to this
3
u/Orothrim Oct 02 '18
Would really, really like an answer to this.
7
u/sunitanyk Oct 02 '18
The results in this tutorial are obtained using a Mac OS 2.5 GHz Intel Core i7 CPU. The inference time is from 350 ms to 2 seconds per frame on the CPU, depending on the complexity and number of objects in the frame.
This info is already there in the top left corner in the video..its in very small font though..I have updated the post also with this now.
1
u/vraGG_ Oct 01 '18
Nice.
I've been struggling with getting MRCNN to work lately; mostly because it requires some old libraries/cuda etc.
2
u/spmallick Oct 01 '18
This will run on the CPU (very efficiently), but not on GPU. OpenCV's support for GPUs is sorely lacking.
1
u/vraGG_ Oct 01 '18
Yes, I compiled TF-GPU, but the issue was I used CUDA 9.2 and TF 1.8 (If I recall correctly), which raised various errors (if I recall it was in detection phase, training went through fine).
Now I will try to compile TF 1.7 (I think it was?) for CUDA 9.0, but I also have to figure out how to get conda environments working so I can switch different CUDA versions... I hope it doesn't require old GPU drivers also, because that's going to be a problem...
1
1
u/soulslicer0 Oct 02 '18
Does maskrcnn speed vary depending on the number of objects?
2
u/tonykak Oct 02 '18
The answer is yes, but only marginally. The heavy computations (feature extraction layers) are done once per image (frame). Then, there are three smaller networks that run for every object.
1
u/sunitanyk Oct 02 '18
It does vary..If you see closely in the above video, the inference time is close to 2 s per frame for the cars and marathon part, but its down to around 350 ms for the airplane in the sky. This information is in the top left part of the video, but in very small fonts though..I should have put in bigger fonts.. will take care of it next time..
1
u/IGuessSomeLikeItHot Oct 02 '18
Is it possible to get it to recognize the make and model of cars?
2
1
u/Rdlgo Oct 02 '18
We have a commercial make/model/body style/model year classifier online at Algorithmia(*). It uses Inception right now, trained on our own (huge) dataset. It would fit quite easily with this code, just need to have the mask for all the images in our dataset.
We are working on a new release for object detection (bounding boxes) with SSD. I’m guessing that the approach we’re using for SSD would be very similar to the approach to implement Mask R-CNN. Maybe we find some time after the next release.
(*) https://algorithmia.com/algorithms/LgoBE/CarMakeandModelRecognition
1
10
u/spmallick Oct 01 '18
Post
https://www.learnopencv.com/deep-learning-based-object-detection-and-instance-segmentation-using-mask-r-cnn-in-opencv-python-c/
Code
https://github.com/spmallick/learnopencv/tree/master/Mask-RCNN