From baa90f9955849c04cbdd65e447752f7f55c855cb Mon Sep 17 00:00:00 2001 From: viktorstrate Date: Mon, 22 Feb 2021 19:46:47 +0100 Subject: [PATCH] Finish up face recognition --- Dockerfile | 2 +- README.md | 15 +++++++++++++++ docker_go_wrapper.sh => docker/go_wrapper.sh | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) rename docker_go_wrapper.sh => docker/go_wrapper.sh (95%) diff --git a/Dockerfile b/Dockerfile index 3e2d2df7..e6bb67a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN apt-get install -y \ RUN echo $PATH -COPY docker_go_wrapper.sh /go/bin/go +COPY docker/go_wrapper.sh /go/bin/go RUN chmod +x /go/bin/go ENV CGO_ENABLED 1 diff --git a/README.md b/README.md index 297b70c9..83cfcf15 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Password: **demo** - **Sharing**. Albums, as well as individual media, can easily be shared with a public link, the link can optinally be password protected. - **Made for photography**. Photoview is built with photographers in mind, and thus supports **RAW** file formats, and **EXIF** parsing. - **Video support**. Many common video formats are supported. Videos will automatically be optimized for web. +- **Face recognition**. Faces will automatically be detected in photos, and photos of the same person will be grouped together. - **Performant**. Thumbnails are automatically generated and photos first load when they are visible on the screen. In full screen, thumbnails are displayed until the high resolution image has been fully loaded. - **Secure**. All media resources are protected with a cookie-token, all passwords are properly hashed, and the API uses a strict [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). @@ -107,6 +108,20 @@ The photos will have to be scanned before they show up, you can start a scan man ### Start API server Make sure [golang](https://golang.org/) is installed. + +Some C libraries are needed to compile the API, see [go-face requirements](https://github.com/Kagami/go-face#requirements) for more details. +They can be installed as shown below: + +```sh +# Ubuntu +sudo apt-get install libdlib-dev libblas-dev liblapack-dev libjpeg-turbo8-dev +# Debian +sudo apt-get install libdlib-dev libblas-dev liblapack-dev libjpeg62-turbo-dev +# macOS +brew install dlib + +``` + Then run the following commands: ```bash diff --git a/docker_go_wrapper.sh b/docker/go_wrapper.sh similarity index 95% rename from docker_go_wrapper.sh rename to docker/go_wrapper.sh index fc81dd69..4526eccb 100644 --- a/docker_go_wrapper.sh +++ b/docker/go_wrapper.sh @@ -1,5 +1,8 @@ #!/bin/sh +# Script to configure environment variables for Go compiler +# to allow cross compilation + : ${TARGETPLATFORM=} : ${TARGETOS=} : ${TARGETARCH=}