The Low-Light Image Enhancement web app, inspired by the research paper "A Light Weight Transformer for Image Enhancement and Exposure Correction" by Cui et al. (2022), leverages a compact Transformer model. This app, which incorporates the insights from the mentioned research, allows for efficient low-light image enhancement. The deployment of the app includes creating and containerizing the Flask app, Node website, and Nginx server using Docker Compose, ensuring seamless integration and scalability.
To run these containers,
-
You need to instal the Docker Engine and Docker Compose. You can reach the official documentation to install Docker Engine here and Docker Compose here
-
You should create an OpenSSL certificate for localhost to run this project as https://localhost. To create the certificates;
git clone https://github.com/FurkanAtass/LightEnhance-WebApp.git cd LightEnhance-WebApp cd nginxand follow the How to Get SSL HTTPS for Localhost tutorial's; - Step 1: Generate a CA certificate - Step 2: Generating a certificate - Step 5: Importing CA Certificate to the browser
-
The model that is used for Low-Light Image Enhancement is
best_Epoch_lol.pth. You can download it from here by clicking theDownload raw fileon the right of the screen.Put this model file in
./pythonEnhance/best_Epoch_lol.pth.
With the help of Docker Compose, the usage is "A piece of cake." Go to LightEnhance-WebApp folder and use the command;
docker compose up -d
where the -d flag stands for detached mode. It instructs Docker to start the containers defined in the Docker Compose file in the background and detach the terminal from the container's output.
After containers turn into running stage, you can use the web-app from https://localhost
Low-Light-Enhance.webm
-
To stop containers;
docker compose stop -
To delete the containers;
docker compose down -
To delete the images that is created by the
docker-compose.ymlfile;docker rmi $(docker compose images -q)
- If you cannot delete images as in the Stop and Delete section (
docker imagescommand still shows images that should be deleted), you can use$ docker rmi $(docker images | grep lightenhanceapp- | awk '{print $1}')