Classification Model for the Fashion-MNIST Dataset.
The API can be executed using Docker or not.
- run docker compose
or use
docker compose up
-d
to keep the container running in backgrounddocker compose up -d
-
Install the requirements
pip install -r backend/requirements.txt
-
Run the API:
uvicorn backend.main:app
-
To use the API, you need to do a POST request at
localhost:8000/model/prediction
containing the image onfile
key at the body. -
The response is a JSON file with the following keys: 2.1. class_id: Prediction resul class id (0 to 9); 2.2. class_name: Prediction result class name; 2.3. confidence: Confidence of model for the prediction (0 to 1); 2.4. probs: List of all model prediction probabilities; 2.5. labels: List of the classes name; 2.6. filename: Name of the file used on prediction.
- backend: API implementation;
- models: Model used on the API;
- train: Python Notebook used to train the models.
By Matheus de Andrade Silva