Using ml5js and pj5.
-
using vs code, javascript
-
pj5 is a library in Java script based on processing(counter fit for processing in JS), For designing and animations etc.
-
there are two functions in Pj5 namely - a. function setup() - this is config related (setup related) that is to create canvs etc. b- function draw() - to draw images, shapes videos etc.
-
whenever you make a variable you make it a global variable i.e. outside both the functions.
-
let keyword is used to declare the variable.
-
practice and implementation of pj5. background(200); // for bg colour console.log('Draw function'); // creating a point //Point(x, y); //point(200,200);
// creating a line // line(x1, y1, x2, y2); //line(200,200,300,300);
//creating a trinagle // triangle(x1, y1, x2, y2, x3, y3); //triangle (100, 200, 300, 150, 400, 450); // creating a rectangle // rect(starting x cord , starinn=g y cord , width , height) //rect(100,200,100,100);
// circle //ellipse( x, y , w, h); //ellipse(600,300,1000 , 1000);
// stoke and colour // stroke is used for the lining of an object //stoke(r,g,b,a)r g b for colour and a for opacity //whatever objects you make understroke would get coloured. //strokewight(pixel) for line thickness. // fill for colouring inside ----- fill(r , g , b , a)
//fill(255 , 0 , 0 );
-
next we will use the mlj5 library, another example keras.
-
Tensorflow (deep learning framework) made java script version i.e. tensorflow.js..only problem in this library is that it is the very low level which means a deep understanding of deep learning is required. 9.mlj5 took tensor flow and wrote functions over it which means they simplified it, so using mlj5 functions and model we will use TensorFlow, all the work is done by Tensorflow itself but we will communicate with TensorFlow using mlj5.
-
among those models in mlj5, one is present which we will be using to implement this project.
for any doubts and clarification contact - [email protected] naveen.nambiar.399 (Instagram)