Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abates/disgo
Duplicate Image Search in GO
https://github.com/abates/disgo
Last synced: about 7 hours ago
JSON representation
Duplicate Image Search in GO
- Host: GitHub
- URL: https://github.com/abates/disgo
- Owner: abates
- License: apache-2.0
- Created: 2015-07-11T00:01:00.000Z (over 9 years ago)
- Default Branch: develop
- Last Pushed: 2018-07-25T00:21:09.000Z (over 6 years ago)
- Last Synced: 2024-06-20T14:22:09.962Z (5 months ago)
- Language: Go
- Size: 243 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Duplicate Image Search in GO
[![Build Status](https://travis-ci.org/abates/disgo.svg?branch=develop)](https://travis-ci.org/abates/disgo) [![GoDoc](https://godoc.org/github.com/abates/disgo?status.png)](https://godoc.org/github.com/abates/disgo) [![Coverage Status](https://coveralls.io/repos/github/abates/disgo/badge.svg?branch=develop)](https://coveralls.io/github/abates/disgo?branch=develop)
This package is still a work in progress, but it works well in my own testing.
### Example
```Go
package mainimport "fmt"
import "github.com/abates/disgo"
func main() {
// Create a disgo database with the default radix index
db, _ := disgo.New()// load an image into the database and get the hash back
file, _ := os.Open("test.png")
hash, _ := db.AddFile(file)
fmt.Printf("Image Hash: %08x\n", hash)// search for all hashes with a Hamming distance of 3
// or less
matches, _ := db.SearchByHash(hash, 3)
fmt.Printf("Matches: %v\n", matches)
}```
### TODO
- [ ] make radix index save/load functions thread safe
- [ ] add record storage (e.g. file path) to database