This application leverages the Ultralytics YOLOv8 object detection model to accurately identify and locate objects within an image. It provides a user interface for uploading an image and obtaining an annotated version that highlights and classifies various objects.
![image](https://private-user-images.githubusercontent.com/104257852/244879729-c9c57688-e8c0-4c15-b033-052104f36807.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MzEzMjgsIm5iZiI6MTcyMTUzMTAyOCwicGF0aCI6Ii8xMDQyNTc4NTIvMjQ0ODc5NzI5LWM5YzU3Njg4LWU4YzAtNGMxNS1iMDMzLTA1MjEwNGYzNjgwNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMVQwMzAzNDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01Mzc5NTQxZjQyZTZhNjNiNzAxNzBlZTU0YzcwOTdiZThmNTQ4MGI5M2FlMmRlMTk5NDE3Nzc5NDBkMmNjYTYwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.yPe4EltUiZFaEqEAOowunzo_WPdZZWVoYOJmXCH4cOk)
- Image upload and processing
- Object detection using YOLOv8 model
- Annotates images with detected object classes, their bounding boxes and confidence scores using OpenCV (Open Source Computer Vision Library)
- Docker
Clone the repository to your local machine:
git clone https://github.com/feldeh/image-detection-api
Navigate to the project's root directory:
cd image-detection-api
To run the application, you need to spin up the server and app Docker containers:
docker-compose up
- Open your browser and navigate to
localhost:3000
. - Upload an image.
- Wait a few seconds until the processed image appears on the screen with the detected objects annotated.
You can interact with the API endpoints using the Swagger UI documentation. The Swagger UI is automatically generated and can be accessed from the /docs endpoint.
GET /
Returns "Ready" if the server is running.
POST /upload
Form Field | Type | Description |
---|---|---|
file |
file |
Required. Image file to upload |
Upload an image file for processing. The image file should be in the form-data format with the key 'file'.
- FastAPI - Web framework used to build the API.
- Ultralytics YOLOv8 - Object detection model.
- OpenCV - Used for image processing.
- Enhance the object detection API endpoint to return the processed image.
- Integrate a front-end user interface to interactively use the API and visualize the results.