-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Better Facial Recognition Clusters #14911
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Better Facial Recognition Clusters | ||
|
||
## Purpose | ||
|
||
This guide explains how to optimize facial recognition in systems with large image libraries. By following these steps, you'll achieve better clustering of faces, reducing the need for manual merging. | ||
|
||
--- | ||
|
||
## Important Notes | ||
|
||
- **Best Suited For:** Large image libraries after importing a significant number of images. | ||
- **Warning:** This method deletes all previously assigned names. | ||
- **Tip:** **Always take a [backup](/docs/administration/backup-and-restore#database) before proceeding!** | ||
|
||
--- | ||
|
||
## Step-by-Step Instructions | ||
|
||
### Objective | ||
|
||
To enhance face clustering and ensure the model effectively identifies faces using qualitative initial data. | ||
|
||
--- | ||
|
||
### Steps | ||
|
||
#### 1. Adjust Machine Learning Settings | ||
|
||
Navigate to: | ||
**Admin → Administration → Settings → Machine Learning Settings** | ||
|
||
Make the following changes: | ||
|
||
- **Minimum detection score:** | ||
Set this to **0.5**. | ||
> This helps recognize more faces while avoiding false positives (non-faces). | ||
- **Maximum recognition distance (Optional):** | ||
Lower this value, e.g., to **0.4**, if the library contains people with similar facial features. | ||
- **Minimum recognized faces:** | ||
Set this to a **high value** (e.g., 10). | ||
> A high value ensures clusters only include faces that appear at least 10 times in the library, improving the initial clustering process. | ||
|
||
--- | ||
|
||
#### 2. Run Reset Jobs | ||
|
||
Go to: | ||
**Admin → Administration → Settings → Jobs** | ||
|
||
Perform the following: | ||
|
||
1. **FACE DETECTION → Reset** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just resetting facial recognition is enough without the detection score change. If you do change the detection score, then you should only queue face detection and let it queue faces for recognition automatically. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, in fact it should run the job automatically as you mentioned, it's a bit old guide I wrote, and if I'm not mistaken at the time there was a "bug" that didn't run this job automatically. (If this is no longer the case then I will remove this part) |
||
2. **FACIAL RECOGNITION → Reset** | ||
|
||
> These reset jobs rebuild the recognition model based on the new settings. | ||
|
||
--- | ||
|
||
#### 3. Refine Recognition with Lower Thresholds | ||
|
||
Once the reset jobs are complete, refine the recognition as follows: | ||
|
||
- **Step 1:** | ||
Return to **Minimum recognized faces** in Machine Learning Settings and lower the value to **8**. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 10 -> 8 might get the right result for your library, but I think it's too subtle to work as a general recommendation. Maybe 20 -> 10 -> 3? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From a test I did, setting the value too high to start with causes many faces to not be recognized (because 20 faces per person is too many), which causes people who look similar to other person to merge (false positives). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But this is going to vary by library, right? Some people will have large libraries where 10 vs 8 doesn't matter, some people will have burst photos, etc. You can adjust the text to recommend different numbers based on their library. |
||
|
||
> Run the job: **FACIAL RECOGNITION → MISSING Mode** | ||
|
||
- **Step 2:** | ||
Lower the value again to **3**. | ||
> Run the job: **FACIAL RECOGNITION → MISSING Mode** | ||
|
||
--- | ||
|
||
## Outcome | ||
|
||
This method creates high-quality face clusters for core faces and ensures the model can reliably add new faces as they appear in your library. | ||
Comment on lines
+74
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems unnecessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍I will remove this part soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommending a different detection score is out of scope for this guide. A lower score risks false positives that are difficult to deal with once they exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can understand the reason you say this, I decided to point it out because in the test I did that once I obtained high-quality clusters even faces that are a little covered (and when the value is 0.6 they are not even recognized at all) manage to enter the high-quality cluster that is created and then there is no risk in faces that are not assigned to anyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not have caused an issue for your library, but I've seen it cause non-faces to come up for others and things get very messy. A guide that shows how to get higher quality results shouldn't suggest things that can often cause lower quality results.