Skip to content

Add a dedicated command for RemoveDuplicateFaceDetection #1604

Open

Description

@csidirop

Describe the feature you'd like to request

It would be useful to have a dedicated command for the duplicate face repair feature (added in #1318) in the Recognize administration interface and/or corresponding occ recognize:* commands.

Recognize already contains several maintenance/reset operations as well as the repair step for exact duplicate face detections. It would be helpful to expose this to the user for manual use.

While experimenting with TaskProcessing and recognize_backend, I managed to create a face database containing a substantial number of duplicate detections. (see #1603 ) The existing exact-duplicate repair was useful, but troubleshooting the remaining state required manually querying the Recognize tables. A maintenance interface could make situations like this much easier without requiring direct database manipulation.

In addition a "near-duplicate face detection" could be interesting. I had (and still have) pictures where the bounding boxes are not identical but off by some pixels.

Describe the solution you'd like

For example:

  • Check for exact duplicate face detections
    • same file_id
    • same user_id
    • same bounding box
    • show number of affected detections
    • optionally remove them
  • Check for near-duplicate face detections
    • same file/user
    • highly overlapping bounding boxes
    • show counts before making any changes
  • Safely remove near-duplicates belonging to the same cluster
    • only operate on positive/assigned clusters
    • retain one detection
    • leave ambiguous cross-cluster cases untouched
  • Report ambiguous duplicates
    • near-identical detections assigned to different clusters
    • unassigned / -1 cases
    • these could be left for manual review rather than modified automatically
  • Dry-run / preview
    • report how many rows would be affected before executing a repair

Existing Recognize maintenance operations could potentially be grouped in the same section so administrators have one place for face-database diagnostics and recovery.

Describe alternatives you've considered

occ recognize:reset-faces && occ recognize:recrawl

With the new TaskProcessing / Recognize Backend being so fast, that could really be an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions