This project, FBCNN-GUI, provides an easy-to-use graphical user interface for FBCNN (Towards Flexible Blind JPEG Artifacts Removal). FBCNN is a state-of-the-art deep learning model for removing artifacts from JPEG compressed images. This GUI allows users to easily load models, process images, and view results through intuitive operations, without the need for complex command-line instructions.
- User-Friendly Graphical Interface: Complete image import, model selection, processing, and result viewing through simple window operations.
- Flexible Model Selection: Supports loading different models provided by FBCNN to suit various processing needs.
- Real-time Preview: Easily compare original and processed images to evaluate the de-artifacting effect.
- Batch Processing: Supports processing multiple image files at once.
- One-Click Installation (Optional): The provided
1.install&run.bat
script allows for quick environment configuration and program launch.
Introduction to FBCNN Principles (Cited from jiaxi-jiang/FBCNN)
-
Install Python: Ensure you have Python installed on your system (Python 3.7 or later is recommended). You can download and install it from python.org.
-
Create a Virtual Environment (Recommended):
python -m venv fbcnn_env
-
Activate the Virtual Environment:
- Windows:
fbcnn_env\Scripts\activate
- Linux/macOS:
source fbcnn_env/bin/activate
- Windows:
-
Install PyTorch: Install PyTorch based on your hardware. Visit the PyTorch official website for installation commands. For example, to install the CPU version:
pip install torch torchvision torchaudio
Or to install the CUDA 11.8 GPU version:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
-
Install Other Dependencies:
pip install -r requirements.txt
-
Download the following models from Github Release.
- fbcnn_color.pth
- fbcnn_gray.pth
- fbcnn_gray_double.pth
-
Run the GUI:
python gui.py
- Start the Program: Run the
gui.py
script. - Select a Model: Choose the desired FBCNN model from the dropdown menu at the top of the interface.
- Select a Device: Choose whether to use CPU or GPU for processing.
- Import Images: Click the "Import Images" button to select the image files you want to process.
- Start Processing: Click the "Start Processing" button to begin processing the selected images.
- View Results: The processed image will be displayed on the interface. You can switch between viewing the original and processed images.
- Save Results: You can save the currently processed image individually or save all processed images in batch.
This project is released under the Apache 2.0 license. This work was supported in part by the ETH Zurich Fund (OK) and a project from Huawei Technologies Co., Ltd (Finland).