Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinrab/go-tensorflow-image-recognition
Image Recognition API in Go using TensorFlow
https://github.com/tinrab/go-tensorflow-image-recognition
api docker golang tensorflow
Last synced: about 2 hours ago
JSON representation
Image Recognition API in Go using TensorFlow
- Host: GitHub
- URL: https://github.com/tinrab/go-tensorflow-image-recognition
- Owner: tinrab
- License: mit
- Created: 2017-10-12T06:12:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-24T12:12:15.000Z (over 5 years ago)
- Last Synced: 2025-01-02T11:07:41.109Z (7 days ago)
- Topics: api, docker, golang, tensorflow
- Language: Go
- Homepage:
- Size: 90.8 KB
- Stars: 250
- Watchers: 9
- Forks: 77
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Recognition API in Go using TensorFlow
This is the underlying code for article [Build an Image Recognition API with Go and TensorFlow](https://outcrawl.com/image-recognition-api-go-tensorflow).
## Running the service
Build the image.
```
$ docker build -t localhost/recognition .
```Run service in a container.
```
$ docker run -p 8080:8080 --rm localhost/recognition
```Call the service.
```
$ curl localhost:8080/recognize -F 'image=@./cat.jpg'
{
"filename": "cat.jpg",
"labels": [
{ "label": "tabby", "probability": 0.45087516 },
{ "label": "Egyptian cat", "probability": 0.26096493 },
{ "label": "tiger cat", "probability": 0.23208225 },
{ "label": "lynx", "probability": 0.050698064 },
{ "label": "grey fox", "probability": 0.0019019963 }
]
}
```