Datasets:
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- PatFigVQA_example.png +3 -0
- PatFig_Dataset_Documentation.pdf +0 -0
- PatFig_example.png +3 -0
- README.md +73 -0
- annotations_test.csv +0 -0
- annotations_train.csv +3 -0
- patfig.py +57 -0
- patfig_funny_logo.png +3 -0
- test_images.tar.gz +3 -0
- train_images.tar.gz +3 -0
.gitattributes
CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
annotations_train.csv filter=lfs diff=lfs merge=lfs -text
|
PatFigVQA_example.png
ADDED
Git LFS Details
|
PatFig_Dataset_Documentation.pdf
ADDED
Binary file (306 kB). View file
|
|
PatFig_example.png
ADDED
Git LFS Details
|
README.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-4.0
|
3 |
+
task_categories:
|
4 |
+
- image-to-text
|
5 |
+
- visual-question-answering
|
6 |
+
- image-classification
|
7 |
+
language:
|
8 |
+
- en
|
9 |
+
pretty_name: PatFig
|
10 |
+
size_categories:
|
11 |
+
- 10K<n<100K
|
12 |
+
---
|
13 |
+
|
14 |
+
# PatFig Dataset
|
15 |
+
|
16 |
+
<div align="center">
|
17 |
+
<img src="https://cdn-lfs-us-1.huggingface.co/repos/25/0c/250cb7eb9b83b2bd76ad6440700971baf0ec2981fdcb94b7fad768f2eb59fecc/1e79b8cf6cbe22d424c95e4816fc763e388d80cba4228908d707100f1f41182a?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27patfig_funny_logo.png%3B+filename%3D%22patfig_funny_logo.png%22%3B&response-content-type=image%2Fpng&Expires=1710484025&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcxMDQ4NDAyNX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzI1LzBjLzI1MGNiN2ViOWI4M2IyYmQ3NmFkNjQ0MDcwMDk3MWJhZjBlYzI5ODFmZGNiOTRiN2ZhZDc2OGYyZWI1OWZlY2MvMWU3OWI4Y2Y2Y2JlMjJkNDI0Yzk1ZTQ4MTZmYzc2M2UzODhkODBjYmE0MjI4OTA4ZDcwNzEwMGYxZjQxMTgyYT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPSoifV19&Signature=ghxVaJztNO%7EJsQTPLCGf5VjyqxZQBbQEwpEFUlg9jp0pwu6YySncyKudoNVEJkRJlXpIi6pTw0ezQ4VpMHa4BrirgO8JfmxzVJQ5h1wgq9KtRwpdYt0ba%7EH73KNCSS1KvNM50prZ5fKBon3s9yvL1wgkOgIMN2i7NPaR1MCzps8sMyhbWFpwVpvuoV91QS20OGwGsWmYW3IQ3cEsCczadefAI%7EehWswamDxG3UZ%7ErYrMqXprFlpiB1fTas7SPeKpDT4V5YdTtEHUZRQ14Lb0QEogydoNmgj4afvqrqwV-6dnL3Z7iaJxDrdxYTIk6VfPIHIH1%7E7dyLjRwG8gdhvhCQ__&Key-Pair-Id=KCD77M1F0VK2B" width="40%" alt="PatFig Dataset Logo">
|
18 |
+
</div>
|
19 |
+
|
20 |
+
## Table of Contents
|
21 |
+
- [Introduction](#introduction)
|
22 |
+
- [Dataset Description](#dataset-description)
|
23 |
+
- [Overview](#overview)
|
24 |
+
- [Structure](#structure)
|
25 |
+
- [Categories](#categories)
|
26 |
+
- [Usage](#usage)
|
27 |
+
- [Challenges and Considerations](#challenges-and-considerations)
|
28 |
+
- [License and Usage Guidelines](#license-and-usage-guidelines)
|
29 |
+
|
30 |
+
|
31 |
+
## Introduction
|
32 |
+
The PatFig Dataset is a curated collection of over 18,000 patent images from more than 7,000 European patent applications, spanning the year 2020. It aims to provide a comprehensive resource for research and applications in image captioning, abstract reasoning, patent analysis, and automated documentprocessing.
|
33 |
+
The overarching goal of this dataset is to advance the research in visually situated language understanding towards more hollistic consumption of the visual and textual data.
|
34 |
+
|
35 |
+
## Dataset Description
|
36 |
+
|
37 |
+
### Overview
|
38 |
+
This dataset includes patent figures accompanied by short and long captions, reference numerals, corresponding terms, and a minimal set of claims, offering a detailed insight into the depicted inventions.
|
39 |
+
|
40 |
+
### Structure
|
41 |
+
- **Image Files**: Technical drawings, block diagrams, flowcharts, plots, and grayscale photographs.
|
42 |
+
- **Captions**: Each figure is accompanied by a short and long caption describing its content and context.
|
43 |
+
- **Reference Numerals and Terms**: Key components in the figures are linked to their descriptions through reference numerals.
|
44 |
+
- **Minimal Set of Claims**: Claims sentences summarizing the interactions among elements within each figure.
|
45 |
+
- **Metadata**: Includes image names, publication numbers, titles, figure identifiers, and more. The detailed descriptions of the fields are available in the Dataset Documentation.
|
46 |
+
|
47 |
+
### Categories
|
48 |
+
The dataset is categorized according to the International Patent Classification (IPC) system, ensuring a diverse representation of technological domains.
|
49 |
+
|
50 |
+
## Usage
|
51 |
+
The PatFig Dataset is intended for use in patent image analysis, document image processing, visual question answering tasks, and image captioning in technical contexts. Users are encouraged to explore innovative applications in related fields.
|
52 |
+
|
53 |
+
<p align="center">
|
54 |
+
<span style="display: inline-block; margin-right: 20px;"><img src="https://cdn-lfs-us-1.huggingface.co/repos/25/0c/250cb7eb9b83b2bd76ad6440700971baf0ec2981fdcb94b7fad768f2eb59fecc/3c626eeb8727520da886493356c116cc5165a0104fa7a3445bce92cb4117591c?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27PatFig_example.png%3B+filename%3D%22PatFig_example.png%22%3B&response-content-type=image%2Fpng&Expires=1710484079&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcxMDQ4NDA3OX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzI1LzBjLzI1MGNiN2ViOWI4M2IyYmQ3NmFkNjQ0MDcwMDk3MWJhZjBlYzI5ODFmZGNiOTRiN2ZhZDc2OGYyZWI1OWZlY2MvM2M2MjZlZWI4NzI3NTIwZGE4ODY0OTMzNTZjMTE2Y2M1MTY1YTAxMDRmYTdhMzQ0NWJjZTkyY2I0MTE3NTkxYz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPSoifV19&Signature=ehYXk1BEjurpR-Rpn6QmYrSJmuX96AjF6c6BzNXYvSLrwkE9olnZfkstWhhR7QJ6Y%7Ef4--82aUUb0wXJdnmCBCmMrJ2JzipYMpZ92XRrIeJ41Kd2YGHr1QU-IWIXE-2eYJRXrq2GdNo3tf3dqJLKzG7FWyoxqthQt2EGpneAyMURw81LGqay1N9pvfnoB751BPEUsiRz-iDI8G8HkNkJ%7EViE7HKU5rTCV2pPfHjKKQ6pLXUW%7EIwpvkXLj02xhGD-aoo24TYZ5NdZJC1lYj56ynqyABhnPhhFqzVsD%7Eqmdi9wmw2gKa--HZU5q3bmZtm9lsifOQ4mLkJ8x4vl2TWefA__&Key-Pair-Id=KCD77M1F0VK2B" alt="PatFig Image Captioning Version" width="286"/></span>
|
55 |
+
<span style="display: inline-block; margin-left: 20px;"><img src="https://cdn-lfs-us-1.huggingface.co/repos/25/0c/250cb7eb9b83b2bd76ad6440700971baf0ec2981fdcb94b7fad768f2eb59fecc/532251dbff11e080a91b60d91956c49420a70381143cd8c43ea80fb94608d7f9?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27PatFigVQA_example.png%3B+filename%3D%22PatFigVQA_example.png%22%3B&response-content-type=image%2Fpng&Expires=1710484116&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcxMDQ4NDExNn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzI1LzBjLzI1MGNiN2ViOWI4M2IyYmQ3NmFkNjQ0MDcwMDk3MWJhZjBlYzI5ODFmZGNiOTRiN2ZhZDc2OGYyZWI1OWZlY2MvNTMyMjUxZGJmZjExZTA4MGE5MWI2MGQ5MTk1NmM0OTQyMGE3MDM4MTE0M2NkOGM0M2VhODBmYjk0NjA4ZDdmOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPSoifV19&Signature=DR9Zobe00j2rUf0QDFD2yxYy96TwLq0Jgl9CdGT4MrbjmtDMUbFQ0W3xOTNiCBxQ3fEZJ0ykFjmE-tNo8UjOCneWKqyj1AoqcYRDozji9HL0flVplSRceMLmnAzgMyKBSiXJNXNhFv2iEz1007qiyQiMidOpQoyPyZXXqYDzQLHQdKfhYlKUFEs-w9ZYT0vJwKDOlBIAc7pfPuPmoMnPP5sJ4etayoU2bY43WdUaL6cqoEuPS14LaCNIpwl8z2-BhZMp6YZstLoQgiktWQYun7izeLIZavqFRPRJ46GndJ0mdVXS5c%7E7QrT4BFucDQZ%7EV-skGr5CaInhfQnH99ep5w__&Key-Pair-Id=KCD77M1F0VK2B" alt="PatFig VQA Version" width="300""/></span>
|
56 |
+
</p>
|
57 |
+
|
58 |
+
## Challenges and Considerations
|
59 |
+
Users should be aware of challenges such as interpreting compound figures. PatFig was built automatically using high-performance machine-learning and deep-learning methods. Therefore, the data might contain noise, which was mentioned in the corresponding paper.
|
60 |
+
|
61 |
+
## License and Usage Guidelines
|
62 |
+
The dataset is released under a Creative Commons Attribution-NonCommercial 2.0 Generic (CC BY-NC 2.0) License. It is intended for non-commercial use, and users must adhere to the license terms.
|
63 |
+
|
64 |
+
## Cite as
|
65 |
+
```
|
66 |
+
@inproceedings{aubakirova2023patfig,
|
67 |
+
title={PatFig: Generating Short and Long Captions for Patent Figures},
|
68 |
+
author={Aubakirova, Dana and Gerdes, Kim and Liu, Lufei},
|
69 |
+
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
|
70 |
+
pages={2843--2849},
|
71 |
+
year={2023}
|
72 |
+
}
|
73 |
+
```
|
annotations_test.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
annotations_train.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b61963a98dbb45a9e1cf5adb0c7edfcb5b9705e959bd1b0e163920a3f24e4281
|
3 |
+
size 57685984
|
patfig.py
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
from datasets import load_dataset, Dataset
|
3 |
+
|
4 |
+
from pathlib import Path
|
5 |
+
import os
|
6 |
+
import pandas as pd
|
7 |
+
|
8 |
+
_DESCRIPTION = """\ The PatFig Dataset is a curated collection of over 18,000 patent images from more than 7,
|
9 |
+
000 European patent applications, spanning the year 2020. It aims to provide a comprehensive resource for research
|
10 |
+
and applications in image captioning, abstract reasoning, patent analysis, and automated documentprocessing. The
|
11 |
+
overarching goal of this dataset is to advance the research in visually situated language understanding towards more
|
12 |
+
hollistic consumption of the visual and textual data.
|
13 |
+
"""
|
14 |
+
|
15 |
+
_URL = "https://huggingface.co/datasets/danaaubakirova/patfig/tree/main"
|
16 |
+
_URLS = {
|
17 |
+
"train": f"{_URL}/train",
|
18 |
+
"test": f"{_URL}/test",
|
19 |
+
"annotations_train": f"{_URL}/annotations_train.csv",
|
20 |
+
"annotations_test": f"{_URL}/annotations_test.csv",
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
class PatFig(datasets.GeneratorBasedBuilder):
|
25 |
+
"""DatasetBuilder for patfig dataset."""
|
26 |
+
|
27 |
+
def _info(self):
|
28 |
+
return datasets.DatasetInfo(
|
29 |
+
description=_DESCRIPTION,
|
30 |
+
features=datasets.Features({
|
31 |
+
"image": datasets.Image(),
|
32 |
+
"short_description": datasets.Value("string"),
|
33 |
+
"long_description": datasets.Value("string"),
|
34 |
+
}),
|
35 |
+
)
|
36 |
+
|
37 |
+
def _split_generators(self, dl_manager: datasets.DownloadManager):
|
38 |
+
downloaded_files = dl_manager.download_and_extract(_URLS)
|
39 |
+
return [
|
40 |
+
datasets.SplitGenerator(
|
41 |
+
name=datasets.Split.TRAIN, gen_kwargs={"images_dir": downloaded_files["train"], "annotations_dir": downloaded_files["annotations_train"]}
|
42 |
+
),
|
43 |
+
datasets.SplitGenerator(
|
44 |
+
name=datasets.Split.TEST, gen_kwargs={"images_dir": downloaded_files["test"], "annotations_dir": downloaded_files["annotations_test"]}
|
45 |
+
),
|
46 |
+
]
|
47 |
+
|
48 |
+
def _generate_examples(self, images_dir: str, annotations_dir: str):
|
49 |
+
df = pd.read_csv(annotations_dir)
|
50 |
+
|
51 |
+
for idx, row in df.iterrows():
|
52 |
+
image_path = os.path.join(images_dir, split, row["pubNumber"], row["image_name"])
|
53 |
+
yield idx, {
|
54 |
+
"image": image_path,
|
55 |
+
"short_description": row["descFig"],
|
56 |
+
"long_description": row["description"],
|
57 |
+
}
|
patfig_funny_logo.png
ADDED
Git LFS Details
|
test_images.tar.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df6ee1008f158daa0201f3a95970864873710373f78a6b115890e44ba536a2b2
|
3 |
+
size 82322544
|
train_images.tar.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47bd865fe030bb5ce5f3a75aeff35230ff256af37bf97f0496cadd3b2433c9fd
|
3 |
+
size 1505465957
|