/Nextjs-classification-cats-and-dogs-with-tensorflowjs

Nextjs application for classifying images of cats and dogs using tensoflowjs, converting a.h5 model to tensorflowjs that is .json and .bin

Primary LanguageJupyter NotebookMIT LicenseMIT

Nextjs classification cats and dogs with tensorflowjs

Nextjs application for classifying images of cats and dogs using tensoflowjs, converting a.h5 model to tensorflowjs that is .json and .bin

Cat and dog image classification using this cat_dog_classifier.h5 to convert it to tensorflowjs ,going from an h5 model to js produces several .bin files and the json model

Step1

Step22

Step3

Step4


Convert h5 to Tensorflowjs in ipynb

!pip install tensorflowjs
!tensorflowjs_converter --input_format keras /root/to/your/model.h5 /root/to/your/folder/save

Model results cat_dog_classifier.h5

Step2

With the evaluation of the model it is in its accuracy and loss

Step2

Step2

Fronted Nextjs Options for do it:

This is a Next.js project bootstrapped with create-next-app.

Getting Started

Nodejs version v20.10.0 and Next.js version v14.2.3

First

npm install

run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

Resolve : Error Nextjs Parsing error: Cannot find module 'next/babel'

Put this code in .eslintrc.json

{
  "extends": ["next/babel","next/core-web-vitals"]
}

old model

model updated

Created by Diego Ivan Perea Montealegre