The most easy to learn ML platform Edge Impulse really changed the phase of today ML workflow in revolutionary. Because of it is easiness I was able to complete the whole project less than three hours. Smart Parks, hackster.io and Edge Impulse has collaboratively put their effort to protect the world largest land animal Elephants.
I am building this project to help them to make their effort to push forward. I am building a ML model to classify Elephant images from others. The dataset I am using is Arribada.org. All ML workflow has been done using Edge Impulse.
I plan to explain all the steps I followed make this image classifier using this project. Believe me it will take much time.
Step 1 - Creating Edge Impulse Account & ProjectCreate an account in Edge Impulse using this link. Once the account has been created and after you logged into your account, create a project.
Once your account and project are ready, you can proceed with installing Edge Impulse CLI in your computer. I am using Windows 10 and all the instructions are only valid for that environment.
Install Node.js v10 or higher with NPM, the installation file and instruction can be found here.
Install Edge Impulse CLI (using CMD in Windows 10)
C:\Users\Chamal> npm install -g edge-impulse-cli
The installer will install below tools in the pc.
Step 3 - Download Training/Test DatasetFor the model training I am using dataset from Arribada.org. The dataset contains thermal images of elephants collected at the ZSL Whipsnade Zoo.
You can find the dataset in GitHub.
Step4 - Upload into Edge ImpulseUsing Edge Impulse uploader tool, the dataset can be uploaded. Run below command in terminal
# Upload all the "elephant" images
C:\Users\Chamal> edge-impulse-uploader --category split --label elephant human-wildlife-conflict/Elephant/Object/single_elephant/*.png
C:\Users\Chamal> edge-impulse-uploader --category split --label elephant human-wildlife-conflict/Elephant/Object/multiple_separate_elephants/*.png
C:\Users\Chamal> edge-impulse-uploader --category split --label elephant human-wildlife-conflict/Elephant/Object/multiple_obstructing_elephants/*.png
C:\Users\Chamal> edge-impulse-uploader --category split --label elephant human-wildlife-conflict/Elephant/Object/human_and_elephant/*.png
# Upload all the "non-elephant" images
C:\Users\Chamal> edge-impulse-uploader --category split --label non-elephant human-wildlife-conflict/Elephant/Object/human/*.png
C:\Users\Chamal> edge-impulse-uploader --category split --label non-elephant human-wildlife-conflict/Elephant/Object/goat/*.png
This will take some because there are more than 10, 000 images in this dataset need to be uploaded.
Step 5 - Create ImpulseGo to "Create Impulse" page and add a processing block as image. Then add "Transfer learning" as the learning block.
Go to image menu can click on "Generate features" to extract the features from the uploaded dataset.
Go to the Transfer learning menu then click on Start training button to begin the model training.
Once the training is done it will show you the accuracy, this time it is 99.3%. The value quite okay to me.
Step 8 - Live ClassificationNow time to test the model capability. Go to Live classification menu. Pick a sample and click on the Load sample button. Below show two scenarios how this works. One is for the non-elephant classification and another for elephant.
Time to make version of your training model. Go to versioning
Finally, you can simply download trained model for any language you preferred and integrate with any application you like. Go to deployment.
This is so simple with 10 easy steps you can build your own trained ML model, which can be deploy any where even tiny microcontroller like Android Nano BLE 33 or SMT Discovery board. The bottom line Edge Impulse saved a lot of time my ML workflow. Without writing a single line of code, I was able to successfully build and deploy image classifier that can be used to identify elephants. Using that we can build alerting system to alert when elephants are moving to non-safe zones.
Comments