https://github.com/ghostrick/vision-api-hobby
🐕 VisionAPIで遊んだ
https://github.com/ghostrick/vision-api-hobby
elixir google-cloud-platform vision-api
Last synced: 20 days ago
JSON representation
🐕 VisionAPIで遊んだ
- Host: GitHub
- URL: https://github.com/ghostrick/vision-api-hobby
- Owner: ghostrick
- Created: 2018-10-04T07:09:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-04T07:25:37.000Z (over 7 years ago)
- Last Synced: 2025-03-11T05:41:14.918Z (over 1 year ago)
- Topics: elixir, google-cloud-platform, vision-api
- Language: Elixir
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VisionApiHobby
Let's play with VisionAPI.
# Usage
```bash
$ git clone git@github.com:ghostrick/vision-api-hobby.git
$ cd vision-api-hobby
$ cp config/config.exs.sample config/config.exs
$ vim config/config.exs # Setting goth
$ mix deps.get
$ mix compile
$ iex -S mix
```
```elixir
# Detect items and places in the image.
# Pass local path or url.
# If you want to pass encoded data(base64).
# -> VisionApiHobby.Tag.detect_tags("...", encoded: true)
VisionApiHobby.Tag.detect_tags("./image/hoge.jpg")
# %{
# labels: ["pink", "mammal", "cartoon", "vertebrate", "nose", "heart"],
# landmarks: []
# }
# Function that wrapped v1/images:annotate.
VisionApiHobby.judge_image("./image/hoge.jpg", ["LABEL_DETECTION", "LANDMARK_DETECTION"])
# Function that download image and encode it with base64.
VisionApiHobby.Utils.download_image_base64("https://.../hoge.jpg")
```