Skip to content

abarmat/rendernet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RenderNet

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.

How it works

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.

Run it locally

Requires Node 20+ and (optionally) just.

just dev          # install + dev server at http://localhost:5173
# or, without just:
cd client && npm install && npm run dev

Other recipes: just build, just preview, just test, just lint, just convert, just deploy. Run just to list them.

Project layout

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

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.

Deploy

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).

License

MIT — see LICENSE.

About

An experimental Neural Network to classify whether an image is a render or not.

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors