mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 20:59:03 +00:00
Make face detection optional at build-time (#881)
Add a "no_face_detection" build tag to disable face detection when building. This is useful when installing the face detection dependencies is undesirable and cuts down build times (e.g. on a Raspberry Pi).
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/Kagami/go-face"
|
||||
"github.com/photoview/photoview/api/database/drivers"
|
||||
"github.com/photoview/photoview/api/scanner/media_encoding/media_utils"
|
||||
"gorm.io/gorm"
|
||||
@@ -45,7 +44,7 @@ func (f *ImageFace) FillMedia(db *gorm.DB) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type FaceDescriptor face.Descriptor
|
||||
type FaceDescriptor [128]float32 // same as go-face's Descriptor
|
||||
|
||||
// GormDataType datatype used in database
|
||||
func (FaceDescriptor) GormDBDataType(db *gorm.DB, field *schema.Field) string {
|
||||
|
||||
Reference in New Issue
Block a user