An experimental neural network that classifies whether a real-estate image is a render (CGI) or a real photo — running entirely in your browser.
Originally built in 2017. The client has since been modernized to a static Vite + React + TypeScript app that performs inference with TensorFlow.js.
A small convolutional neural network (Keras, trained in 2017 on a Properati dataset) is run client-side: the dropped image is resized to 200×200, normalized, and passed through the model, which outputs a render-vs-real softmax. No server, no upload — the image never leaves your machine.
Conv2D(32) → Conv2D(32) → MaxPool → Flatten → Dense(128) → Dense(2, softmax)
Note: the model is trained on real-estate pictures and may not generalize to other kinds of images.
Requires Node 20+ and (optionally) just.
just dev # install + dev server at http://localhost:5173
# or, without just:
cd client && npm install && npm run devOther recipes: just build, just preview, just test, just lint,
just convert, just deploy. Run just to list them.
client/ Vite + React + TS app (the deployable site)
src/ app source (Uploader, predict logic)
public/models/ TensorFlow.js model (committed)
scripts/ one-time keras.js -> TF.js weight migration
nn/ original 2017 Keras training scripts (historical)
utils/ original 2017 preprocessing scripts (historical)
archive/ superseded 2017 Next.js / keras.js client + model
The model is shipped as a quantized TensorFlow.js LayersModel in
client/public/models/. It was migrated once from the original keras.js
weights via client/scripts/convert-weights.mjs (just convert) — the original
training dataset is no longer available, so the network is not retrained.
Hosted as a static site on Cloudflare Pages:
- Root directory:
client - Build command:
npm run build - Output directory:
dist - Node version: 20+
Or deploy a local build directly with just deploy
(npx wrangler pages deploy dist).
MIT — see LICENSE.