Skip to content

kevinrobinson/segmented

Repository files navigation

segmented

dev setup

deeplab

$ (install deeplab, publish-local)
$ yarn install
$ yarn link-local

Prep images

  1. Get info
nodes = [];document.querySelectorAll('.collection-photo').forEach(n => nodes.push({src: n.src, alt: n.getAttribute('alt')})); console.log(JSON.stringify(nodes));
  1. Fetch images (./fetch.sh)
  2. Resize (eg cd public/img && mogrify -resize x224 -path ../img-resized *.*)

Prep masks

This builds the masks in the browser, writes them to disk with localforage, then forces downloading them to yield all the actual files. Then post-processing to resize and move into source for reading in production.

  1. Clear localforage cache (?disabled&clear-localforage)
  2. Run locally to build masks, with cache enabled, over the whole dataset (?disable-fetching-images)
  3. Get the localforage dump, write it to cached.json
  4. Run force download to get all the masks (?disable-fetching-images&force-download-for-dev), put them in the masks folder.
  5. Resize (eg mkdir -p public/masks/v4-resized && cd public/masks/v4 && mogrify -resize x224 -path ../v4-resized *.*)
  6. Verify it works.
  7. Clear localforage cache (?disabled&clear-localforage)

This project was bootstrapped with Create React App.

About

what do segmentation models see in our most iconic photographs?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published