Image Classification in Node.js with TensorFlow.js
Open it in GitHub Desktop or git clone the repository or download the zip & extract the project.
Open the terminal in the project folder and type npm install
.
Go to the project folder, and Open the Terminal to that path.
You can use any image you have, just paste it in the project folder and give the name as the argument.
- Run the file (classify.js) with an image file as an argument.
node classify.js rabbit.jpg
- The result will be shown in the Terminal as :
Classification Results: [
{
className: 'Angora, Angora rabbit',
probability: 0.9488762617111206
},
{ className: 'hamster', probability: 0.023957064375281334 },
{
className: 'guinea pig, Cavia cobaya',
probability: 0.016880817711353302
}
]
- Tejas Rathod - @tejas77
- Anonymous