Skip to content

Scaled-YOLOv4: Scaling Cross Stage Partial Network is yolov4-csp. Actual produces erros on CPU so there is a bit modification. There is a small code to build API for newcomers.

Notifications You must be signed in to change notification settings

deshwalmahesh/ScaledYOLOv4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Welcome

Scaled-YOLOv4: Scaling Cross Stage Partial Network is yolov4-csp. Actual produces erros on CPU so there is a bit modification. This is a small code to build API for newcomers. Please refer to this original link for Scaled Yolov4 AKA yolov4-csp

Implementation is in Pytorch but you can use the DarkNet. Please refer to the original documentation.

Why Fork?

If you are here, it means that you must be looking for a way to Deploy Scaled Yolov4 model using CPU. Original implementation uses mishcuda on the model loading itself so it generates error. yolov4-csp is actually Scaled Yolov4.

Steps:

  1. Clone this repo
  2. Navigate to ScaledYOLOv4/
  3. You'll find it empty because all work is done on the yolov4-csp branch
  4. On your terminal, do git checkout yolov4-csp
  5. Store your model weights somewhere and edit the weights variable inside API_deploy_CPU.py (Optional)
  6. run python API_deploy_CPU.py. It'll deploy a very very basic model on flask
  7. Input the path to weights on terminal
  8. Use postman or requests module to send the request at localhost:5000/predict. Check the port number first.
  9. Results returned are list of lists in the form of [ [x_min, y_min, x_max, y_ax, class, conf_score], [......], .....[...], ]

I can bet You've missed step No 4 ;)

Note:

Code for this API is built around a Single class model. Please change and tweak the code given in detect.py according to your needs.

About

Scaled-YOLOv4: Scaling Cross Stage Partial Network is yolov4-csp. Actual produces erros on CPU so there is a bit modification. There is a small code to build API for newcomers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published