quick add of default_{model|threshold} to settings, face_refimg_link now stores model_used and face_distance AND working implementation of own face_distance algorithm rather than compareAI(), removed older AI code it would no longer work with DB structures anyway, tweaked viewer to remove coords of unmatched faces for now

This commit is contained in:
2021-07-26 18:39:36 +10:00
parent 555ce70577
commit cd51ea21bf
4 changed files with 83 additions and 123 deletions

59
TODO
View File

@@ -1,33 +1,24 @@
## GENERAL
* Face matching:
- upgrade to face distance per face per file
- so we dont get 2 x same face in one file, and if it could match say Cam and Mich for 1 face, take the higher match, not the first one to be over the threshold
- allow for threshold/settings to be tweaked from the GUI?
---> at least settings for default value (back to 0.6 / 0.5?)
---> with override table to do per file / per face?
- face locations:
START FORM SCRATCH so all images have face_locn data
- algo:
for each face (even known) in image
foreach refimg
get face_distance
sort by face_distance
for each face
connect lowest score with that face (for this file)
this means this face is no longer 'free' for a match
if (sorted) face distance > 0.55 stop as no further 'matches'
- use cnn model (check ftst.py) for ref images, and potentially as a setting to check images without a face?
- or always?
-- would CUDA be useful here? (which is faster say an old 730 or the AMD cpu?)
* allow for and implement: default_refimg_model and default_scan_model
- cnn for refimgs should be defaul, for scan use hog
- research upsample val...
* viewer needs to allow toggle to scan_model (and prob. right-click on file... AI (with CNN) AI (with hog)
- I think go to html5 toggles for: face, distance (only shows if you toggle face on), drop-down for model (allow change to cnn and reprocess)
- show matching face distance in viewer
- might be best for AI_Model to have friendly name (slow, slower) :)
* remove dirs after the duplicate cleanup removes all its content
* Face matching:
- upgrade to face distance per face per file [DONE]
- face locations:
START FORM SCRATCH for prod so all images have face_locn data
* viewer:
can we make it preload next/prev images, and only reload the image div when we jump? to make arrow-based nav much faster
* remove dirs after the duplicate cleanup removes all its content
* could look to remove the hand fixing of json.loads of array data --> seems you can make your own datatype in the ORM, and it can do the conversion every time you use it
- https://stackoverflow.com/questions/28143557/sqlalchemy-convert-column-value-back-and-forth-between-internal-and-database-fo
@@ -52,22 +43,24 @@
need a manual button to restart a job in the GUI,
(based on file-level optims, just run the job as new and it will optim over already done parts and continue)
Future:
Admin
-> reset face_flag
AI
-> rescan <dir> for <person> --> can do this on new image only
(optimised to only scan has_unidentified_face)... BUT if you change
thresholds on AI, or we get a new/better one some day, then it can
all images with faces, or if we 'reset face_flag' rescan all images
Admin
-> delete old jobs / auto delete jobs older than ???
-> do I want to have admin roles/users?
### AI
* faces per file (need a threshold for too many? OR
* consider size of bbox of face / 'high-quality' faces -- if face is too small in image, dont match it
* if we have a high-qual face, we could show this on a page and have UI to create ref img / person for it
### UI
??? ipads can't do selections and contextMenus, do I want to re-factor to cater for this?
- partial fix, double-click / tap allows viewing (most useful context-menu feature)
For AI / rescan:
way to override per file:
the model used
the threshold used?
maybe on the per file you could select an unknown face and add it as a ref img to a existing person, or make a new person and attach?
file details is sort of crap - only works on import path
- probably better to have a different 'view', e.g. folders/flat/detailed