Introduction: Image Colorization Application on BrainyPi

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 colorization application on BrainyPi. Image colorization application is an application that converts a grey scale image into a colour image. Libaries such as opencv, matplotlib and numpy where used to implement this.

Supplies

  • BrainyPi
  • UNIX OS Terminal

Step 1: Remote Access

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.

Step 2: Cloning the Git Repository

I installed necessary modules such as Opencv using pip install command.

Then I cloned the git repository of the project using,

git clone https://github.com/brainypi/BrainyPi-AI-Examples.git


Step 3: Executing Model File for Colorize Image

Navigated inside the folder where colorize.py python source code was present using,

cd BrainyPi-AI-Examples/Opencv/Imagecolorize/


Executed colorize.py file using,

python3 colorize.py

The code take a input grey scale image which is stored in test_samples and stores the output image in Output folder. We have use Neural network with 2 hidden layers of 55 and 53 respectively.

Check for similar interesting project that implements a vehicle counter model and a people counter model on Brainy Pi

https://brainypi.com/docs/13-opencv-examples

Step 4: Problems Faced

When I ran the python file it throwed an error saying colorization_release_v2.caffemodel not present. So I downloaded that folder in local computer and uploaded the folder on BrainyPi system using

scp -r -P 65530 <caffemodelfile> pi@auth.iotiot.in:/home

Then too when I executed the code on brainypi system it gave me error. So, I cloned the repository on the local machine and executed the code for successful execution.