Skip to content

Latest commit

 

History

History

simple_upscaler

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Simple Upscaler

This directory contains code for training a model to upscale 256x256 images to 768x768 images.

It relies on data processed by ../data/BIU-MG, at 768x768 resolution.

Original Nearest-neighbor Bicubic Lanczos Proposed Model
Original Nearest-neighbor Bicubic Lanczos Proposed Model
Original cropped Nearest-neighbor cropped Bicubic cropped Lanczos cropped Proposed Model cropped

Building the Docker Image

docker build -t upscaler - < Dockerfile

Training

And run it, mounting the relevant directories:

wandb docker-run --gpus "device=2" -it --rm --user $(id -u):$(id -g)  \
	--mount type=bind,source="$(pwd)",target=/upscaler \
	--mount type=bind,source="$(pwd)/training",target=/training \
	-w /upscaler upscaler \
	python -m src.train --data-path=frames768.zip

This will train for a while, and log each epoch result in a training/progress directory. Once satisfied with the result, the script can be killed.

Convert to TFJS

pip install tensorflowjs
chmod +x keras_to_tfjs.sh
./keras_to_tfjs.sh