Using GitHub Actions to Automate Image Classification with Microsoft Azure Custom Vision Services

Posted by : at

Category : GitHub-Actions, Automating, Python


My Workflow

I created this new GitHub Action available here with which we can automate the entire process of image classification with Azure Custom Vision. With this - all a user needs to do is:

  • Add the 4 SECRETS which are basically Azure Custom Vision Services Credentials. The process is explained in the README
  • Upload Image Dataset in the GitHub Repo and modify the tags, tagsVar and trainSize accordingly in the below yml file.

Here’s a sample workflow YML file using this Action:

name: Auto Custom Vision Classifier
on:
  push:
    paths:
    - '**.yml'
jobs:
  build_model:
    runs-on: ubuntu-latest
    steps:
    - name: Automating Image Classification with Microsoft Azure Custom Vision Training and Prediction
      uses: mritunjaysharma394/autoCustomVision@v1.0
      with:
        tags: "[Hemlock,Japanese Cherry]" # Rename it according to the folder name under images/ which will also be our name to the tags
        tagsVar: "[hemlock_,japanese_cherry_]" # Rename it according to the symmetry of file names under images/tag/ 
        trainSize: "10" # Train Size of Each Tag
        endpoint: $
        trainingKey: $
        predictionKey: $
        predictionResourceid: $

Working Video Example:


About Mritunjay Sharma

Hi, my name is Mritunjay Sharma, a Computer Science Engineering Student, based in Lucknow, India, exlporing the tryst with Open-Source, delving into Python, framing things with Django, while dealing in Flasks, with a pinch of Shell scripts, a hint of C/C++ development in the kernel that is not found in the corn to eventually automate all of it and sometimes giving talks while sometimes writing poems, just like this one?

Star
Useful Links