nextcloud / nextcloud/recognize

Idea: use dates and metadata for better clustering

Open
#566 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
699
Forks
68
Avg merge
1d 4h
Merged PRs (30d)
5

Description

Describe the feature you'd like to request

Disclaimer: I haven't read the code; this is mostly based on the behind-the-scenes wiki page and my experience with clustering.

Given that a person cannot be in two places simultaneously, it would be interesting to assume that people close in space and time are more likely to appear than others.

This could possibly lead to runaway situations, but the following information could be used:

  • Date and time
  • Camera identifier (hash together multiple identifiers)
    • File naming convention can help with identifying the camera: I know apple devices name files differently, so do a few cameras. There aren't that many formats.
  • Location data
Describe the solution you'd like

At the very least, pictures that are very close in time (and possibly metadata) can be reasonably assumed to be of the same scene for the initial guess (it's very common to take multiple pictures successively for group pictures).

Bayesian probabilities can help here: to identify the probability that X appears in a picture where Y appears: P(X|Y) = P(Y|X)*P(X)/P(Y). Of course, those probabilities on the right are estimates, and this may become a runaway feedback loop if not checked against the estimated P(X) as inferred by the network.

The same Bayesian formula can be used by replacing Y with other metadata: person taking the picture, date/time bins, location.

In the worst case, more clusters would be created, but those are generally easier to deal with than false positives, in my experience. And with any luck, one picture will get a good match with the reference, allowing the cluster to be combined automatically.

Describe alternatives you've considered

I made a second observation (and can open a distinct issue if you prefer): Groups of friends tend to cluster together, and an account owner is likely to attend events with distinct groups.

It may make sense to try to extract "super-groups" by grouping people who appear together in pictures, and/or close in time/space as per the metadata. If a few good matches are found for new pictures, it would make sense to first look among the previous supergroups, or have a heavier bias towards them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points; start by locating the existing clustering and metadata-processing implementation. Done would require a decided, bounded design for using date/time, camera identifiers, and location data to improve clustering without runaway feedback.

Written by the indexing model from the issue text.

Assessment

Tech stack
machine-learning
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.