Submit an image and get predictions of its content with tensorflow ResNet50 model through an API endpoint.
{
"id": 3,
"img": "http://localhost:8000/media/example.jpg",
"predictions": "Leopard at 97%. Cheetah at 3%. Jaguar at 1%."
}
Created with python 3.10.6
-
python -m venv env_name
-
source env_name/bin/activate
-
python -m pip install -r requirements.txt
-
python manage.py runserver
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.
Images are stored into /media/
folder, predictions data are stored into database.
You can configure database with /config/settings.py