{"id":31702546,"url":"https://github.com/thomasduvinage/ml_trash_selector","last_synced_at":"2025-10-08T21:52:53.831Z","repository":{"id":72122856,"uuid":"332312230","full_name":"ThomasDuvinage/ML_trash_selector","owner":"ThomasDuvinage","description":"Machine learning waste sorter ","archived":false,"fork":false,"pushed_at":"2021-01-23T21:42:05.000Z","size":3816,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-28T17:39:39.376Z","etag":null,"topics":["machine-learning","python","teachablemachine","trash"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThomasDuvinage.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-23T21:32:55.000Z","updated_at":"2021-04-26T11:45:59.000Z","dependencies_parsed_at":"2023-04-18T02:45:56.235Z","dependency_job_id":null,"html_url":"https://github.com/ThomasDuvinage/ML_trash_selector","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"b601a25149a4914cd3bee6b30f88c5e2fd685297"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ThomasDuvinage/ML_trash_selector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDuvinage%2FML_trash_selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDuvinage%2FML_trash_selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDuvinage%2FML_trash_selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDuvinage%2FML_trash_selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasDuvinage","download_url":"https://codeload.github.com/ThomasDuvinage/ML_trash_selector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDuvinage%2FML_trash_selector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000693,"owners_count":26082837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["machine-learning","python","teachablemachine","trash"],"created_at":"2025-10-08T21:52:50.412Z","updated_at":"2025-10-08T21:52:53.826Z","avatar_url":"https://github.com/ThomasDuvinage.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ML Trash Selector \n\nThe goal of this project is to throw waste into the right trash.\n\nTo do so you need to connect a webcam to your computer and and arduino uno with 3 servomotors connected.\n\n![picture](images/prototype.jpeg)\n\nThe model has been created with TeachableMachine : https://teachablemachine.withgoogle.com\n\nIMPORTANT : The code can only be run with Python 3.8.1\n\n## Run script \n\n* Create virtual env : https://docs.python.org/3/library/venv.html\n\nActivate virtual environment\n\n* Window \n\nIn the PowerShell enter :\n\n```\nmyenv\\Scripts\\activate.bat\n```\n\n* Unix/MacOS\n\n```shell\nsource myenv/bin/activate\n```\n\nThen, you can run the script by entering the following command :\n```shell\n(myenv) computerName:ML_trash_selector$ python3 main.py\n```\n\n### Install libraries \n\nLibraries have to be installed in the virtual env.\n\nThe following command permits to install all the libraries needed to run the code :\n\n```\n    activate venv (see above)\n    pip install numpy\n    pip install pillow\n    pip install opencv-python\n    pip install tensorflow\n    pip install serial\n\n    run main script\n```\n\n## Update Model \n\nIf you want to update the model you have to create new classes in TeachableMachine and then train the model and export the model using TensorFlow and Keras.\n\nThen you have to replace keras_model.h5 with the downloaded one.\n\n\n## Arduino connection\n\nIf you've got error concerning serial communication, check the port com defined in main.py line 13.\n\n```python\narduino = serial.Serial(port=\"/dev/tty.usbmodem143101\", baudrate=9600) # create usb link\n```\n\nOn window it might by on port COM.\n\nDo not hesitate to add issues if you've got any errors.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasduvinage%2Fml_trash_selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasduvinage%2Fml_trash_selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasduvinage%2Fml_trash_selector/lists"}