Files
photoassistant/TODO

156 lines
7.3 KiB
Plaintext

## MIGRATION/NEXT Production build:
drop table FACE_NO_MATCH_OVERRIDE;
drop table FACE_FORCE_MATCH_OVERRIDE;
drop table DISCONNECTED_NO_MATCH_OVERRIDE;
drop table DISCONNECTED_FORCE_MATCH_OVERRIDE;
create table FACE_NO_MATCH_OVERRIDE ( ID integer, FACE_ID integer, TYPE_ID integer,
constraint FK_FNMO_FACE_ID foreign key (FACE_ID) references FACE(ID),
constraint FK_FNMO_TYPE foreign key (TYPE_ID) references FACE_OVERRIDE_TYPE(ID),
constraint PK_FNMO_ID primary key(ID) );
create table FACE_FORCE_MATCH_OVERRIDE ( ID integer, FACE_ID integer, PERSON_ID integer, constraint PK_FACE_FORCE_MATCH_OVERRIDE_ID primary key(ID) );
create table DISCONNECTED_NO_MATCH_OVERRIDE ( FACE bytea, TYPE_ID integer,
constraint FK_DNMO_TYPE_ID foreign key (TYPE_ID) references FACE_OVERRIDE_TYPE(ID),
constraint PK_DNMO_FACE primary key (FACE) );
create table DISCONNECTED_FORCE_MATCH_OVERRIDE ( FACE bytea, PERSON_ID integer,
constraint FK_DFMO_PERSON_ID foreign key (PERSON_ID) references PERSON(ID),
constraint PK_DFMO_FACE primary key (FACE) );
drop table SETTINGS
create table SETTINGS(
ID integer,
BASE_PATH varchar, IMPORT_PATH varchar, STORAGE_PATH varchar, RECYCLE_BIN_PATH varchar, METADATA_PATH varchar,
AUTO_ROTATE Boolean,
DEFAULT_REFIMG_MODEL integer, DEFAULT_SCAN_MODEL integer, DEFAULT_THRESHOLD float,
FACE_SIZE_LIMIT integer,
SCHEDULED_IMPORT_SCAN integer, SCHEDULED_STORAGE_SCAN integer,
SCHEDULED_BIN_CLEANUP integer, BIN_CLEANUP_FILE_AGE integer,
JOB_ARCHIVE_AGE integer,
constraint PK_SETTINGS_ID primary key(ID),
constraint FK_DEFAULT_REFIMG_MODEL foreign key (DEFAULT_REFIMG_MODEL) references AI_MODEL(ID),
constraint FK_DEFAULT_SCAN_MODEL foreign key (DEFAULT_SCAN_MODEL) references AI_MODEL(ID) );
insert into SETTINGS ( id, base_path, import_path, storage_path, recycle_bin_path, metadata_path, auto_rotate, default_refimg_model, default_scan_model, default_threshold, face_size_limit, scheduled_import_scan, scheduled_storage_scan, scheduled_bin_cleanup, bin_cleanup_file_age, job_archive_age ) values ( (select nextval('SETTINGS_ID_SEQ')), '/export/docker/storage/', 'Camera_uploads/', 'photos/', '.pa_bin/', '.pa_metadata/', true, 1, 1, '0.55', 43, 1, 1, 7, 30, 4 );
## then docker-compose build...
## GENERAL
* put try: around any os.remove, etc.
* remove Paths from SettingsIPath, etc.
* should I change the rotation code to use that jpeg util to reduce/remove compression loss?
* should allow context menu from View thumbs (particularly useful on search) to show other files around this one by date (maybe that folder or something?)
* could get better AI optim, by keeping track of just new files since scan (even if we did this from the DB),
then we could just feed those eid's explicitly into a 'run_ai_on_new_files' :) -- maybe particularly
if count('new files') < say 1000 do eids, otherwise do path AND no new refimgs
* does search of matching dirname give all entries of subdirs of subdirs, etc. (think not) -- maybe a TODO?
* video player cannot handle non mp4 formats... do I care? (could just offer a download link and hope the client deals with it)
--> OR? https://jsmpeg.com/
--> OR? convert all videos to mp4/webm
* delete folder
* allow joblog search (less needed with logs visible on a given file now)
* back button will fail if we do these POSTs:
job.py:@app.route("/jobs", methods=["GET", "POST"])
job.py:@app.route("/job/<id>", methods=["GET","POST"])
-- these need to store 'job prefs' somewhere... (extras?)
files.py:@app.route("/fix_dups", methods=["POST"])
???
* browser back/forward buttons dont work -- use POST -> redirect to GET
- need some sort of clean-up of pa_user_state -- I spose its triggered by browser session, so maybe just after a week is lazy/good enough
-- pa_user_state has last_used as a timestamp so can be used to delete old entries
GUI overhaul?
* on a phone, the files.html page header is a mess "Oldest.." line is too large to fit on 1 line (make it a hamburger?)
- searched for text overlaps buttons above and below
- < 10 files > is subsequently not centered
- the folder/bin icons might be best below search then? (and on same line as XS/S, etc.)
* on phone login page, job* pages, etc. are all squished
* when search, have a way to hide deleted files
-> not sure where to put this on GUI, its so busy...
* metadata at folder level with file level to add more richness
- store in DB? or store in hidden file (or both)... IF it is outside the DB, then I can 'rebuild' the DB at anytime from scratch
* dont allow me to stupidly move a folder to itself
* get build process to create a random string for secret for PROD, otherwise use builtin for dev
* deal with changing a path in settings
* dup issues:
* when we have lots of dups, sort the directories by alpha so its consistent when choosing
* comment your code -> only html files remaining
* read that guys face matching / clustering / nearest neighbour examples, for a whole new AI capability
https://www.pyimagesearch.com/2018/07/09/face-clustering-with-python/
* fix up logging in general
ProcessFileForJob --> really need to better handle log levels and counting
* support animated gifs in html5 canvas
* think about security - in job_mgr anywhere I can os.replace/remove NEED to protect, etc
* real first-run, 'no or empty settings' -- need to think this through
## DB
* Dir can have date in the DB, so we can do Oldest/Newest dirs in Folder view
### BACKEND
* revisit SymlinkName() and make it simpler (see comment in shared.py)
*** Need to use thread-safe sessions per Thread, half-assed version did not work
Admin
-> do I want to have admin roles/users?
-> purge deleted files (and associated DB data) needs a dbox or privs
(only show in DEV for now)
### AI
* faces per file - need a threshold for too many?
### UI
* viewer needs to allow toggle to scan_model (and prob. right-click on file... AI (with CNN) AI (with hog)
- make the form-select AI_Model actually do the change (but need more mem on mara really -- even mem is not enough
need graphic support --> need to allow pa_job_manager run on borric with acceleration)
For AI / rescan:
way to override per file:
the threshold used?
file details is sort of crap - only works on import path
- probably better to have a different 'view', e.g. folders/flat/detailed
timelineview? (I think maybe sunburst for large amounts of files, then maybe something more timeline-series for drilling in?)
(vertical timeline, date has thumbnails (small) horizontally along
a page, etc.?
https://www.highcharts.com/docs/chart-and-series-types/timeline-series
https://www.highcharts.com/demo/sunburst
https://www.highcharts.com/demo/heatmap
https://www.highcharts.com/demo/packed-bubble-split
### SORTER
* exif processing?
* location stuff - test a new photo from my camera out
-- image is in dir, need to look at exifread output
### FUTURE:
* can emby use nfo for images (for AI/tags?)
-NO sadly