Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henkman/faceapp
faceapp package
https://github.com/henkman/faceapp
client face faceapp female male smile
Last synced: about 1 month ago
JSON representation
faceapp package
- Host: GitHub
- URL: https://github.com/henkman/faceapp
- Owner: henkman
- License: apache-2.0
- Created: 2017-04-11T09:22:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T09:43:59.000Z (about 7 years ago)
- Last Synced: 2024-06-20T11:11:12.549Z (6 months ago)
- Topics: client, face, faceapp, female, male, smile
- Language: Go
- Size: 433 KB
- Stars: 13
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
faceapp
=======small package for faceapp
```go
import (
"os"
"github.com/henkman/faceapp"
)func main() {
var s faceapp.Session
if err := s.Init(); err != nil {
panic(err)
}
var code string
{
fd, err := os.Open("test/bill.jpg")
if err != nil {
panic(err)
}
temp, err := s.UploadImage(fd)
fd.Close()
if err != nil {
panic(err)
}
code = temp
}
{
for _, fil := range []Filter{
FilterSmile,
FilterSmile2,
FilterHot,
FilterOld,
FilterYoung,
FilterFemale,
FilterMale,
FilterBlack,
FilterCaucasian,
FilterAsian,
FilterIndian,
} {
fd, err := os.OpenFile("test/bill_"+string(fil)+".jpg",
os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0750)
if err != nil {
panic(err)
}
if err := s.GetImage(fd, code, fil, false); err != nil {
fd.Close()
panic(err)
}
fd.Close()
}
}
}
```original: ![alt original](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill.jpg "original")
smile: ![alt smile](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_smile.jpg "smile")
smile_2: ![alt smile_2](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_smile_2.jpg "smile_2")
hot: ![alt hot](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_hot.jpg "hot")
old: ![alt old](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_old.jpg "old")
female: ![alt female](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_female.jpg "female")
male: ![alt male](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_male.jpg "male")
black: ![alt black](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_black.jpg "black")
caucasian: ![alt caucasian](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_caucasian.jpg "caucasian")
asian: ![alt asian](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_asian.jpg "asian")
indian: ![alt indian](https://raw.githubusercontent.com/henkman/faceapp/master/test/bill_indian.jpg "indian")