mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	update binarization threshold
This commit is contained in:
		@@ -3,7 +3,7 @@ from flask_wtf import FlaskForm
 | 
			
		||||
from flask_wtf.file import FileField, FileRequired
 | 
			
		||||
from wtforms import (
 | 
			
		||||
    BooleanField,
 | 
			
		||||
    IntegerRangeField,
 | 
			
		||||
    DecimalRangeField,
 | 
			
		||||
    MultipleFileField,
 | 
			
		||||
    SelectField,
 | 
			
		||||
    StringField,
 | 
			
		||||
@@ -50,8 +50,8 @@ class CreateTesseractOCRPipelineJobForm(CreateJobBaseForm):
 | 
			
		||||
    binarization = BooleanField('Binarization')
 | 
			
		||||
    pdf = FileField('File', validators=[FileRequired()])
 | 
			
		||||
    model = SelectField('Model', validators=[InputRequired()])
 | 
			
		||||
    ocropus_nlbin_threshold = IntegerRangeField(
 | 
			
		||||
        render_kw={'tooltips':'false', 'min': 0, 'max': 1, 'step': 0.1, 'start': [0.5]}
 | 
			
		||||
    ocropus_nlbin_threshold = DecimalRangeField(
 | 
			
		||||
        render_kw={'min': 0, 'max': 1, 'step': 0.1, 'start': [0.5]}
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    def validate_binarization(self, field):
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,7 @@ def tesseract_ocr_pipeline():
 | 
			
		||||
                service_args={
 | 
			
		||||
                    'binarization': form.binarization.data,
 | 
			
		||||
                    'model': hashids.decode(form.model.data),
 | 
			
		||||
                    'ocropus_nlbin_threshold': form.ocropus_nlbin_threshold.data
 | 
			
		||||
                    'ocropus_nlbin_threshold': float(form.ocropus_nlbin_threshold.data)
 | 
			
		||||
                },
 | 
			
		||||
                service_version=form.version.data,
 | 
			
		||||
                user=current_user
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user