https://github.com/enpit/tensorflow-for-lego
https://github.com/enpit/tensorflow-for-lego
machine-learning object-detection tensorflow tensorflow-experiments
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/enpit/tensorflow-for-lego
- Owner: enpit
- Created: 2017-08-28T15:29:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-23T10:20:52.000Z (over 8 years ago)
- Last Synced: 2025-04-07T02:05:43.827Z (10 months ago)
- Topics: machine-learning, object-detection, tensorflow, tensorflow-experiments
- Language: Python
- Size: 15.1 MB
- Stars: 8
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tensorflow for Lego object detection
## Requirements
- Tensorflow 1.2.1
- ffmpeg 3.3.3
(Tested on macOS 10.12.6)
## Prepare Training images
Create video of a specific brick, e.g. brick2x4.mov
Move to training-data/brick2x4
Create images (3 per second):
```
$ ffmpeg -i brick2x4.mov -vf fps=3 img%03d.jpg
```
## Start training
```
$ ./learn.sh
```
## Predict recognition
```
$ python label_image.py evaluation-data/eval2x2.png
brick2x2 (score = 0.67055)
brick2x3 (score = 0.28938)
brick2x4 (score = 0.03470)
brick1x2 (score = 0.00537)
```
## Resources
- See also https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0
- The retrain.py script is part of the tensorflow repo
```
$ curl -O https://raw.githubusercontent.com/tensorflow/tensorflow/r1.1/tensorflow/examples/image_retraining/retrain.py
```