A powerful AI-driven solution for enhancing 360-degree videos using Real-ESRGAN and GFPGAN technologies. This project combines advanced super-resolution techniques with intelligent face enhancement to dramatically improve the quality of 360-degree video content.
- 4x Super-Resolution: Upscale 360-degree videos to 4 times their original resolution
- AI-Powered Face Enhancement: Intelligent face detection and enhancement using GFPGAN
- Smart Blending: Advanced blending algorithms for seamless results
- Batch Processing: Process multiple frames efficiently
- Audio Preservation: Maintains original audio quality during enhancement
- Google Colab Ready: Pre-configured Jupyter notebook for easy cloud execution
- Open the
Real_ESRGAN_Video.ipynbnotebook in Google Colab - Run all cells in sequence
- Upload your 360-degree video when prompted
- Download the enhanced result
# Clone the repository
git clone https://github.com/WWIIITT/360-degree-video-super-resolution.git
cd 360-degree-video-super-resolution
# Install dependencies
pip install -r requirements.txt
# Run the enhancement script
python real_esrgan_video.pyPython: 3.9 or higher, GPU: CUDA-compatible GPU recommended for faster processing, Dependencies:
- torch==1.13.1
- torchvision==0.13.1
- numpy==1.23.5
- basicsr==1.4.2
- facexlib==0.3.0
- gfpgan==1.3.8
The Jupyter notebook automatically handles all installations and dependencies.
# Install PyTorch (adjust CUDA version as needed)
pip install torch==1.13.1 torchvision==0.13.1
# Install required packages
pip install numpy==1.23.5
pip install basicsr==1.4.2 facexlib==0.3.0 gfpgan==1.3.8
# Install OpenCV
pip install opencv-python opencv-contrib-python
# Clone Real-ESRGAN
git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN
python setup.py install
# Clone GFPGAN
git clone https://github.com/TencentARC/GFPGAN.git
cd GFPGAN
python setup.py install# Import required modules
from real_esrgan_video import enhance_360_video
# Enhance your 360-degree video
enhanced_video = enhance_360_video(
input_path="your_360_video.mp4",
output_path="enhanced_360_video.mp4",
scale_factor=4
)# Customize enhancement parameters
enhanced_video = enhance_360_video(
input_path="input.mp4",
output_path="output.mp4",
scale_factor=4,
face_enhance=True,
gfpgan_weight=0.2,
blur_kernel_size=151,
blending_alpha=0.3
)- Frame Extraction: Extract individual frames from input video
- Super-Resolution: Apply Real-ESRGAN for 4x upscaling
- Face Detection: Identify faces using Haar cascades
- Face Enhancement: Apply GFPGAN to detected face regions
- Smart Blending: Seamlessly blend enhanced faces with upscaled background
- Post-Processing: Apply CLAHE and noise reduction
- Video Reconstruction: Reassemble frames with original audio
- Input: MP4, AVI, MOV, MKV, INSV (360-degree formats)
- Output: MP4 with H.264 encoding
- Audio: AAC encoding at 192kbps
- Real-ESRGAN by Xintao Wang et al.
- GFPGAN by Tencent ARC Lab
- BasicSR for the super-resolution framework
