Decrease face threshold
This commit is contained in:
parent
eaad404f55
commit
f3ccc60e26
|
@ -108,7 +108,7 @@ func (fd *FaceDetector) DetectFaces(media *models.Media) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fd *FaceDetector) classifyDescriptor(descriptor face.Descriptor) int32 {
|
func (fd *FaceDetector) classifyDescriptor(descriptor face.Descriptor) int32 {
|
||||||
return int32(fd.rec.ClassifyThreshold(descriptor, 0.3))
|
return int32(fd.rec.ClassifyThreshold(descriptor, 0.2))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fd *FaceDetector) classifyFace(face *face.Face, media *models.Media, imagePath string) error {
|
func (fd *FaceDetector) classifyFace(face *face.Face, media *models.Media, imagePath string) error {
|
||||||
|
|
|
@ -303,7 +303,7 @@ func getMediaType(path string) (*MediaType, error) {
|
||||||
func isPathMedia(mediaPath string, cache *AlbumScannerCache) bool {
|
func isPathMedia(mediaPath string, cache *AlbumScannerCache) bool {
|
||||||
mediaType, err := cache.GetMediaType(mediaPath)
|
mediaType, err := cache.GetMediaType(mediaPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ScannerError("%s (%s)", err, mediaPath)
|
ScannerError("isPathMedia (%s): %s", mediaPath, err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ func directoryContainsPhotos(rootPath string, cache *AlbumScannerCache) bool {
|
||||||
|
|
||||||
dirContent, err := ioutil.ReadDir(dirPath)
|
dirContent, err := ioutil.ReadDir(dirPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ScannerError("Could not read directory: %s\n", err.Error())
|
ScannerError("Could not read directory (%s): %s\n", dirPath, err.Error())
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue