updated TODO to remove AI job count issues, and added optimised AI searching code to reduce DB queries on recursion into dirs
This commit is contained in:
16
TODO
16
TODO
@@ -1,20 +1,22 @@
|
|||||||
## GENERAL
|
## GENERAL
|
||||||
|
|
||||||
|
* with any job, count logs, then commit per 100 log lines of a job (and then ditch the commit in import dir for this)
|
||||||
|
|
||||||
* refimg
|
* refimg
|
||||||
- remove AI menu from top-level -> make a sub-of Person, and just have Match or AI
|
- remove AI menu from top-level -> make a sub-of Person, and just have Match or AI
|
||||||
- store the face locations? (good for debugging later, and we calc them as part of GenFace anyway) ...
|
- store the face locations? (good for debugging later, and we calc them as part of GenFace anyway) ...
|
||||||
(really, doing this properly, we shoudl keep the face locns for ALL images)...
|
(really, doing this properly, we shoudl keep the face locns for ALL images)...
|
||||||
---> may well mean in a week or so, we move to the new DB structure, and START FORM SCRATCH)
|
---> may well mean in a week or so, we move to the new DB structure, and START FORM SCRATCH)
|
||||||
|
|
||||||
* need AI job to:
|
|
||||||
log amount matched, amount comparing too -> count should actually be total files in 'entries' (as we can select random entries to check)
|
|
||||||
|
|
||||||
* with any job, count logs, then commit per 100 log lines of a job (and then ditch the commit in import dir for this)
|
|
||||||
|
|
||||||
* allow rotate of image (permanently on FS, so its right everywhere)
|
* allow rotate of image (permanently on FS, so its right everywhere)
|
||||||
|
|
||||||
* improve photo browser -> view file, rather than just allowing browser to show image
|
* improve photo browser -> view file, rather than just allowing browser to show image
|
||||||
|
|
||||||
|
* allow for threshold/settings to be tweaked from the GUI
|
||||||
|
- it would be good to then say, just run the scanner against this image or maybe this DIR, to see how it IDs ppl
|
||||||
|
---> settings for default value
|
||||||
|
---> override table to do per file combos?
|
||||||
|
|
||||||
* fix up logging in general
|
* fix up logging in general
|
||||||
* comment your code
|
* comment your code
|
||||||
* more OO goodness :)
|
* more OO goodness :)
|
||||||
@@ -76,10 +78,6 @@
|
|||||||
https://www.highcharts.com/demo/heatmap
|
https://www.highcharts.com/demo/heatmap
|
||||||
https://www.highcharts.com/demo/packed-bubble-split
|
https://www.highcharts.com/demo/packed-bubble-split
|
||||||
|
|
||||||
### AI
|
|
||||||
* allow for threshold/settings to be tweaked from the GUI
|
|
||||||
- it would be good to then say, just run the scanner against this image or maybe this DIR, to see how it IDs ppl
|
|
||||||
|
|
||||||
|
|
||||||
### SORTER
|
### SORTER
|
||||||
* exif processing?
|
* exif processing?
|
||||||
|
|||||||
@@ -951,16 +951,12 @@ def JobProcessAI(job):
|
|||||||
|
|
||||||
def WrapperForScanFileForPerson(job, entry):
|
def WrapperForScanFileForPerson(job, entry):
|
||||||
which_person=[jex.value for jex in job.extra if jex.name == "person"][0]
|
which_person=[jex.value for jex in job.extra if jex.name == "person"][0]
|
||||||
if which_person == "all":
|
|
||||||
ppl=session.query(Person).all()
|
|
||||||
else:
|
|
||||||
ppl=session.query(Person).filter(Person.tag==which_person).all()
|
|
||||||
|
|
||||||
if entry.type.name == 'Image':
|
if entry.type.name == 'Image':
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
AddLogForJob( job, f'INFO: processing File: {entry.name}' )
|
AddLogForJob( job, f'INFO: processing File: {entry.name}' )
|
||||||
for person in ppl:
|
for pid in job.ppl:
|
||||||
ScanFileForPerson( job, entry, person.id, force=False)
|
ScanFileForPerson( job, entry, pid, force=False)
|
||||||
# processed this file, add 1 to count
|
# processed this file, add 1 to count
|
||||||
job.current_file_num+=1
|
job.current_file_num+=1
|
||||||
return
|
return
|
||||||
@@ -992,9 +988,14 @@ def JobRunAIOn(job):
|
|||||||
# update job, so file count UI progress bar will work
|
# update job, so file count UI progress bar will work
|
||||||
# remember that ProcessFilesInDir updates the current_file_num so zero it out so we can start again
|
# remember that ProcessFilesInDir updates the current_file_num so zero it out so we can start again
|
||||||
job.current_file_num = 0
|
job.current_file_num = 0
|
||||||
print( f"about to commit: {job}" )
|
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
|
ppl_lst=[]
|
||||||
|
for person in ppl:
|
||||||
|
ppl_lst.append(person.id)
|
||||||
|
|
||||||
|
job.ppl = ppl_lst
|
||||||
|
|
||||||
for jex in job.extra:
|
for jex in job.extra:
|
||||||
if 'eid-' in jex.name:
|
if 'eid-' in jex.name:
|
||||||
entry=session.query(Entry).get(jex.value)
|
entry=session.query(Entry).get(jex.value)
|
||||||
@@ -1430,7 +1431,6 @@ def UnmatchedFacesForFile( eid ):
|
|||||||
return rows
|
return rows
|
||||||
|
|
||||||
def ScanFileForPerson( job, e, person_id, force=False ):
|
def ScanFileForPerson( job, e, person_id, force=False ):
|
||||||
# AddLogForJob( job, f'INFO: Looking for person: {person_id} in file: {e.name}' )
|
|
||||||
file_h = session.query(File).get( e.id )
|
file_h = session.query(File).get( e.id )
|
||||||
# if we are forcing this, delete any old faces (this will also delete linked tables), and reset faces_created_on to None
|
# if we are forcing this, delete any old faces (this will also delete linked tables), and reset faces_created_on to None
|
||||||
if force:
|
if force:
|
||||||
|
|||||||
Reference in New Issue
Block a user