This project provides an API that extracts frames from a video, enhances the images using SRCNN (Super-Resolution Convolutional Neural Network), and stitches them into a panoramic image. It is implemented in three versions: Django, Flask, and FastAPI.
- Video frame extraction
- Image enhancement using SRCNN (3-layer and 4-layer models)
- Panoramic image stitching
- GPU acceleration support (if available)
- Python 3.7+
- OpenCV (cv2)
- PyTorch
- NumPy
- Django / Flask / FastAPI (depending on the chosen version)
-
Clone the repository:
git clone <repository-url> cd <repository-directory> -
Install the required packages:
pip install django flask fastapi opencv-python-headless torch numpy -
repare the SRCNN model files:
- 3-layer model:
MODEL_PATH - 4-layer model:
MODEL_4LAYER_PATH
- 3-layer model:
- Start the server:
python manage.py runserver - API Endpoints:
- GET
/: Check API status - POST
/convert/: Upload and process video
- GET
- Start the server:
python app.py - API Endpoints:
- GET
/: Check API status - POST
/convert/: Upload and process video
- GET
- Start the server:
uvicorn main:app --host 0.0.0.0 --port 5050 - API Endpoints:
- GET
/: Check API status - POST
/convert/: Upload and process video
- GET
Apache License 2.0