{"id":15642530,"url":"https://github.com/nickm-27/swatch","last_synced_at":"2025-04-19T13:51:09.699Z","repository":{"id":37924436,"uuid":"473759724","full_name":"NickM-27/swatch","owner":"NickM-27","description":"Color detection in images to capture presense of known objects.","archived":false,"fork":false,"pushed_at":"2023-10-01T14:43:19.000Z","size":456,"stargazers_count":78,"open_issues_count":13,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T08:23:53.704Z","etag":null,"topics":["ai","camera","home-assistant","home-automation","object-detection","opencv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NickM-27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/funding.yml","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},"funding":{"github":"NickM-27","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-03-24T20:15:12.000Z","updated_at":"2025-03-14T16:23:14.000Z","dependencies_parsed_at":"2023-10-01T15:33:15.421Z","dependency_job_id":null,"html_url":"https://github.com/NickM-27/swatch","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickM-27%2Fswatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickM-27%2Fswatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickM-27%2Fswatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickM-27%2Fswatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NickM-27","download_url":"https://codeload.github.com/NickM-27/swatch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390896,"owners_count":20769475,"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","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":["ai","camera","home-assistant","home-automation","object-detection","opencv"],"created_at":"2024-10-03T11:56:41.573Z","updated_at":"2025-03-30T22:31:32.270Z","avatar_url":"https://github.com/NickM-27.png","language":"Python","funding_links":["https://github.com/sponsors/NickM-27"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable first-line-heading --\u003e\n\u003c!-- markdownlint-disable no-inline-html --\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/NickM-27/swatch/master/assets/swatch.png\"\n     alt=\"Swatch icon\"\n     width=\"16%\"\n     align=\"right\"\n     style=\"float: right; margin: 10px 0px 20px 20px;\" /\u003e\n\n[![GitHub Release](https://img.shields.io/github/release/NickM-27/swatch.svg?style=flat-square)](https://github.com/NickM-27/swatch/releases)\n[![Build Status](https://img.shields.io/github/workflow/status/NickM-27/swatch/Build?style=flat-square)](https://github.com/NickM-27/swatch/actions/workflows/build.yaml)\n[![License](https://img.shields.io/github/license/NickM-27/swatch.svg?style=flat-square)](LICENSE)\n\n# swatch\n\nColor detection in images to capture presence of known objects.\n\n## Why?\n\nThere is great object and face detection software out there, but sometimes AI detection is overkill or not suitable different types of objects. Swatch was created to create an easy to use API to detect the presence of objects of known color in expected places.\n\nIn this example you can see a cropped section of the street with a trash can. Then, using expected color bounds, the parts of the image that don't match the expected color are masked away. If a significant enough amount of pixels are left that match the color then it can be considered a true positive.\n\n![street](https://user-images.githubusercontent.com/14866235/171231052-a7a4dbf0-569b-41f5-83c9-dd603ac3301e.png)\n![street-bounding](https://user-images.githubusercontent.com/14866235/171231110-0192438d-d2ae-4e9b-8382-466be5c9b9c9.jpg)\n![street-mask](https://user-images.githubusercontent.com/14866235/171231286-1c38ffbe-679d-40a0-8840-eff91f19eb59.jpg)\n\n## Features\n\n- REST API to be invoked by other applications\n- Intuitive frontend UI to manage swatch and use the **Color Playground** to fine tune colors for the config.\n- [HomeAssistant Integration](https://github.com/NickM-27/swatch-hass-integration)\n- [HomeAssistant Addon](https://github.com/NickM-27/swatch-hass-addon)\n\n## Web UI\n\n### Color Playground\n\n\u003cimg src=\"https://raw.githubusercontent.com/NickM-27/swatch/master/assets/color-playground.png\"\n     alt=\"Swatch Color Playground\" /\u003e\n\n## Configuration\n\nA `config.yaml` file must be created and mapped to `/config`\n\nCheck out [GitHub Docs](docs/config.md) for example and more instructions on creating the config file.\n\n## Adding Objects\n\nCheck out the [Color Setup Docs](docs/finding-color-values.md) for how to setup objects and fine the color values to use.\n\n## API References\n\nCheck out [GitHub Docs](docs/api.md) for the API reference.\n\n## Contributing\n\n**Contributions are very much welcome!**\n\nFor instructions on how to get started, see the [contributing section](CONTRIBUTING.md)\n\n### Donations\n\nIf you would like to make a donation to support development, please use [GitHub Sponsors](https://github.com/sponsors/NickM-27).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickm-27%2Fswatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickm-27%2Fswatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickm-27%2Fswatch/lists"}