Giter Site home page Giter Site logo

yolov5-inference-ec2's Introduction

Yolov5 trained on nlf helmet detection - inference on ec2

installation (on ec2 console)

  • clone this repository
  • create conda env
  • in the root folder, execute pip install -r requirements.txt
  • in the root folder, execute gunicorn --bind=0.0.0.0:8080 server:app

you should see

[2021-09-09 12:52:20 +0000] [45903] [INFO] Starting gunicorn 20.1.0
[2021-09-09 12:52:20 +0000] [45903] [INFO] Listening at: http://0.0.0.0:8080 (45903)
[2021-09-09 12:52:20 +0000] [45903] [INFO] Using worker: sync
[2021-09-09 12:52:20 +0000] [45904] [INFO] Booting worker with pid: 45904

how to use

In main.py you can find two endpoint:

  • [base_path]/ -> [GET] return a simple string, useful for testing the connectivity
  • [base_path]/predict ->[POST] accept image as param, return the bounding boxes for each helmet detected in this format:
{
   "b_boxes_positions":[
      {
         "class":0.0,
         "confidence":0.8507136106491089,
         "x1":980.6962890625,
         "x2":1015.0054931640625,
         "y1":523.5577392578125,
         "y2":555.052978515625
      },
      ...
      ]
   }

model

in the model folder you can find the weigths for the yolov5s trained on nfl dataset. More details: https://www.kaggle.com/c/nfl-health-and-safety-helmet-assignment

Note: this was for educational purpose, trained with few epochs. Performance was not the main goal!

yolov5-inference-ec2's People

Contributors

francescotaioli avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.