AI: Do not add portrait or people labels from face markers #5232

Related issues: #5233 (reset command), #5234 (schedule for models)

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2025-10-05 04:37:20 +02:00
parent e5dc335bcf
commit 240ee9f0ce
2 changed files with 4 additions and 7 deletions

View file

@ -89,7 +89,8 @@ func (m Markers) SubjectNames() (names []string) {
return txt.UniqueNames(names)
}
// Labels returns matching labels.
// Labels returns a list of matching labels.
// TODO: Function is currently unused, decide how to proceed with it.
func (m Markers) Labels() (result classify.Labels) {
faceCount := 0

View file

@ -353,12 +353,8 @@ func (ind *Index) UserMediaFile(m *MediaFile, o IndexOptions, originalName, phot
file.AddFaces(faces)
}
// Any new markers?
if file.UnsavedMarkers() {
// Add matching labels.
extraLabels = append(extraLabels, file.Markers().Labels()...)
} else if o.FacesOnly {
// Skip when indexing faces only.
// Skip when indexing faces only and no new markers were found.
if !file.UnsavedMarkers() && o.FacesOnly {
result.Status = IndexSkipped
return result
}