$ (install deeplab, publish-local)
$ yarn install
$ yarn link-local
- Get info
nodes = [];document.querySelectorAll('.collection-photo').forEach(n => nodes.push({src: n.src, alt: n.getAttribute('alt')})); console.log(JSON.stringify(nodes));
- Fetch images (
./fetch.sh) - Resize (eg
cd public/img && mogrify -resize x224 -path ../img-resized *.*)
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.
- Clear localforage cache (
?disabled&clear-localforage) - Run locally to build masks, with cache enabled, over the whole dataset (
?disable-fetching-images) - Get the localforage dump, write it to
cached.json - Run force download to get all the masks (
?disable-fetching-images&force-download-for-dev), put them in themasksfolder. - Resize (eg
mkdir -p public/masks/v4-resized && cd public/masks/v4 && mogrify -resize x224 -path ../v4-resized *.*) - Verify it works.
- Clear localforage cache (
?disabled&clear-localforage)
This project was bootstrapped with Create React App.