This application extracts feature vectors from images, builds an index and queries the index to find similar images.
My initial inspiration came from reading one of Adrian Rosebrock's blog articles, where he describes a simple image search algorithm written in Python.
The calculation of the feature vectors is based on Adrian's implementation, and I am looking forward to extending it as I learn more about image processing.
I am working on this module as part of my master's project at the University of Applied Sciences Salzburg.
- OpenCv 4
- Go 1.13
go mod download
Index & Web Interface:
go run cmd/api/main.go
# or
go build -o api cmd/api/main.go
PORT=8080 ./api -directory ./directory/containing/images
To import images from a directory and save them to a database run the following commands:
go build -o api cmd/api/main.go
go build -o fixtures cmd/fixtures/main.go
docker-compose up -d
DATABASE_URL=postgres://user:[email protected]/imgsim ./fixtures -directory ./directory/containing/images
./api
gRPC API
go run cmd/grpc/main.go
# or
go build -o api cmd/grpc/main.go
DATABASE_URL=postgres://user:password@host/database ./api