emotions

command
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2019 License: MIT Imports: 15 Imported by: 0

README

Emotion fer+

This is an example of onnx go being able to run the emotion fer+ model

Howto

  • Download an extract the model from the zoo
  • take a picture of a face: the picture should be 64X64 in gray mode and in png.
  • run go run main.go -model /path/to/model.onnx -input mypic.png

pre-processing with ImageMagick

The tool assumes that the input image is in the correct format. You can check the format with this command:

> identify input.png
me.png PNG 64x64 64x64+0+0 8-bit LinearGray 256c 2665B 0.010u 0:00.000

You can convert a picture to the expected format with:

> convert source.jpg -resize 64 -set colorspace Gray -separate -average dest.png

You can also pipe the result directly into the command:

convert ~/Downloads/download.png -resize 64 -set colorspace Gray -separate -average png:- | \
    go run main.go -model /path/to/model.onnx -input -

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL