Dataset Viewer
Auto-converted to Parquet Duplicate
image
dict
messages
large_stringlengths
277
932
question
large_stringclasses
512 values
answer
large_stringlengths
97
668
task_type
large_stringclasses
4 values
image_id
int64
0
1.98k
{ "bytes": [ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 4, 6, ...
[{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "Is the Director signature present on this document? If yes, provide its bounding box."}]}, {"role": "assistant", "content": [{"type": "text", "text": "{\"answer\": \"Yes, the Director signature is present on this document.\", \"is_present\": tru...
Is the Director signature present on this document? If yes, provide its bounding box.
{"answer": "Yes, the Director signature is present on this document.", "is_present": true, "count": 2, "signatures": [{"role": "Director", "bbox_2d": [730, 309, 914, 377]}, {"role": "Director", "bbox_2d": [788, 809, 942, 882]}]}
positive_grounding
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Is the (...TRUNCATED)
"Is the Chairman of the Selection Committee signature present on this document? If yes, provide its (...TRUNCATED)
"{\"answer\": \"Yes, the Chairman of the Selection Committee signature is present on this document.\(...TRUNCATED)
positive_grounding
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Is the (...TRUNCATED)
Is the Secretary signature present on this document? If yes, provide its bounding box.
"{\"answer\": \"No, the Secretary signature is not present on this document.\", \"is_present\": fals(...TRUNCATED)
hard_negative_grounding
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Is the (...TRUNCATED)
Is the Appointee signature present on this document? If yes, provide its bounding box.
"{\"answer\": \"No, the Appointee signature is not present on this document.\", \"is_present\": fals(...TRUNCATED)
hard_negative_grounding
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Identif(...TRUNCATED)
Identify and locate all signatures present on this document.
"{\"answer\": \"There are four signatures present on this document, signed by the Director and the C(...TRUNCATED)
open_discovery
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"How man(...TRUNCATED)
How many signatures are present on this document?
"{\"answer\": \"There are four signatures present on this document.\", \"is_present\": true, \"count(...TRUNCATED)
pure_vqa
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Which r(...TRUNCATED)
Which roles have signed this document?
"{\"answer\": \"The Director and the Chairman of the Selection Committee signed this document.\", \"(...TRUNCATED)
pure_vqa
1,825
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Is the (...TRUNCATED)
Is the Secretary signature present on this document? If yes, provide its bounding box.
"{\"answer\": \"Yes, the Secretary signature is present on this document.\", \"is_present\": true, \(...TRUNCATED)
positive_grounding
402
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Is the (...TRUNCATED)
Is the Director signature present on this document? If yes, provide its bounding box.
"{\"answer\": \"Yes, the Director signature is present on this document.\", \"is_present\": true, \"(...TRUNCATED)
positive_grounding
402
{"bytes":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCw(...TRUNCATED)
"[{\"role\": \"user\", \"content\": [{\"type\": \"image\"}, {\"type\": \"text\", \"text\": \"Is the (...TRUNCATED)
Is the Witness signature present on this document? If yes, provide its bounding box.
"{\"answer\": \"No, the Witness signature is not present on this document.\", \"is_present\": false,(...TRUNCATED)
hard_negative_grounding
402
End of preview. Expand in Data Studio

Signature Detection SFT

Flattened, conversation-formatted Supervised Fine-Tuning (SFT) dataset derived from OpenTensorLab/signature-detection-annotated (originally sourced from tech4humans/signature-detection).

Every document QA pair across the train, validation, and test splits is expanded into an individual multimodal turn (messages), pairing an orientation-corrected document image with a strict Pydantic-compatible JSON ground-truth response containing normalized [0, 1000] bounding boxes.

Dataset Structure

Data Fields

Column Type Description
image Image Orientation-corrected RGB document image (JPEG-encoded).
messages string (JSON) Two-turn chat list (user with image + text prompt; assistant with structured JSON text).
question string Raw user prompt extracted from the source QA annotation.
answer string (JSON) Strict JSON string matching the target Pydantic schema.
task_type string Task category: positive_grounding, hard_negative_grounding, open_discovery, or pure_vqa.
image_id int64 Source document identifier from OpenTensorLab/signature-detection-annotated.

Assistant JSON Schema

All assistant targets in messages and answer adhere to the following structured schema:

{
  "answer": "Yes, the Director signature is present on this document.",
  "is_present": true,
  "count": 2,
  "signatures": [
    {
      "role": "Director",
      "bbox_2d": [730, 309, 914, 377]
    },
    {
      "role": "Director",
      "bbox_2d": [788, 809, 942, 882]
    }
  ]
}
  • answer (str): Natural-language answer to the user's query.
  • is_present (bool): true when one or more matching signatures exist on the document; false otherwise.
  • count (int): Number of signature entries returned in signatures.
  • signatures (list[dict]): List of detected signatures, each containing:
  • role (str): Signer role or title (e.g., Director, Secretary, Sender).
  • bbox_2d (list[int]): [x1, y1, x2, y2] coordinates normalized to [0, 1000] relative to the orientation-corrected image dimensions.

Task Breakdown

Each source document expands into multiple training examples spanning four task types:

  1. positive_grounding: Role-specific signature verification queries where the queried role is present (is_present: true, signatures contains matching bbox_2d entries).
  2. hard_negative_grounding: Role-specific signature verification queries for plausible roles absent from the document (is_present: false, count: 0, signatures: []).
  3. open_discovery: Full-document extraction prompts ("Identify and locate all signatures present on this document.") returning every signature role and bounding box.
  4. pure_vqa: Document-level counting, presence, and signer-role questions paired with structured JSON responses.

Data Preparation Pipeline

  1. EXIF & Orientation Correction: Images are transposed via ImageOps.exif_transpose and evaluated with PaddleOCR's PP-LCNet_x1_0_doc_ori classifier to detect clockwise rotation (0°, 90°, 180°, 270°) and rotate pages upright.
  2. Coordinate Transformation: Source COCO [x, y, width, height] bounding boxes are rotated alongside the image into [x1, y1, x2, y2] corners and normalized to [0, 1000] integers.
  3. SFT Flattening & Validation: Each QA entry across positive_grounding, hard_negative_grounding, open_discovery, and pure_vqa is mapped to its corresponding marks role labels and normalized boxes, serialized into validated JSON, and written to Snappy-compressed Parquet shards (data/{split}-00000.parquet).

Usage

import json
from datasets import load_dataset

ds = load_dataset("OpenTensorLab/signature-detection-sft")
sample = ds["train"][0]

image = sample["image"]
messages = json.loads(sample["messages"])
structured_target = json.loads(sample["answer"])

print("Task:", sample["task_type"])
print("Question:", sample["question"])
print("Structured Target:", structured_target)

Pydantic Validation Example

from pydantic import BaseModel, ConfigDict


class SignatureItem(BaseModel):
    model_config = ConfigDict(extra="forbid")
    role: str
    bbox_2d: list[int]


class SignatureResponse(BaseModel):
    model_config = ConfigDict(extra="forbid")
    answer: str
    is_present: bool
    count: int
    signatures: list[SignatureItem]


parsed = SignatureResponse.model_validate_json(sample["answer"])

Provenance & Limitations

  • Upstream Data: Derived from OpenTensorLab/signature-detection-annotated and tech4humans/signature-detection. Refer to those repositories for upstream licensing and citation details.
  • Weak Supervision: Signer role labels and hard-negative questions were generated via teacher VLM annotations (OpenTensorLab/Qwen3.5-9B-W4A16-AutoRound-GPTQ) and are not human-verified.
  • Image Duplication Across Rows: Because multiple QA turns are generated per document, the same image_id appears across multiple rows in a given split. When creating custom validation folds, group by image_id to prevent data leakage.
Downloads last month
95

Models trained or fine-tuned on OpenTensorLab/signature-detection-sft