Skip to content

dhritidarbdydig/MLAI-community-labs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MLAI-community-labs

Labs that explain complex ML/AI ideas simply with code.

Training a ML box detector

Using Azure custom vision and cognitive service, we are training a model to detect boxes, once a box is detected it will notify the user along with an image showing where the box is.

Requirements

In a Nutshell

  • Install all the required modules from requirements.txt pip install -r requirements.txt
  • Add all the following required variables in a .env file
CONNECTION_STRING = Storage connection string from Azure storage
SOURCE = 'usb' or path to any .mp4 file
TIME_DELAY = Specifies frame capture interval in seconds
MANUAL_MODE = Set 0 for auto and 1 for manual mode
PREDICTION_KEY = Azure cognitive service key
TRAINING_KEY = Azure cognitive service key here as well
PROJECT_ID = Custom vision project id
TWILIO_ACCOUNT_SID = Account SID from twilio
TWILIO_AUTH_TOKEN = Auth Toekn from twilio
TWILIO_PHONE_NUMBER = Twilio phone number
ACCOUNT_NAME = Azure account name
BLOB_ACCOUNT_KEY = Storage account key
ENDPOINT_CUSTOM_VISION = Azure custom vision endpoint
SERPAPI_API_KEY = Serpapi API key for scraping tool.
  • The source can be direct video stream from a camera(USB), or from a .mp4 file.
  • Time delay sets the time threshold to capture frames from the video.
  • You can choose from two modes, manual(1) or auto(0).
  • Finally, py edge_to_blob.py

Using the scraper

If you wish to train the model with your own data you can use the provided scraper which uses a third party service Serpapi to download HD images from the inrernet. Refer this readme to know how to set up and run the provided scraper. serpapi readme link here

Training your own ML model

You can also train the Model using Azure custom vision and cognitive service. Follow these steps to train the ML model.

Follow this how to guide here:

Quick tutorial

box_detector.mp4

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 59.0%
  • Python 41.0%