LucasThePatator / FaceDetectCrop

1 stars 0 forks source link

renamed reference folders causing duplicate/inconsistent output #11

Closed m-btt closed 1 year ago

m-btt commented 1 year ago

Original example reference folder setup:

> Kpop SNSD - Taeyeon
> Kpop SNSD - Jessica
> Kpop SNSD - Seohyun
> Kpop SNSD - Yoona
> Kpop SNSD - Yuri

After folder setup, references processed and reference database created.

Renamed reference folder setup:

> Kpop SNSD 1 Taeyeon
> Kpop SNSD 2 Jessica
> Kpop SNSD 3 Sunny
> Kpop SNSD 4 Tiffany
> Kpop SNSD 5 Hyoyeon
> Kpop SNSD 6 Sooyoung
> Kpop SNSD 7 Yuri
> Kpop SNSD 8 Yoona
> Kpop SNSD 9 Seohyun

image

After folder setup update, reference database updated with --update_db

Output result after standard crop/sort operation:

image Kpop SNSD - Taeyeon and Kpop SNSD 1 Taeyeon interpreted as two different faces: output sorted files are split across the two folders.

Inferences:

Potential solution ideas?

To enable folder setup to be updated before database update:

  1. Add possibility to request to list db.pt recorded references/faces associated paths

Parameter could generate and output a file referenceslist.txt (would then not require #9 prior to implementation)

  1. Add possibility to edit db.pt to change linked face/folderpath name?

'Simplest' idea would be by user manually replacing referenceslist.txt with updated values and running a parameter to merge that with currently existing db. Other idea would be to set a parameter allowing user to modify an existent reference foldername to another via command line.

  1. Record existing list of reference folders and add step to --update_db to check if the structure has been changed and notify user of potential problems (e.g. renamed folders)

If another solution is implemented that allows user to update the references' filepath name prior to update, step could instead reject db update completely, or require manual confirmation input from user. (a la 'Are u sure? Enter Y if yes, N to cancel')

  1. Assign unique IDs per reference folder/face pathname and store them Could make above suggestions more straight-forward.