This repo is a Flask App built upon the PyTorch Learning to See In the Dark Repository.
-
Clone the repository including the submodules
git clone --recurisve
https://github.com/SEANDOUGHTY/learning-to-see-in-the-dark-flask.git -
Add the pretrained model into /checkpoint/checkpoint.t7
-
Create an AWS bucket for storing input and output images and assign environment variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
-
Build the docker containers
docker-compose build
-
Start the docker container
docker-compose up
After the docker containers are successfully running inference can be performed by using a POST request with the following format:
{
"Bucket": $BUCKETNAME,
"input-image": $INPUTIMAGE_KEY,
"output-image": $OUTPUTIMAGE_KEY",
"ratio": $RATIO
}
Ratio is a scaling factor between the original image exposure and the output image exposure.