Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
koyachi committed May 2, 2014
0 parents commit 9fa09da
Show file tree
Hide file tree
Showing 9 changed files with 468 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*~
.DS_Store
build
tmp
22 changes: 22 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2014 koyachi

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# go-nude

Nudity detection with Go.

(Go porting from https://github.com/pa7/nude.js)

## Example

```go
package main

import (
"fmt"
"log"
"github.com/koyachi/go-nude"
)

func main() {
imagePath := "images/test2.jpg"

isNude, err := nude.IsNude(imagePath)
if err != nil {
log.Fatal(err)
}
fmt.Printf("isNude = %v\n", isNude)
}

```

## Ohter implementations

- [nude.js](http:https://www.patrick-wied.at/static/nudejs/)
- [nude.rb](https://github.com/mitukiii/nude.rb)
- [nude.py](https://github.com/hhatto/nude.py)


## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
Binary file added example/images/damita.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/images/damita2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/images/test2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/images/test6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions example/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package main

import (
"../"
"fmt"
"log"
)

func main() {
//imagePath := "images/damita.jpg"
//imagePath := "images/damita2.jpg"
imagePath := "images/test2.jpg"
//imagePath := "images/test6.jpg"

isNude, err := nude.IsNude(imagePath)
if err != nil {
log.Fatal(err)
}
fmt.Printf("isNude = %v\n", isNude)
}
Loading

0 comments on commit 9fa09da

Please sign in to comment.