AI-basketball-analysis icon indicating copy to clipboard operation
AI-basketball-analysis copied to clipboard

Too slow on web server

Open Zames-Chang opened this issue 4 years ago • 9 comments

Since Fast RCNN is a very CPU-bound object detection model, it loop over all sub image to find out possible. Although it does a lot optimization like Dynamic Programming. It still not a good fit on real time object detection.

I recommend you to use yolo4. I is the fastest object detection right now If I am not wrong.

There is python API in file darknet.py. Since I don't have datasets for training, I cannot help you to training deep learning model. Sorry~

Zames-Chang avatar May 27 '20 05:05 Zames-Chang

I know that the efficiency of Faster RCNN is fairly limited. I started with it because of its high accuracy. I need enough accuracy to design the algorithm for this project.

Since I already got a basic structure now, I really should find a way to improve the inference time of each frame. Changing the model to yolov4 would be a really nice approach!

I will work on it once I got time. Thanks!

chonyy avatar May 27 '20 07:05 chonyy

this is a comparison of accuracy and process speed between different object detection model from this article

  • accuracy

  • speed

image

No matter speed or acc, yolo3 > fast R-CNN, we even use better version of yolo3 (yolo4).

Zames-Chang avatar May 27 '20 07:05 Zames-Chang

Fun story, this model is very great. US military use this model on drone to automatically identify enemy and fire them. Because of this application, the author of yolo4 give up object detection field and switch to other research area.

Zames-Chang avatar May 27 '20 08:05 Zames-Chang

hey guys can yall gimme a little advice so i can move in the field of machine learning and deep learning and also i cant run this project ,I am using pop_os ,python 3.6.10 , nvdia gpu

AditSoni avatar Jun 06 '20 18:06 AditSoni

@AditSoni Hey, can you please tell me what error message did you get?

chonyy avatar Jun 06 '20 19:06 chonyy

Screenshot from 2020-06-07 17-28-43 pyopenpose module fails

AditSoni avatar Jun 07 '20 11:06 AditSoni

and now I have got a new error:

Something went wrong when importing OpenPose Debugging middleware caught exception in streamed response at a point where response headers were already sent. Traceback (most recent call last): File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/venv/lib/python3.6/site-packages/werkzeug/wsgi.py", line 506, in next return self._next() File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/venv/lib/python3.6/site-packages/werkzeug/wrappers/base_response.py", line 45, in _iter_encoded for item in iterable: File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/src/app_helper.py", line 19, in getVideoStream datum, opWrapper = openpose_init() File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/src/utils.py", line 443, in openpose_init raise e File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/src/utils.py", line 440, in openpose_init import pyopenpose as op File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/venv/lib/python3.6/site-packages/pyopenpose/init.py", line 1, in from .core import OPose File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/venv/lib/python3.6/site-packages/pyopenpose/core.py", line 1, in from .utils import ClassDict File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/venv/lib/python3.6/site-packages/pyopenpose/utils/init.py", line 2, in from . import op_json File "/home/aditsoni/Workspace/python/Basketball_shot_estimation/AI-basketball-analysis/venv/lib/python3.6/site-packages/pyopenpose/utils/op_json.py", line 7, in from classdict import ClassDict ModuleNotFoundError: No module named 'classdict'

AditSoni avatar Jun 07 '20 12:06 AditSoni

@AditSoni Hi, I think this problem has something to do with your environment setup, please try it on Windows or Ubuntu. Also, feel free to start a new issue since this thread is focusing on how to improve the efficiency.

chonyy avatar Jun 07 '20 17:06 chonyy

@AditSoni Hi, please start a new issue if you encounter any further problems. Thanks!

chonyy avatar Jun 09 '20 08:06 chonyy