CoolFace
Modelpublic

StabRise/signature_detection_v0.1

sourceHugging Faceagpl-3.0updated 28d agoView on Hugging Face
1likes90downloads
Model Card

SignatureDetector

Overview

SignatureDetector is a signature detection transformer based on the YOLO ONNX model. It efficiently detects signatures in images using a pre-trained model from Hugging Face Hub. The detector is implemented as a PySpark ML transformer and can be integrated into Spark pipelines for scalable signature detection tasks in ScaleDP.

Documentation: https://scaledp.stabrise.com/en/latest/models/detectors/signature_detector.html

Model is using in: https://pdf-redaction.com/redaction/

## Usage Example

Full example notebook: https://github.com/StabRise/ScaleDP-Tutorials/blob/master/object-detection/3.SignatureDetection.ipynb

python
from scaledp import SignatureDetector, ImageDrawBoxes, PipelineModel

detector = SignatureDetector(
    keepInputData=True,
    partitionMap=True,
    numPartitions=0,
    scoreThreshold=0.25,
    task="detect",
    padding=20,
)

draw = ImageDrawBoxes(
    keepInputData=True,
    inputCols=["image", "signatures"],
    filled=False,
    color="blue",
    lineWidth=5,
    displayDataList=[],
)
# Transform the image dataframe through the signature detection stage
pipeline = PipelineModel(stages=[detector, draw])
result = pipeline.transform(image_df)

ShowSignatureBoxes.png

Parameters

ParameterTypeDescriptionDefault
inputColstrInput image column"image"
outputColstrOutput column for signatures"signatures"
keepInputDataboolKeep input data in outputFalse
scaleFactorfloatImage resize factor1.0
scoreThresholdfloatMinimum confidence score0.2
deviceDeviceInference device (CPU/GPU)Device.CPU
batchSizeintBatch size for inference2
partitionMapboolUse partitioned mappingFalse
numPartitionsintNumber of partitions0
pageColstrPage column"page"
pathColstrPath column"path"
propagateErrorboolPropagate errorsFalse
taskstrDetection task type"detect"
onlyRotatedboolReturn only rotated boxesFalse
modelstrModel identifier"StabRise/signature_detection"
paddingintPadding percent to expand detected boxes0

Notes

  • —The detector uses the YOLO ONNX pretrained model.
  • —Supports batch processing and distributed inference with Spark.
  • —Additional parameters can be set using the corresponding setter methods.