For details on the project and my motivation on doing this (though it is only available in Spanish, for the moment): PROYECTO
You need to download the following:
- uv (Project and package manager)
- Save the LSC70 (Available in https://data.mendeley.com/datasets/9ssyn8tff5/2) in the
/data/rawfolder. - Execute the CSV generation script by executing
uv run .\scripts\generate_dataset_csv.py. - Execute the filtering script by executing
uv run .\scripts\filter_dataset.py. - Split the filtered dataset into train/valid:
uv run .\scripts\split_dataset.py.
This can be automatically done with default values through the shell with setup.sh.
Train the model by using uv run .\scripts\train.py.
Start the local API server:
uv run python -m src.api.api --model-path models/registry/svm/direct-svm-20260511-220859/model.joblib --port 8000Available endpoints:
GET /healthreturns readiness informationGET /metadatareturns the service description and default model pathPOST /predictaccepts one uploaded image and returns ranked predictions as JSON
The API uses the same inference pipeline as scripts/infer.py and is intended for local development and testing.
Visit http://127.0.0.1:8000/ after (4) to upload a single image and view the rendered prediction result.
The frontend uses server-rendered templates and is designed to work locally with the backend API.
Test can be run with uv run python -m unittest discover -s tests -p "test*.py".