https://github.com/geo-tp/image-classifier-django-api
Submit an image and get predictions of its content
https://github.com/geo-tp/image-classifier-django-api
ai django-rest-framework image-classification
Last synced: 3 months ago
JSON representation
Submit an image and get predictions of its content
- Host: GitHub
- URL: https://github.com/geo-tp/image-classifier-django-api
- Owner: geo-tp
- Created: 2023-01-18T01:58:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-18T02:13:24.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T01:44:10.234Z (11 months ago)
- Topics: ai, django-rest-framework, image-classification
- Language: Python
- Homepage:
- Size: 255 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Image Classifier Django API
===================
Submit an image and get predictions of its content with tensorflow ResNet50 model through an API endpoint.
Example
----

```
{
"id": 3,
"img": "http://localhost:8000/media/example.jpg",
"predictions": "Leopard at 97%. Cheetah at 3%. Jaguar at 1%."
}
```
Installation
-----
Created with python 3.10.6
- ### Create Python Virtual Env
```
python -m venv env_name
```
- ### Use Python Virtual Env
```
source env_name/bin/activate
```
- ### Install requirement
```
python -m pip install -r requirements.txt
```
- ### Lauch dev server
```
python manage.py runserver
```
Endpoint
--------
While dev server is launched, you can access `http://localhost:8000/api/v1/image-classifier` with browser. You can use the debug interface to list and get predictions.

Storage
------
Images are stored into `/media/` folder, predictions data are stored into database.
You can configure database with `/config/settings.py`