This project is part of an assignment to demonstrate proficiency in computer vision, database management, and API development. The goal is to create a system that can process, store, and retrieve image frames efficiently, while applying image processing techniques.
Given a CSV file containing image data, the challenge is to:
- Resize the image width from 200 pixels to 150 pixels.
- Store the resized images in a database.
- Create an API to request image frames based on a specified depth range.
- Apply a custom color map to the generated frames.
- Implement the solution in Python.
- Containerize the solution for easy deployment.
This project implements a FastAPI-based web service that:
- Reads image data from a CSV file.
- Processes the image data by resizing and applying a color map.
- Stores the processed images in a SQLite database.
- Provides an API endpoint to retrieve image frames within a specified depth range.
The solution is containerized using Docker for easy deployment and scalability.
- CSV data analysis and processing
- Image resizing and color mapping
- Efficient database storage and retrieval
- RESTful API for accessing image frames
- Docker containerization
.
├── custom_logger/
│ ├── __init__.py
│ └── helper.py
├── data/
│ ├── raw/
│ │ └── image_data.csv
│ └── processed/
│ └── image_data.db
├── database/
│ ├── __init__.py
│ └── helper.py
├── image_processing/
│ ├── __init__.py
│ └── helper.py
├── utilities/
│ ├── __init__.py
│ ├── constants.py
│ └── helper.py
├── main.py
├── Dockerfile
├── docker-compose.yaml
├── requirements.txt
└── README.md
Important Note:
- Please check
service
folder code and README file as it includes the API implementation and its usage.
Also, check README files under each of the folders for detailed information about the modules and functionalities.
- Docker
- Docker Compose
- Anaconda (to run locally)
-
Clone the repository:
git clone https://github.com/di37/image-frame-processing-api.git cd image-frame-processing-api
-
Create and activate a Conda environment:
conda create -n image_frame_processing_api python=3.12 conda activate image_frame_processing_api
-
Install dependencies:
pip install -r requirements.txt
Run the FastAPI server:
python main.py
Build and run the Docker container:
docker-compose up --build
For any questions or support, please open an issue in the GitHub repository.