matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.57k stars 11.69k forks source link

Inference mode CPU slow #866

Open Houd1ny opened 6 years ago

Houd1ny commented 6 years ago

Guys thank you for this project, this repo has a very good API!! I followed "Splash of Color: Instance Segmentation with Mask R-CNN " tutorial and implemented for my own dataset. My trained model runs in 13 seconds on CPU(i7 8 cores) for one image. I would like it to work 3-4 seconds. I have some ideas how to make this work: 1.Compile tensorflow for current process architecture. 2.Use different backbone resnet50 or mobilenet2 (https://github.com/GustavZ/Mobile_Mask_RCNN/) 3.Use smaller images size(How to do this? will pretraining work with different sizes?) 4.NN pruning Is there other thinks I could do? Is is achievable tasks? Thanks in advance.

fastlater commented 6 years ago

@Houd1ny did you achieve any good result with those changes?

Houd1ny commented 6 years ago

@fastlater yes, mobile net works faster

cooleel commented 5 years ago

@Houd1ny Could you please share the config file of running the inference mode on a CPU? I met some problem using my trained model to predict on a CPU, but the same script runs well on GPU. So I wonder if you have some changes in the config. Thanks!

ectg commented 5 years ago

Hi @Houd1ny, Did you get this to work?

I need inference to run at 60 fps on CPU, and it seems unlikely that MRCNN can provide that type of performance.

Houd1ny commented 5 years ago

@ectg Hi No, for my task I just switched to GPU. For your case, I don`t know if it will be possible to run it in real time or it will cost a lot. You should consider other models. Search for something like this https://www.learnopencv.com/deep-learning-based-object-detection-using-yolov3-with-opencv-python-c/

pierricC commented 4 years ago

Hello @cooleel, I face exactly the same issue, did you manage to make it work ?

pierricC commented 4 years ago

Hello @cooleel, I face exactly the same issue, did you manage to make it work ?

pierricC commented 4 years ago

Hello @cooleel, I face exactly the same issue, did you manage to make it work ?

pierricC commented 4 years ago

Hello @cooleel, I face exactly the same issue, did you manage to make it work ?

Adithia99 commented 4 years ago

guys do have the codes , how to detect videos with FPS? i can detect it in real time but dont know formula how to calculate FPS