- Install Docker
- Pull the web app container:
docker pull danielgafni/repalette:app- Run the container:
docker run -p 8000:8000 danielgafni/repalette:app- Open localhost:8000 in your browser
- In the web interface:
- Upload the image
- Select the desired color palette
- Press the "recolor" button
poetry install
poetry run pre-commit install # for developmentTo activate the virtual environment run poetry shell
cp ./.env.example ./.envFill it with the correct values.
# Avoid "JavaScript heap out of memory" errors during extension installation
# (OS X/Linux)
export NODE_OPTIONS=--max-old-space-size=4096
# (Windows)
set NODE_OPTIONS=--max-old-space-size=4096
# Jupyter widgets extension
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
# jupyterlab plotly renderer support
jupyter labextension install jupyterlab-plotly --no-build
# Plotly FigureWidget support
jupyter labextension install plotlywidget --no-build
# Build extensions (must be done to activate extensions since --no-build is used above)
jupyter lab build
# Unset NODE_OPTIONS environment variable
# (OS X/Linux)
unset NODE_OPTIONS
# (Windows)
set NODE_OPTIONS=Option 1: scrap data from www.design-seeds.com
python repalette/db/utils/download_raw.py --num-workers 8 # adjust num-workers
python repalette/db/utils/build_rgb.pyThis data might be a little outdated comparing to the #1 option, but will be downloaded much faster.
python repalette/db/utils/download_rgb_from_s3.pypython repalette/db/utils/upload_rgb_to_s3.pypython repalette/db/utils/download_pretrain_checkpoint_from_s3.pyThe model can be trained on the data downloaded from www.design-seeds.com. After running the training script the logs (losses, images, etc) will be available at localhost:6006.
python repalette/training/pretrain.pypython repalette/training/gan.pydata- root data directorydata/raw.sqlite,data/rgb.sqlite- databasesdata/raw- raw images downloaded from Design Seedsdata/rgb- cropped images without palettes in RGBdata/model-checkpoints-pytorch-lightningmodels checkpointsdata/lightning-logs-pytorch-lightningtensorboard(or other logger) logs
repalette- main python packagescripts- misc scriptsapp- web app

