Skip to content

A quick demo of using TFJS localy predictions for CNN models.

License

Notifications You must be signed in to change notification settings

r48n34/next-predict

Repository files navigation

TFJS CNN in next.js

A quick demo of using TFJS localy predictions for CNN models.

Demo: https://next-predict.vercel.app/

Features

  1. Load in models in local device run time.
  2. Predict with user devices (No server predictions)
  3. Without tfjs node, only tfjs.

Explains

The demo used a flower classifications CNN model. Try to input a flowers image.

Structure

📂 .
├── 📂 components
├── 📂 pages
├── postcss.config.cjs
├─┬ 📂 public
│ ├── favicon.ico
│ └──📂 models (TFJS format models)
├── tsconfig.json
├─┬ 📂 useData
│ └── modelData.ts (Precoded models metadata)
├─┬ 📂 utilis
│ ├── imgDecodeUtilis.ts (tfjs-native source code)
│ ├── pngUtilis.ts (Png utils)
│ └── predictUtili.tsx (For predictions)
└── yarn.lock