{"id":15391498,"url":"https://github.com/skovy/tensorflow-dice-model","last_synced_at":"2026-05-16T11:01:20.900Z","repository":{"id":91751333,"uuid":"577554562","full_name":"skovy/tensorflow-dice-model","owner":"skovy","description":"🎲 Tensorflow Lite models for detecting and classifying dice","archived":false,"fork":false,"pushed_at":"2023-01-07T19:32:54.000Z","size":68247,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T01:26:48.919Z","etag":null,"topics":["dice","image-classification","object-detection","tensorflow","tensorflow-lite"],"latest_commit_sha":null,"homepage":"https://skovy.dev/blog/detecting-dice-with-tensorflow","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/skovy.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":"2022-12-13T01:53:36.000Z","updated_at":"2023-12-19T05:15:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9c397f2-979b-49a5-a1ed-a58b8037d628","html_url":"https://github.com/skovy/tensorflow-dice-model","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"0e09d8e2795f2ba366c761f2196e77758b90dbb5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Ftensorflow-dice-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Ftensorflow-dice-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Ftensorflow-dice-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Ftensorflow-dice-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skovy","download_url":"https://codeload.github.com/skovy/tensorflow-dice-model/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245938742,"owners_count":20697084,"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":["dice","image-classification","object-detection","tensorflow","tensorflow-lite"],"created_at":"2024-10-01T15:11:30.244Z","updated_at":"2025-10-29T01:35:52.169Z","avatar_url":"https://github.com/skovy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎲 Tensorflow Lite die detection and classification\n\nThis repository is an exploration using Tensorflow Lite to train models to detect and classify die.\n\n![example of die detection](./example.jpg)\n\n## Usage\n\nThese models are deployed in a [Dice tracker](https://dice-tracker.vercel.app) web app. The code is [available on GitHub](https://github.com/skovy/tensorflow-dice-app).\n\n## Tensorflow setup\n\nFollow the [setup instructions](https://www.tensorflow.org/install) to install Python and Tensorflow on your machine.\n\n## Repository structure\n\n### `image_data`\n\nThis directory contains all the images and metadata for training, testing, and validating the models. The label metadata was created using [`labelImg`](https://github.com/heartexlabs/labelImg) and saved as PASCAL VOC formatted XML files.\n\nIf you would like to use and improve these models, submitting additional images and metadata would be helpful to improve training!\n\n### `model_makers`\n\nThis directory contains the following models which are built using [Tensorflow Lite's `tflite_model_maker`](https://www.tensorflow.org/lite/api_docs/python/tflite_model_maker) module with Python.\n\n- `die_detection_and_classification`: an attempt to detect die and label them _(1-6)_ in a single detection model. This was abandoned in favor of a two-step process: first detecting, then classifying.\n- `die_detection`: a model using [object detection](https://www.tensorflow.org/lite/examples/object_detection/overview) to detect dice within images.\n- `die_classification`: a model using [image classification](https://www.tensorflow.org/lite/examples/image_classification/overview) to label die with the appropriate class _(1-6)_.\n\nTo train and create these models, change into the corresponding directory (eg: `cd model_makers/die_detection`), and run `python model_maker.py`.\n\n### `output_models`\n\nThis directory contains the trained models output from the `model_makers` above. This file can be copied and used with other Tensorflow Lite packages for mobile and web applications.\n\nEach directory contains additional Python scripts for testing these output models and using them for other steps. For example, the object detection model is used to crop each die to be used as the training data for the image classifier model.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskovy%2Ftensorflow-dice-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskovy%2Ftensorflow-dice-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskovy%2Ftensorflow-dice-model/lists"}