diff --git a/settings.py b/settings.py index d7370f1..0369be9 100644 --- a/settings.py +++ b/settings.py @@ -53,12 +53,12 @@ settings_schema = SettingsSchema(many=True) ################################################################################ class SettingsForm(FlaskForm): id = HiddenField() - base_path = StringField('Base Path to use below (optional):', [validators.DataRequired()]) + base_path = StringField('Base Path to use below:', [validators.DataRequired()]) import_path = StringField('Path(s) to import from:', [validators.DataRequired()]) storage_path = StringField('Path to store sorted images to:', [validators.DataRequired()]) recycle_bin_path = StringField('Path to temporarily store deleted images in:', [validators.DataRequired()]) - default_refimg_model = SelectField( 'default_refimg_model', choices=[(c.id, c.name) for c in AIModel.query.order_by('id')] ) - default_scan_model = SelectField( 'default_scan_model', choices=[(c.id, c.name) for c in AIModel.query.order_by('id')] ) + default_refimg_model = SelectField( 'Default model to use for reference images', choices=[(c.id, c.name) for c in AIModel.query.order_by('id')] ) + default_scan_model = SelectField( 'Default model to use for all scanned images', choices=[(c.id, c.name) for c in AIModel.query.order_by('id')] ) default_threshold = StringField('Face Distance threshold (below is a match):', [validators.DataRequired()]) submit = SubmitField('Save' ) @@ -70,6 +70,15 @@ class SettingsForm(FlaskForm): def settings(): form = SettingsForm(request.form) page_title='Settings' + HELP={} + HELP['base_path']="Optional: if the paths below are absolute, then this field is ignored. If they are relative, then this field is prepended" + HELP['import_path']="Path(s) to import files from. If starting with /, then used literally, otherwise base path is prepended" + HELP['storage_path']="Path(s) to store sorted files to. If starting with /, then used literally, otherwise base path is prepended" + HELP['recycle_bin_path']="Path where deleted files are moved to. If starting with /, then used literally, otherwise base path is prepended" + HELP['default_refimg_model']="Default face recognition model used for reference images - cnn is slower/more accurate, hog is faster/less accurate - we scan (small) refimg once, so cnn is okay" + HELP['default_scan_model']="Default face recognition model used for scanned images - cnn is slower/more accurate, hog is faster/less accurate - we scan (large) scanned images lots, so cnn NEEDS gpu/mem" + HELP['default_threshold']="The distance below which a face is considered a match. The default is usually 0.6, we are trying for about 0.55 with kids. YMMV" + if request.method == 'POST' and form.validate(): try: # HACK, I don't really need an id here, but sqlalchemy get weird @@ -90,10 +99,10 @@ def settings(): except SQLAlchemyError as e: st.SetAlert( "danger" ) st.SetMessage( "Failed to modify Setting: {}".format(e.orig) ) - return render_template("settings.html", form=form, page_title=page_title) + return render_template("settings.html", form=form, page_title=page_title, HELP=HELP) else: form = SettingsForm( obj=Settings.query.first() ) - return render_template("settings.html", form=form, page_title = page_title) + return render_template("settings.html", form=form, page_title = page_title, HELP=HELP) ############################################################################## # SettingsRBPath(): return modified array of paths (take each path in diff --git a/templates/base.html b/templates/base.html index 67baff0..51fa990 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,7 +15,7 @@ - + diff --git a/templates/settings.html b/templates/settings.html index 34a42a8..a5a0d89 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% block main_content %}