Image Segmentation Application on BrainyPi
by adityaware532 in Circuits > Raspberry Pi
74 Views, 1 Favorites, 0 Comments
Image Segmentation Application on BrainyPi
![a5.png](/proxy/?url=https://content.instructables.com/FW4/D81L/LDSTQW54/FW4D81LLDSTQW54.png&filename=a5.png)
Edge AI is the deployment of AI applications in devices throughout the physical world. It’s called “edge AI” because the AI computation is done near the user at the edge of the network, close to where the data is located, rather than centrally in a cloud computing facility or private data center.
The main aim of this project was to implement Image Segmentation application on BrainyPi. Image segmentation is a method of dividing a digital image into subgroups called image segments, reducing the complexity of the image and enabling further processing or analysis of each image segment. Libaries such as opencv, matplotlib and numpy where used to implement this.
Link for BrainyPi
Supplies
![a2.png](/proxy/?url=https://content.instructables.com/FHY/CY3L/LDSTQVS8/FHYCY3LLDSTQVS8.png&filename=a2.png)
- BrainyPi
- UNIX OS Terminal
Remote Access
![a1.png](/proxy/?url=https://content.instructables.com/FFX/X4E5/LDSTQVSQ/FFXX4E5LDSTQVSQ.png&filename=a1.png)
I remotely accessed Brainypi with the help of Secure Shell using the command,
ssh -X pi@auth.iotiot.in -p 65530
For authentication server will ask for the password of a system that user want to login to i.e BrainyPi.
After entering correct password, you are granted an access to the system.
Clone Github Repository
I installed necessary modules such as Opencv using pip install command.
I have follower this Segmentation Document.
Then I cloned the git repository of the project using,
git clone https://github.com/halloTheCoder/ImageSegmentationUsingKMeans.git
Executing Model File
![seg_exc.png](/proxy/?url=https://content.instructables.com/FG7/VZDG/LDSTQW1B/FG7VZDGLDSTQW1B.png&filename=seg_exc.png)
![seg_img.png](/proxy/?url=https://content.instructables.com/FDO/5I8W/LDSTQW1Q/FDO5I8WLDSTQW1Q.png&filename=seg_img.png)
Navigated inside the folder where colorize.py python source code was present using,
cd Aditya/Segmentation
Executed colorize.py file using,
python Image_Segmentation_using_kmeans.py --k 3 --input_file input/burma.jpg
- k : It is the required no of clusters to be formed. Default is 3. Higher the no, more is the time required for each iteration and thus for convergence.
- input_file : The relative path of the desired input file
NOTE ::
- Output images and gif will be created in output folder.
- Images are automatically being resized to reduce the time taken.