docker pull danielgafni/repalette:app
docker run -p 8000:8000 danielgafni/repalette:app
poetry install
poetry run pre-commit install # for development
To activate the virtual environment run poetry shell
cp ./.env.example ./.env
Fill 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=
python repalette/db/utils/download_raw.py --num-workers 8 # adjust num-workers
python repalette/db/utils/build_rgb.py
This 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.py
python repalette/db/utils/upload_rgb_to_s3.py
python repalette/db/utils/download_pretrain_checkpoint_from_s3.py
The 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.py
python repalette/training/gan.py
data
- 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-lightning
models checkpointsdata/lightning-logs
- pytorch-lightning
tensorboard
(or other logger) logs
repalette
- main python packagescripts
- misc scriptsapp
- web app