{"id":22270415,"url":"https://github.com/dipa09/riot_imgclf","last_synced_at":"2026-04-30T17:31:53.574Z","repository":{"id":249987037,"uuid":"833148353","full_name":"dipa09/riot_imgclf","owner":"dipa09","description":"Multi-class image classifier for RIOT-OS","archived":false,"fork":false,"pushed_at":"2024-09-18T10:06:19.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T15:51:42.278Z","etag":null,"topics":["arduino-mega-2560","emlearn","esp32-cam","m2cgen","micromlgen","riot-os","scikit-learn","tinyml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dipa09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T12:55:21.000Z","updated_at":"2025-01-05T00:44:53.000Z","dependencies_parsed_at":"2024-09-18T13:24:28.298Z","dependency_job_id":"7af9dab8-3a96-4a9d-91a7-ee03c5c0fee8","html_url":"https://github.com/dipa09/riot_imgclf","commit_stats":null,"previous_names":["dipa09/riot_imgclf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dipa09/riot_imgclf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipa09%2Friot_imgclf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipa09%2Friot_imgclf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipa09%2Friot_imgclf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipa09%2Friot_imgclf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dipa09","download_url":"https://codeload.github.com/dipa09/riot_imgclf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipa09%2Friot_imgclf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32472396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-mega-2560","emlearn","esp32-cam","m2cgen","micromlgen","riot-os","scikit-learn","tinyml"],"created_at":"2024-12-03T12:08:28.150Z","updated_at":"2026-04-30T17:31:53.556Z","avatar_url":"https://github.com/dipa09.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project implements an image classifier using the [DeepWeeds](https://github.com/AlexOlsen/DeepWeeds) dataset,\nwhich contains more that 8000 images of 8 different weeds' species.\n\nThe goal is to evaluate the performance of some TinyML libraries on RIOT OS.\n\n\nThe libraries that have been selected are:\n[emlearn](https://github.com/emlearn/emlearn),\n[micromlgen](https://github.com/eloquentarduino/micromlgen) and\n[m2cgen](https://github.com/BayesWitnesses/m2cgen)\nand they have been tested on Arduino Mega and ESP32-CAM boards.\n\n\n## Dependencies\n1. Download the [dataset](https://github.com/AlexOlsen/DeepWeeds).\n2. Install the python dependencies listed in `requirements.txt`.\n3. Install the toolchain packages required by RIOT for each board.\n   Consult [RIOT's documentation](https://api.riot-os.org/getting-started.html) for how to do it.\n\n\n## Usage\n```\n# Build tools needed for the traning phase.\n$ make driver liblbp.so\n\n# Create a custom dataset.\n$ python3 ./prepare.py\n\n# Extract all features.\n$ python3 ./extract.py\n\n# Train the model.\n$ python3 ./train.py\n\n# Export the model to C.\n$ python3 ./generate.py [-l library]\n\n# Extract features for a test image\n$ python3 ./extract.py -i \u003cimage-path\u003e\n$ ./driver features \u003cfloat|double\u003e features.h\n\n# Build for Linux (optional)\n$ make main [LIB=LIBRARY]\n\n# Copy the project to the RIOT application (edit 'Makefile' or set RIOT_DIR)\n$ make sync\n\n# From the RIOT application directory. Build the app for the selected board.\n$ make [BOARD=...]\n\n# Connect the board and run\n$ make flash [BOARD=...]\n```\n\nThe preapration, extraction and training steps can be customized, that's why the workflow is\nso fragmented. Please use `--help` for more information on how to use the various tools.\n\nReading the [RIOT documentation](https://api.riot-os.org/creating-an-application.html) for creating\nnew apps is also recommended.\n\n## Operations\n![alt text](./data/operations.jpg)\n\n\n## Tested version\nThis project has been tested using the following packages' versions.\n\nIf you have issues try to install the specific package version.\n\n| Package       | Version   |\n|---------------|-----------|\n| emlearn       | 0.20.4    |\n| h5py          | 3.11.0    |\n| joblib        | 1.4.2     |\n| m2cgen        | 0.10.0    |\n| mahotas       | 1.4.15    |\n| matplotlib    | 3.9.0     |\n| micromlgen    | 1.1.28    |\n| numpy         | 1.26.4    |\n| opencv-python | 4.10.0.84 |\n| scikit-learn  | 1.5.0     |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipa09%2Friot_imgclf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipa09%2Friot_imgclf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipa09%2Friot_imgclf/lists"}