https://github.com/shitpostingio/fingerprint-microservice
https://github.com/shitpostingio/fingerprint-microservice
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shitpostingio/fingerprint-microservice
- Owner: shitpostingio
- License: mit
- Created: 2021-01-03T12:49:15.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-03T16:08:50.000Z (over 5 years ago)
- Last Synced: 2023-07-27T22:37:12.865Z (almost 3 years ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fingerprint Microservice
REST-powered microservice for analyzing media and returning feature-based information.
The repository also contains a client to perform requests to the service.
It is important to notice that this service provides no support for authentication or caching. It is also completely stateless, making it ideal to be used in the backend. A possible "frontend" implementation can be found in [Analysis API](https://gitlab.com/shitposting/analysis-api).
## Endpoints
- Image endpoint: `/fingerprinting/image`
- Video endpoint: `/fingerprinting/video`
- Health check: `/healthy`
## Returned data
The data returned by the server is in the form:
```go
type Analysis struct {
Fingerprint FingerprintResponse
NSFW NSFWResponse
FingerprintErrorString string
NSFWErrorString string
}
```
The client trims off the unnecessary data and returns:
```go
type FingerprintResponse struct {
PHash string
Histogram []float64
}
```
## Environment options
- Service bind address and port: `FP_BIND_ADDRESS` (defaults to `localhost:10000`).
- Max size for image files: `FP_MAX_IMAGE_SIZE` (defaults to `10 << 20`, 10 MB).
- Max size for video files: `FP_MAX_VIDEO_SIZE` (defaults to `20 << 20`, 20 MB).