diff --git a/README.md b/README.md index 32897cd3e640101ba184f8c4ccd896981de3804a..1caded782dcc7a58a30f1a8607ba8e8dfc19ee12 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ ---- -license: mit ---- +
+ +# Introduction +The original images of this dataset are from [DocLayNet-v1.2](https://huggingface.co/datasets/docling-project/DocLayNet-v1.2). You can run `src/1_save_img_from_parquet.py` to convert the parquet files into images. + +# Page Number Cropping +This dataset uses the `yolo11-medium-page-best-quant-ir9.onnx` weights from [Here](https://huggingface.co/wqzh/DocLayout-PageNumDet/tree/main/models) to detect page number bounding boxes from the images obtained above, and then crop out the page number regions (detection errors may exist, as no post-processing was applied by the author). + +The cropped images are saved in the `images-crops` directory, and the detection results are saved in the `images-labels` directory. The author added a constraint: the YOLO-format label file is only saved when exactly one page number box is detected, while crops of all detected boxes are retained. Therefore, the number of files in `images-crops` is greater than that in `images-labels`. + +You can run `src/2_det_onnx_wo_opencv_cuda.py` to detect page numbers, crop images, and save label files. + +```shell +find images-labels -type f -name "*.txt" | wc -l +find images-crops -type f -name "*.jpg" | wc -l +``` +- Number of `.txt` files in `images-labels`: 15902 +- Number of `.jpg` files in `images-crops`: 17203 + +# Page Number Concatenation +`src/3_concat_crops_by_pages.py` concatenates all cropped images from `images-crops` and saves them in the `images-crops-concat` directory, so you can preview the entire dataset. + +Example +
+
+Note: If you intend to use the label files from this dataset, they need to be cleaned separately.
+
+# Page Number Coordinate Distribution
+`src/4_visualize_yolo_txt_distribution.py` visualizes the distribution of bounding box centers from all label files in `images-labels`.
+
diff --git a/README_ZH.md b/README_ZH.md
new file mode 100644
index 0000000000000000000000000000000000000000..c503d9a8d73de1965a2447760c6d9c0e72684ec8
--- /dev/null
+++ b/README_ZH.md
@@ -0,0 +1,34 @@
+
+
+# 简介
+本数据集的原始图片来源于[DocLayNet-v1.2](https://huggingface.co/datasets/docling-project/DocLayNet-v1.2)。 可以运行`src/1_save_img_from_parquet.py` 把parquet文件转换成图片。
+
+# 裁剪页码
+本数据集使用[Here](https://huggingface.co/wqzh/DocLayout-PageNumDet/tree/main/models)的`yolo11-medium-page-best-quant-ir9.onnx`权重,从上一步得到的图像中提取出页码的坐标,并裁剪出页码图片(检测可能存在错误,作者没有做任何后处理)。
+
+裁剪图片保存在`images-crops`目录下,检测的结果保存在`images-labels`目录下。作者做了一个限制:只有检测的页码框数量为1的时候,才会保存txt格式的标注文件,而检测的所有页码框的截图会全部保留。因此,`images-crops`目录下的文件数量 会大于 `images-labels`目录下的文件数量。
+
+可以运行`src/2_det_onnx_wo_opencv_cuda.py` 检测图片,裁剪图片,保存标注文件。
+
+```shell
+find images-labels -type f -name "*.txt" | wc -l
+find images-crops -type f -name "*.jpg" | wc -l
+```
+- images-labels 目录下 .txt 文件数: 15902
+- images-crops 目录下 .jpg 文件数: 17203
+
+# 页码合并
+`src/3_concat_crops_by_pages.py`将`images-crops`下所有的图片进行合并,并保存在`images-crops-concat`目录下。因此你可以预览整个数据集。
+
+示例
+
+
+注意:如果要使用这个数据集的label文件,需要单独清洗。
+
+# 页码坐标分布
+`src/4_visualize_yolo_txt_distribution.py`将`images-labels`下所有的标注文件的坐标分布可视化。
+
+
+
diff --git a/images-crops-concat/test-00000_p1.png b/images-crops-concat/test-00000_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..403e868fffed3962d68e07623c3a503c44b85bb3
--- /dev/null
+++ b/images-crops-concat/test-00000_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:38cef85adc39d37183c6b457f280ff17ee7d173fda98865d93ae95035bf479f1
+size 218621
diff --git a/images-crops-concat/test-00000_p2.png b/images-crops-concat/test-00000_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..f992999a8951e195a96c576b85087d06a7e9af39
--- /dev/null
+++ b/images-crops-concat/test-00000_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:18c929a173f5106f21e1f39ede60eee4327f391a052890000a6a690cc32f52aa
+size 41971
diff --git a/images-crops-concat/test-00001_p1.png b/images-crops-concat/test-00001_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..ac5385f5b41feacd943da96c750f815292c9e0ad
--- /dev/null
+++ b/images-crops-concat/test-00001_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:54967e15edf8bd1b353383cc228fc1cdccba2f2e38cec13145e9134750df1147
+size 269789
diff --git a/images-crops-concat/test-00001_p2.png b/images-crops-concat/test-00001_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..339062b8a44a53c6f15cba640524d5c89989ca21
--- /dev/null
+++ b/images-crops-concat/test-00001_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4c115955eb58b0b0a4f1e8a72d4e6fad50bde9a1657ea5ed126c40b68acf3d6c
+size 122393
diff --git a/images-crops-concat/test-00002_p1.png b/images-crops-concat/test-00002_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b72d97776ff25b6b3182095b0c473e653ee0672b
--- /dev/null
+++ b/images-crops-concat/test-00002_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e55d553bf5b3c1a19fd4771b67bd1ba80babde7bfb16d9303c43b348c42ea232
+size 124169
diff --git a/images-crops-concat/test-00002_p2.png b/images-crops-concat/test-00002_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..3eaa9cb5b9226cb952a923187092450296fd278b
--- /dev/null
+++ b/images-crops-concat/test-00002_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:16dd688b2b7a3b818a6b47de7e369b7f92b9919b0cf377a3e8bfb0362bc79d45
+size 80911
diff --git a/images-crops-concat/test-00003_p1.png b/images-crops-concat/test-00003_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..9f67a571696d44394f0122bb0fc1d1c3cb37597e
--- /dev/null
+++ b/images-crops-concat/test-00003_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e068222b86dab96691fda6c99241b946a38827ff779118ea97167512eaa4d6db
+size 219494
diff --git a/images-crops-concat/test-00003_p2.png b/images-crops-concat/test-00003_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..b82996025c7871b33e6c59172d4c0ba2f417bb3e
--- /dev/null
+++ b/images-crops-concat/test-00003_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6b2e03875c54a3b689c4abecf874565f6df4d868fd601da139190175aa07f41d
+size 129656
diff --git a/images-crops-concat/test-00004_p1.png b/images-crops-concat/test-00004_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..427a536ea13c21a7270fa3cf3c9f9383d64fe285
--- /dev/null
+++ b/images-crops-concat/test-00004_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8e653de1dc628928746a598a4d4fbfd67cd814a59275fb3cb528be07644d57e0
+size 190931
diff --git a/images-crops-concat/test-00004_p2.png b/images-crops-concat/test-00004_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..847c7e1e3b43c7f32aa2a3abed55e30459277824
--- /dev/null
+++ b/images-crops-concat/test-00004_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:363c331291e57cf12f581bc9c3cd4db893fb0cc24af584e89f3dfd5d8565218c
+size 226622
diff --git a/images-crops-concat/test-00004_p3.png b/images-crops-concat/test-00004_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..54133df0f19026ed17aff97cd3cd3e11870021f3
--- /dev/null
+++ b/images-crops-concat/test-00004_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:35958f52fe22a7ba5e75d5a6f9532c05a964c83a9849c7e36f23c38d3fa9a6e0
+size 44096
diff --git a/images-crops-concat/test-00005_p1.png b/images-crops-concat/test-00005_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..462b6e08c7066e4c728a555fdce5ae7653749b6f
--- /dev/null
+++ b/images-crops-concat/test-00005_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:504a6f145e4059c57c35228dc671b9bc65dbdaf4dc115373035058f80b9d0d4d
+size 197012
diff --git a/images-crops-concat/test-00005_p2.png b/images-crops-concat/test-00005_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..032af5d635f70981bf84eec877f56f8736e4cbdc
--- /dev/null
+++ b/images-crops-concat/test-00005_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:346e6d5f8a970c8c26e5ddf6aca6107d2898e01b3abae35ea9e139f848180d4b
+size 42895
diff --git a/images-crops-concat/train-00000_p1.png b/images-crops-concat/train-00000_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..0d8c22cb1c7ebb15b34768e7716434e0be7177be
--- /dev/null
+++ b/images-crops-concat/train-00000_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c2688f9679575ca2e9200ce7a6a15b126d25929e12bf5d1c1f00f61c317b49ea
+size 243305
diff --git a/images-crops-concat/train-00000_p2.png b/images-crops-concat/train-00000_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..4e7c73f50a0c3795b1bebe5efb972a9389e31c56
--- /dev/null
+++ b/images-crops-concat/train-00000_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ede86dcc35c2c4affd988c1f768f3a5ad6fbe907947f57773b948ac7e090a984
+size 45872
diff --git a/images-crops-concat/train-00003_p1.png b/images-crops-concat/train-00003_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..9a9b05af95975cbb3716d1cbc6c1fceb235d13db
--- /dev/null
+++ b/images-crops-concat/train-00003_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6120e1ee1099de09f0f53eadfa7083437d28f8808c550dbd4c1116bd3ddd09e6
+size 257911
diff --git a/images-crops-concat/train-00003_p2.png b/images-crops-concat/train-00003_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..36fdf5a57f88e518ec9c234f422bf54d3f122785
--- /dev/null
+++ b/images-crops-concat/train-00003_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:56b128f1dbf842c277f13e8f265229b0819722f8e25059a966e3fed861b8000d
+size 6433
diff --git a/images-crops-concat/train-00005_p1.png b/images-crops-concat/train-00005_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..868b2307b882e984a42811e5a37e0f267fa3dcb2
--- /dev/null
+++ b/images-crops-concat/train-00005_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7e3dffe888f6679357e6db3acc8def971256802154b076c165da4363cacce199
+size 260771
diff --git a/images-crops-concat/train-00005_p2.png b/images-crops-concat/train-00005_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..07908caa8b5aa6a06baed7f7162ae4b77821b26e
--- /dev/null
+++ b/images-crops-concat/train-00005_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c829216528e1530ed7e0d19991455e8ec235b656d92c46583564c3e1a9a46a24
+size 21141
diff --git a/images-crops-concat/train-00006_p1.png b/images-crops-concat/train-00006_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..5f3a9749181326051dc573e5da4d38c8a837c84e
--- /dev/null
+++ b/images-crops-concat/train-00006_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fff90b5f328a7c17566277b9ae533a0f3146d84a5a79432ba6f5285ddda1a601
+size 269489
diff --git a/images-crops-concat/train-00006_p2.png b/images-crops-concat/train-00006_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..df66b2252a6f0a49d5e66e0baa3c52493180316c
--- /dev/null
+++ b/images-crops-concat/train-00006_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:203af8af3428099597b6af584b4d9c716be6bdc458639f9b7da5fe3d41cd1ee0
+size 3245
diff --git a/images-crops-concat/train-00009_p1.png b/images-crops-concat/train-00009_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..eac71956bee0211e2d979fc1d4228a166ec92748
--- /dev/null
+++ b/images-crops-concat/train-00009_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:716e83c4431007b7f4971fd8959f402546c417525ab34ff24569a3c04e0da400
+size 272735
diff --git a/images-crops-concat/train-00009_p2.png b/images-crops-concat/train-00009_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..e7f8d99c16034985aa997c3cfee799ae41699e56
--- /dev/null
+++ b/images-crops-concat/train-00009_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5eb66d17008326f959b9536f5359a309d7678f082cd38bb525a966ab68f6afc5
+size 86877
diff --git a/images-crops-concat/train-00010_p1.png b/images-crops-concat/train-00010_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..db1ec86ae81d13e25c6b4014fe3040255d45f54e
--- /dev/null
+++ b/images-crops-concat/train-00010_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c5a3e6477065ef61b0f8977694150c1032f5537624782a1626a467718d3c83e3
+size 284200
diff --git a/images-crops-concat/train-00010_p2.png b/images-crops-concat/train-00010_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..d79dbf03692252151af90acfd138e753fe17c207
--- /dev/null
+++ b/images-crops-concat/train-00010_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c3ed68eb616fac074a2a5f3cab3b108efef0f1d3ab7463f4c863fe34ebb01a8
+size 168648
diff --git a/images-crops-concat/train-00012_p1.png b/images-crops-concat/train-00012_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..a5ccea4b881bf6a22b9f6af9cb05fa9cb137a0f2
--- /dev/null
+++ b/images-crops-concat/train-00012_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1758aeb506dc01fded07a223e33a176dc432d3c4302d466f5f236e586f86b73c
+size 306419
diff --git a/images-crops-concat/train-00012_p2.png b/images-crops-concat/train-00012_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..097fd046938cceb5af31e5b9df53ab8c3f40b876
--- /dev/null
+++ b/images-crops-concat/train-00012_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:10f2385876e192aead7a85a343088fcb8be0e69e46d3c78402ad90e391138671
+size 114116
diff --git a/images-crops-concat/train-00015_p1.png b/images-crops-concat/train-00015_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..89884f250656572737e0889c8e65ffbd50cf45d5
--- /dev/null
+++ b/images-crops-concat/train-00015_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:034d75437493a4f4488ff0bcf4a21ea3ba1110e6f3c2b985ae6710e431c90460
+size 299108
diff --git a/images-crops-concat/train-00015_p2.png b/images-crops-concat/train-00015_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..a32c1f92adc759010c41887362fae0437c0a4279
--- /dev/null
+++ b/images-crops-concat/train-00015_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:62f5393a04035843f755c179054266c55288556a07db3485735228f09e50ff0d
+size 134941
diff --git a/images-crops-concat/train-00018_p1.png b/images-crops-concat/train-00018_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f93f5be134aa6d1f1f3c15226c2af461619731c6
--- /dev/null
+++ b/images-crops-concat/train-00018_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f84ec832669e5dfa145ee0128afeaade6de4dad827e8e1f2714bc4126c9c3cb0
+size 288557
diff --git a/images-crops-concat/train-00018_p2.png b/images-crops-concat/train-00018_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..216ca2aab3946dfd2d83ee85849d27f21c25711c
--- /dev/null
+++ b/images-crops-concat/train-00018_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8a503f768a2a1f1ea7daf1071b6886b81a42502fd66a78bd8fc2a58827a9ded5
+size 146541
diff --git a/images-crops-concat/train-00020_p1.png b/images-crops-concat/train-00020_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..e39533f2ee76e04d39014f8a3d63ddb9f5b870fa
--- /dev/null
+++ b/images-crops-concat/train-00020_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:251c47f4fabb196c523aa4b2d99403fef91322a61b80c341faa395466d59f3c7
+size 167250
diff --git a/images-crops-concat/train-00020_p2.png b/images-crops-concat/train-00020_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..a3abdb70256351fe1a6b626bac142644de52d113
--- /dev/null
+++ b/images-crops-concat/train-00020_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:44817e40ec807976291fe78af11809a4907ea44984ed1f5e668b4faf466ac18d
+size 112925
diff --git a/images-crops-concat/train-00021_p1.png b/images-crops-concat/train-00021_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..d24448bd03893d668133667e195fd6caa11a0d07
--- /dev/null
+++ b/images-crops-concat/train-00021_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2f61df70b46f2760e350a66041ba1ce058be8a49731106e1ff488d579fb23b6c
+size 158240
diff --git a/images-crops-concat/train-00021_p2.png b/images-crops-concat/train-00021_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..295eb6c89498182fd64ab3f81a6806a4da6a1fb2
--- /dev/null
+++ b/images-crops-concat/train-00021_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:be6d98a51956fc3bc706f41f4c1c975b749c4f2f3133e4a8c6c1cb8698c1b34a
+size 109552
diff --git a/images-crops-concat/train-00024_p1.png b/images-crops-concat/train-00024_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..6df13aada66cd01390a850ae9ad089f16e551193
--- /dev/null
+++ b/images-crops-concat/train-00024_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e806a1ed5628795050bbf9c45756b107dcddb24babae0c14ea18985e9ec5cc76
+size 170982
diff --git a/images-crops-concat/train-00024_p2.png b/images-crops-concat/train-00024_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..467fd75f45fd328c5a1a789f85b5204fde294824
--- /dev/null
+++ b/images-crops-concat/train-00024_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:25d2bdec2d6c6bd3b0a3741258f11933fd24afafcdaaf178d0e6cfa99a871de7
+size 110598
diff --git a/images-crops-concat/train-00025_p1.png b/images-crops-concat/train-00025_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..4def7b491d0e67a6ef07200d1dd936fe7c653787
--- /dev/null
+++ b/images-crops-concat/train-00025_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e48871d86203b7c1b4e3f1f722b6a758ca7e563eb84f3afb794aa12660217317
+size 169549
diff --git a/images-crops-concat/train-00025_p2.png b/images-crops-concat/train-00025_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..2ecdbd65b600f4de87d59e0515cebd6db0031a79
--- /dev/null
+++ b/images-crops-concat/train-00025_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7acb1021d5835423760ea416ef4b1164cd89c346da54a2d8a8781495fc1cac40
+size 102749
diff --git a/images-crops-concat/train-00027_p1.png b/images-crops-concat/train-00027_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..3424ceae4e232f12f1bc9dfc6df08d019a4fce40
--- /dev/null
+++ b/images-crops-concat/train-00027_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9844b862d9bc9b8cdec9f66edb4f3364bf95e93b46198e12c943ce3096ef41d5
+size 173292
diff --git a/images-crops-concat/train-00027_p2.png b/images-crops-concat/train-00027_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..de8760b0ff3b3694003dbb8c9b77ce0c1f5c6ec8
--- /dev/null
+++ b/images-crops-concat/train-00027_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c60fb2aaf2444e2f230945f56486cd42682ac9e66cee15df1a6be5e8c9ff0ce4
+size 108803
diff --git a/images-crops-concat/train-00030_p1.png b/images-crops-concat/train-00030_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..d424dcdbf705b559401248a363aa4a5e753ec3c2
--- /dev/null
+++ b/images-crops-concat/train-00030_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7c65e810dd6b2a525c1725fe95036906a289f8aadd388b922c48bdd89485b100
+size 115665
diff --git a/images-crops-concat/train-00030_p2.png b/images-crops-concat/train-00030_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..2e8e7e1452d80692629ee0a5d4d681cd580b27e7
--- /dev/null
+++ b/images-crops-concat/train-00030_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3eb57aaab2c4fb79e53f64c28935638b9e3edb4de31431c95d24883dc5db4cb9
+size 46119
diff --git a/images-crops-concat/train-00033_p1.png b/images-crops-concat/train-00033_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b305a970e772e541ebd75abb33008ff251544c11
--- /dev/null
+++ b/images-crops-concat/train-00033_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:594ba2bd420e0b269df7da52330d46af713739c515033098b0d17711f29cf6cd
+size 176473
diff --git a/images-crops-concat/train-00033_p2.png b/images-crops-concat/train-00033_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..f46a663b5e26a066a0ef5137970690153e819a54
--- /dev/null
+++ b/images-crops-concat/train-00033_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e67aaf0d7910e06c3665eee450d02a0b8244842d149f57b0176314c08ab6d4b2
+size 208584
diff --git a/images-crops-concat/train-00033_p3.png b/images-crops-concat/train-00033_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..daec19b2d5d314a8b4c2348a337d3a04d3423001
--- /dev/null
+++ b/images-crops-concat/train-00033_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b29057ee96ac88f3895b26206b9ca20f764c95eee7b9637ca692276201d952f3
+size 7651
diff --git a/images-crops-concat/train-00035_p1.png b/images-crops-concat/train-00035_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..670b58754c804df202100fe61acbd846fbfe92ee
--- /dev/null
+++ b/images-crops-concat/train-00035_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed225e3b73008192b30d96c0d4f7bb2552af38201f05b7de3c569f3ccd9158d4
+size 225944
diff --git a/images-crops-concat/train-00035_p2.png b/images-crops-concat/train-00035_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..e7843ecfa3f6a3cf3d2978660f37bb21dfccb583
--- /dev/null
+++ b/images-crops-concat/train-00035_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:95783da6ab74184cca00fbde7750b24216cbe78e3bc0f7667ea9bd866d185d45
+size 246483
diff --git a/images-crops-concat/train-00036_p1.png b/images-crops-concat/train-00036_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f768143bb1ccd27d10a0044af73c27e9f942980b
--- /dev/null
+++ b/images-crops-concat/train-00036_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3087ea8f0d58dfbeac239caff0940ace7b1f3c20066e242f012cabd19133652b
+size 220525
diff --git a/images-crops-concat/train-00036_p2.png b/images-crops-concat/train-00036_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e19d029ae5124032085211f848c2949b58e8f56
--- /dev/null
+++ b/images-crops-concat/train-00036_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f2d344027d85b0474f6b23ce3768e86d931570a510252c4f1a7e651dd644a36b
+size 246465
diff --git a/images-crops-concat/train-00039_p1.png b/images-crops-concat/train-00039_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..3853579664b07835c7be7298caa24ac9b687a25a
--- /dev/null
+++ b/images-crops-concat/train-00039_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:16e3aa938b7a441501f5433a342808bb937a0ee489735f2d35a743e51b6534c8
+size 218464
diff --git a/images-crops-concat/train-00039_p2.png b/images-crops-concat/train-00039_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..55e1207eb1b0bbcd4a27d9d8f65c35fc0bbf9721
--- /dev/null
+++ b/images-crops-concat/train-00039_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f914120a2adae2009694e11b5432aaa489b10916190d35c7391bcf0e59b51690
+size 202394
diff --git a/images-crops-concat/train-00039_p3.png b/images-crops-concat/train-00039_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..8e27bbbca1ea5391d2c594c1846bcc397fff941b
--- /dev/null
+++ b/images-crops-concat/train-00039_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:eb52c716fbda3bd8919063ccc3a86601e66eb235123bbeafd7de5f38cf9e80eb
+size 44782
diff --git a/images-crops-concat/train-00040_p1.png b/images-crops-concat/train-00040_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..e9fdbcbcce0bceafb5be6b94dee63d0dda587fea
--- /dev/null
+++ b/images-crops-concat/train-00040_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:293dffe613f6a8903d65f103c7091834e7599b7e939055a9ac995789c7398a59
+size 207382
diff --git a/images-crops-concat/train-00040_p2.png b/images-crops-concat/train-00040_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..0a1890afd829ce6a625d6177c8fa22976e41baed
--- /dev/null
+++ b/images-crops-concat/train-00040_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6a3cfe7c47b615ec18ee423289de9290febc840b9dd6756ce9496875840ae0ce
+size 210595
diff --git a/images-crops-concat/train-00040_p3.png b/images-crops-concat/train-00040_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..0e531803804b8e2c7efe617bad9ab91531fd0fc7
--- /dev/null
+++ b/images-crops-concat/train-00040_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cbfaec6c05b73606196fb9cccf66c74e299b908121d5048417c4d1dc32c67244
+size 32472
diff --git a/images-crops-concat/train-00042_p1.png b/images-crops-concat/train-00042_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..e07b6bd85bc637e56e81ca2c00df9cbfd4e8758b
--- /dev/null
+++ b/images-crops-concat/train-00042_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a15b13c0bc0b5847730977400d3e4b985d050dfa304fc9ad3f2f8a6841db278f
+size 227172
diff --git a/images-crops-concat/train-00042_p2.png b/images-crops-concat/train-00042_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..66bd6f1c810d4b030c59ac2596e796b6f67bf348
--- /dev/null
+++ b/images-crops-concat/train-00042_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8a068e5a9ac8c0355e53e0a9a125692c9053277bab9c073c712537e41b2d65d3
+size 207252
diff --git a/images-crops-concat/train-00042_p3.png b/images-crops-concat/train-00042_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..159bf91434adcb0229ee205c223057c72eb6c6db
--- /dev/null
+++ b/images-crops-concat/train-00042_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94399f00ad5d9a62d6de4890efd0c2efb8c89aaf2d51babf6503e8065ac1b968
+size 10185
diff --git a/images-crops-concat/train-00045_p1.png b/images-crops-concat/train-00045_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..050568b11f9f222599c701ae34ff6c523642448e
--- /dev/null
+++ b/images-crops-concat/train-00045_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d92781250d12d6daee1f079d830779c141af6cd6eb2e559b2e76a72fd6469a61
+size 220944
diff --git a/images-crops-concat/train-00045_p2.png b/images-crops-concat/train-00045_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..4f13559760bc7123b9e77a63a7cd69c3d4f43c87
--- /dev/null
+++ b/images-crops-concat/train-00045_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c08e74bd0867b710907f7baefda361e2640eca158262c489174ab99e38e0b366
+size 215555
diff --git a/images-crops-concat/train-00045_p3.png b/images-crops-concat/train-00045_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c242b05fda3663b3a33a279dea572a605f658fc
--- /dev/null
+++ b/images-crops-concat/train-00045_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8f89c9aaa6b1dd3af673c84b20d5726f29201850fac0c0e7553e575ef2c4de79
+size 209291
diff --git a/images-crops-concat/train-00045_p4.png b/images-crops-concat/train-00045_p4.png
new file mode 100644
index 0000000000000000000000000000000000000000..49b9ed49e4b04ac0e6319859cf100b0a6ccb94a8
--- /dev/null
+++ b/images-crops-concat/train-00045_p4.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2cf106bc5410722b4163ec6fef6b5eb6dac84ce4e2b2b2c307e79e13e697fa93
+size 204098
diff --git a/images-crops-concat/train-00045_p5.png b/images-crops-concat/train-00045_p5.png
new file mode 100644
index 0000000000000000000000000000000000000000..24324a46033c49eb5d3dc358fb48b63fc2804272
--- /dev/null
+++ b/images-crops-concat/train-00045_p5.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:efe6fec1fc21d392866473c7034e0eb7635d8e88d1860de5e12d01ac09c8be37
+size 87647
diff --git a/images-crops-concat/train-00048_p1.png b/images-crops-concat/train-00048_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..59e92edbad52e03a89842a8f1c16e60f8754494d
--- /dev/null
+++ b/images-crops-concat/train-00048_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c95bb0e1677f66b72ac7a17994ac24e9ef1791dcb900a600bb35df6b037ba668
+size 250704
diff --git a/images-crops-concat/train-00048_p2.png b/images-crops-concat/train-00048_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..b289863e9767fb31e5887ec4186ea9dc8346abf4
--- /dev/null
+++ b/images-crops-concat/train-00048_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cbb12fd58bc3b88899e5fb7e7be3d4722bbbc707c44bae5434b87d743e08b534
+size 185907
diff --git a/images-crops-concat/train-00050_p1.png b/images-crops-concat/train-00050_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..fe2bd3262ed1f7f4479ef4e84cac62770ecaba53
--- /dev/null
+++ b/images-crops-concat/train-00050_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0064ce25d0d58d8a5e4fa97ba1bff590facff4491d149436f7bfe7a591d34b45
+size 254081
diff --git a/images-crops-concat/train-00050_p2.png b/images-crops-concat/train-00050_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..9522122dc6b52df08b4a0bded27224246b4d34c9
--- /dev/null
+++ b/images-crops-concat/train-00050_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:239e38c89cf5178b47856aa9dfac3f4d25039cfaca284a585ba889b6686f860b
+size 177248
diff --git a/images-crops-concat/train-00051_p1.png b/images-crops-concat/train-00051_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..143acb789bcc71c11b396c0050e03d7d1082e160
--- /dev/null
+++ b/images-crops-concat/train-00051_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:390e9c26bc88bba42bd55849f740c7e31e3dd79b33a27d4765958615b2680d34
+size 261327
diff --git a/images-crops-concat/train-00051_p2.png b/images-crops-concat/train-00051_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..23f3b89c9b12585f427a05b01c47cacc6136664f
--- /dev/null
+++ b/images-crops-concat/train-00051_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a8182af2870056b5ae58d12476828e6bb04ed2c9947945c9c97ef7f23bfad218
+size 152770
diff --git a/images-crops-concat/train-00054_p1.png b/images-crops-concat/train-00054_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b0256d96b9fb18e05dbfb8ea771c75a3bea232af
--- /dev/null
+++ b/images-crops-concat/train-00054_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0f15409f741abf629cdee49aa7fa0595a8284f62dc319eb3ae3c2cd1660d9a8d
+size 273371
diff --git a/images-crops-concat/train-00054_p2.png b/images-crops-concat/train-00054_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..f10a34c1807c9b1d5c799c2eb44cde3420ed4cf8
--- /dev/null
+++ b/images-crops-concat/train-00054_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:40d004cc043a5b956fec652831b2f8e43e79b9ed96556cbceec3c729ecab5b5d
+size 165060
diff --git a/images-crops-concat/train-00055_p1.png b/images-crops-concat/train-00055_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f848453501a008c1a17a0462ab404b0f60fe7a23
--- /dev/null
+++ b/images-crops-concat/train-00055_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1d35940172ab65b101bf256545bee6e22f6da2e61123d736576c3334a1e05038
+size 263458
diff --git a/images-crops-concat/train-00055_p2.png b/images-crops-concat/train-00055_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..c5599ce58ec4fe329549055454f2ae80ed612963
--- /dev/null
+++ b/images-crops-concat/train-00055_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:adc3854de54907082eab91702fe281be6376c876857e55d72093fa72e35328e2
+size 154513
diff --git a/images-crops-concat/train-00057_p1.png b/images-crops-concat/train-00057_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..296bf0c4b4d4addec6f3749c946e8337a86545b2
--- /dev/null
+++ b/images-crops-concat/train-00057_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a6d5097606a1e90fb861bb06f7f2b36e064d10377467b9a8044302779722b931
+size 239619
diff --git a/images-crops-concat/train-00057_p2.png b/images-crops-concat/train-00057_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..f5baee69d39e9910545ecd15385a29b66c98e8c5
--- /dev/null
+++ b/images-crops-concat/train-00057_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e23a6cb0a5fe8a80d514e44db775b9d01eb72832abc6768d1da0a47218292341
+size 261475
diff --git a/images-crops-concat/train-00057_p3.png b/images-crops-concat/train-00057_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..5218cc7ce9418d766d39f20f23d845b4b378cca6
--- /dev/null
+++ b/images-crops-concat/train-00057_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:17040adba0b5c65326bb76d3d338e5689ed670e5c12ce34ce937a53086b362ec
+size 202793
diff --git a/images-crops-concat/train-00060_p1.png b/images-crops-concat/train-00060_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..e42e7b02124200d20989c594ff66f2e5fa202316
--- /dev/null
+++ b/images-crops-concat/train-00060_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:77e3883404f3142ecfe61cab3afde55a70915e76a42a43216f12f362130aabab
+size 176046
diff --git a/images-crops-concat/train-00060_p2.png b/images-crops-concat/train-00060_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..8c5072901e5c0d8a2a3757adf3501ec1eceec6d3
--- /dev/null
+++ b/images-crops-concat/train-00060_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81bcf042c2a54aa8c7317a7a103fba15d91c9df8c9603305b816b8d0ceaa2e62
+size 36254
diff --git a/images-crops-concat/train-00063_p1.png b/images-crops-concat/train-00063_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..4f5087b9629baeccad55b15640976bf48f613817
--- /dev/null
+++ b/images-crops-concat/train-00063_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9f21e1cf1401bcec158ec952ac5253b6e89ac2aa4a581974adba08261cee2cd0
+size 154225
diff --git a/images-crops-concat/train-00063_p2.png b/images-crops-concat/train-00063_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..839c9b36491ea8b7282720a49aa294ab04a554e8
--- /dev/null
+++ b/images-crops-concat/train-00063_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd676275bb973d70bbbebef1468505d62475c7ce4d41009660cd07228b93eacc
+size 78627
diff --git a/images-crops-concat/train-00065_p1.png b/images-crops-concat/train-00065_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..886aa487b57699f0325faded9d650a13d6fe9aa1
--- /dev/null
+++ b/images-crops-concat/train-00065_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:41ef242efb2ae96ddd68d07158c43e76c91de6330eb6e565cf4b2906eab3b762
+size 280322
diff --git a/images-crops-concat/train-00065_p2.png b/images-crops-concat/train-00065_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..aa23c09306e112c6c53c2c2d51b7844b18cd0e61
--- /dev/null
+++ b/images-crops-concat/train-00065_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c57ff9299721bc698ce071dc4d2ed765e4b3e21fbc3f48b8804e27b78786d8d8
+size 77572
diff --git a/images-crops-concat/train-00066_p1.png b/images-crops-concat/train-00066_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..90f0666ac597c80311d9d9d834513c2e55b41a45
--- /dev/null
+++ b/images-crops-concat/train-00066_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:73d3e350bb3b5ae69665ce147b4f3d2e4efeb85b1ddb4fef0155a94317828dfd
+size 290810
diff --git a/images-crops-concat/train-00066_p2.png b/images-crops-concat/train-00066_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..74b052bf0da9e4aa4004ef058c7ec4698ea921a8
--- /dev/null
+++ b/images-crops-concat/train-00066_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:69b15f453e7d9b5a31f4c96254af1753a41c80b3a199e001e221392ef7af6c18
+size 89698
diff --git a/images-crops-concat/train-00069_p1.png b/images-crops-concat/train-00069_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b155c03d0407c5976a97212643b5ce5b269514a7
--- /dev/null
+++ b/images-crops-concat/train-00069_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bdeb1b0734b2d03d3de796e26bd580f21b56e0cf5062c18cd3f919dffe38f9f2
+size 189137
diff --git a/images-crops-concat/train-00069_p2.png b/images-crops-concat/train-00069_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..192f1e172625bcf94c9fec723e94a686a4c809cf
--- /dev/null
+++ b/images-crops-concat/train-00069_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a0b766cdca33deeec6d6f467a3b01a41b6ad8c2334050c6ab0bd0b8dd692e47d
+size 56973
diff --git a/images-crops-concat/train-00071_p1.png b/images-crops-concat/train-00071_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..c0d47bd2b79a2931fe9743e4a18872d0897c42d3
--- /dev/null
+++ b/images-crops-concat/train-00071_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4bf2da74794654bf49d1659cd6e76b10c8c1fa8f5d209fa640c7dd0a630bd47f
+size 190804
diff --git a/images-crops-concat/train-00071_p2.png b/images-crops-concat/train-00071_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcd932fad770e3fc5a3e2465a2894af8ffee5f8b
--- /dev/null
+++ b/images-crops-concat/train-00071_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cea5b269183924c6367656abd73f3fb0fb085f98e788c3fe1a1744d843889786
+size 67900
diff --git a/images-crops-concat/validation-00000_p1.png b/images-crops-concat/validation-00000_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..daa1a7960383b147a4eab55cbd13603a5348d339
--- /dev/null
+++ b/images-crops-concat/validation-00000_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:58cbb83d564a030a734384d689d72b9dbda61bc6ac63c77011557a2665412265
+size 189744
diff --git a/images-crops-concat/validation-00000_p2.png b/images-crops-concat/validation-00000_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..d17891184c80ae308756c4f1132d0e2b365b1242
--- /dev/null
+++ b/images-crops-concat/validation-00000_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ec2694918763d9867d7bb3f6246eb4ae7187fe22845a66fad849046fb205e3a3
+size 25823
diff --git a/images-crops-concat/validation-00001_p1.png b/images-crops-concat/validation-00001_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..de51e99cfb342e6018cfb39c423736bbb767403c
--- /dev/null
+++ b/images-crops-concat/validation-00001_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9cc38ee8b846ef0c1a17a25cab49ba4080d12fd002990a862b155af55e9c787c
+size 176469
diff --git a/images-crops-concat/validation-00001_p2.png b/images-crops-concat/validation-00001_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..87f57fdaa86d3053cb4b9db13afefcb6dcd22e84
--- /dev/null
+++ b/images-crops-concat/validation-00001_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7369c4f51df9dccc59b11b4f0154fbeb50d6cf5b05515d9678e0dd82ea8876d6
+size 130984
diff --git a/images-crops-concat/validation-00002_p1.png b/images-crops-concat/validation-00002_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..61633b4fe92bb7993432bda760b90e9893f5aacf
--- /dev/null
+++ b/images-crops-concat/validation-00002_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e67a1398ea9032a80d8116812c2a282da24dad497967dff570c30deb94793762
+size 131804
diff --git a/images-crops-concat/validation-00002_p2.png b/images-crops-concat/validation-00002_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..099d95f4c1984d28283be2b7873a381203ef8126
--- /dev/null
+++ b/images-crops-concat/validation-00002_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:16cccf16e1d0fce3f081df1815a752152c13eed807595bb6ce2b620e6d1c64a2
+size 63311
diff --git a/images-crops-concat/validation-00003_p1.png b/images-crops-concat/validation-00003_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..1b1a98958ad3a4f2a98441167525acf19675563e
--- /dev/null
+++ b/images-crops-concat/validation-00003_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:27450d4f7935cc4c8348c6947599e1cde7965359b5b8e8f4804f9e8f5d883c8d
+size 225626
diff --git a/images-crops-concat/validation-00003_p2.png b/images-crops-concat/validation-00003_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..1fb52a8f8b673d1aca5c858f88d9127d8cd310f6
--- /dev/null
+++ b/images-crops-concat/validation-00003_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:981567bafeeb3354317a9e0fd16f29b7c0852865c0794af4f05c74df01d653c2
+size 206480
diff --git a/images-crops-concat/validation-00003_p3.png b/images-crops-concat/validation-00003_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..07402424ed7763db2fca99843f598e95a4ccf0e0
--- /dev/null
+++ b/images-crops-concat/validation-00003_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:51b38b51b4ba70f6c512412a5d7d80e059a1f72e067e6692b6a1897e7a64045d
+size 129962
diff --git a/images-crops-concat/validation-00004_p1.png b/images-crops-concat/validation-00004_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..15b37769b14d42114c0f98e1eae8e9bdce010582
--- /dev/null
+++ b/images-crops-concat/validation-00004_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:348f6d16411637487b2357d81a71e3ada414fae9cc244dd634c24f252f0e11f0
+size 216076
diff --git a/images-crops-concat/validation-00004_p2.png b/images-crops-concat/validation-00004_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..c855b1a5e603e737e49895d5125b2b4309e36063
--- /dev/null
+++ b/images-crops-concat/validation-00004_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:615e0a3cf281bd65eb9e36feb586cd3ba57c8c9e18bd5f52fe740c53a463f858
+size 185189
diff --git a/images-crops-concat/validation-00005_p1.png b/images-crops-concat/validation-00005_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..4a890836f9cac45b1ea686f90f1a7f0f855f83f1
--- /dev/null
+++ b/images-crops-concat/validation-00005_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4c9c6eda3ec1fb6d5aae22a30466bed2e8b15033403c6e06d5b07db9c1b977bb
+size 186862
diff --git a/images-crops-concat/validation-00005_p2.png b/images-crops-concat/validation-00005_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..238e4fc2873ebf0ef462ff79b1144de02b5d91f1
--- /dev/null
+++ b/images-crops-concat/validation-00005_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6ee33c2ca841579af1f78ca85350e97ca5b2b7d3481a49abf623dc042a54cc6f
+size 224297
diff --git a/images-crops-concat/validation-00005_p3.png b/images-crops-concat/validation-00005_p3.png
new file mode 100644
index 0000000000000000000000000000000000000000..7ca9a4daf52b4ae1c73450d9a4a061a8d04e2b39
--- /dev/null
+++ b/images-crops-concat/validation-00005_p3.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:05f5db949db9ca131f6f1bbef22f94b4660c6de6c8d9ae6145044ad47e539bc1
+size 33790
diff --git a/images-crops-concat/validation-00006_p1.png b/images-crops-concat/validation-00006_p1.png
new file mode 100644
index 0000000000000000000000000000000000000000..b787010cf0f2ed0548ca882d4544bd2c634f2d5e
--- /dev/null
+++ b/images-crops-concat/validation-00006_p1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:92e0d8f0ae4b62c6f8f8534eea5727b7de707d9b911320a1fe49a5c47a910c49
+size 191031
diff --git a/images-crops-concat/validation-00006_p2.png b/images-crops-concat/validation-00006_p2.png
new file mode 100644
index 0000000000000000000000000000000000000000..691b5e89814665a87dc022fb8dc9da09eef63174
--- /dev/null
+++ b/images-crops-concat/validation-00006_p2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:89c900f5d79ec2ef566819df702e857dbe3364fa5d370f9db1f6953203e3db74
+size 74150
diff --git a/images-crops.zip b/images-crops.zip
new file mode 100644
index 0000000000000000000000000000000000000000..e12b3544ada0c819542020fa19b44e8b68b2432f
--- /dev/null
+++ b/images-crops.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d69e1d6f733aed9a667d54d7d8eeb8b2663557cca80038fce0c461aa1230a8de
+size 15985946
diff --git a/images-labels.zip b/images-labels.zip
new file mode 100644
index 0000000000000000000000000000000000000000..c937242a6edd55a641e3831bc0e3cc18aa69c8b4
--- /dev/null
+++ b/images-labels.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ced4405eda3babdc4f5b394b7e72017e675f93319ecc4df6a2a3c5814cea4c82
+size 4203158
diff --git a/src/1_save_img_from_parquet.py b/src/1_save_img_from_parquet.py
new file mode 100644
index 0000000000000000000000000000000000000000..b1926d49d7f0cf253135cb50058f965cd005e66a
--- /dev/null
+++ b/src/1_save_img_from_parquet.py
@@ -0,0 +1,79 @@
+import pyarrow.parquet as pq
+import json
+import numpy as np
+import os
+
+class NpEncoder(json.JSONEncoder):
+ def default(self, obj):
+ if isinstance(obj, np.ndarray):
+ return obj.tolist()
+ if isinstance(obj, (np.integer, np.floating)):
+ return obj.item()
+ if isinstance(obj, bytes):
+ return obj.decode("utf-8", errors="replace")
+ return super().default(obj)
+
+def process_all_rows(parquet_path, base_output_dir):
+ table = pq.read_table(parquet_path)
+ df = table.to_pandas()
+
+ parquet_name = os.path.splitext(os.path.basename(parquet_path))[0]
+ sub_dir = "-".join(parquet_name.split("-")[:2])
+ output_dir = os.path.join(base_output_dir, sub_dir)
+ os.makedirs(output_dir, exist_ok=True)
+ par_filenum = df.shape[0]
+ cat4_cnt = 0
+ cat5_cnt = 0
+ gt1_cnt = 0
+ zero_cnt = 0
+
+ for idx, row in df.iterrows():
+ metadata = row["metadata"]
+ original_filename = metadata["original_filename"].replace(".pdf", "")
+
+ mask = (row["category_id"] == 4) | (row["category_id"] == 5)
+
+ base_name = f"{original_filename}_{metadata['page_no']}"
+
+ image_bytes = row["image"]["bytes"]
+ with open(os.path.join(output_dir, f"{base_name}.png"), "wb") as f:
+ f.write(image_bytes)
+
+ data = {
+ "bboxes": row["bboxes"][mask],
+ "category_id": row["category_id"][mask],
+ "pdf_cells": row["pdf_cells"][mask],
+ "metadata": {
+ "original_filename": metadata["original_filename"],
+ "page_no": metadata["page_no"],
+ "coco_width": metadata["coco_width"],
+ "coco_height": metadata["coco_height"],
+ },
+ }
+ # with open(os.path.join(output_dir, f"{base_name}.json"), "w", encoding="utf-8") as f:
+ # json.dump(data, f, ensure_ascii=False, indent=2, cls=NpEncoder)
+
+ cat5_row_cnt = (row["category_id"][mask] == 5).sum()
+ cat4_row_cnt = (row["category_id"][mask] == 4).sum()
+ cat5_cnt += cat5_row_cnt
+ cat4_cnt += cat4_row_cnt
+
+ if mask.sum() > 1:
+ gt1_cnt += 1
+ elif mask.sum() == 0:
+ zero_cnt += 1
+
+ print(f"{parquet_name}: shape:{par_filenum}, cat4:{cat4_cnt}, cat5:{cat5_cnt}, gt1:{gt1_cnt}, zero:{zero_cnt}", base_output_dir)
+
+
+if __name__ == "__main__":
+ src_root = "DocLayNet-v1.2/parquets" # contains parquet files downloaded from `https://huggingface.co/datasets/docling-project/DocLayNet-v1.2/tree/main/data`
+ out_root = "DocLayNet-v1.2/images"
+
+ lists = os.listdir(src_root)
+ lists = sorted(lists)
+
+ for pi, par_path in enumerate(lists, 1):
+ if pi == 3: break
+
+ process_all_rows(os.path.join(src_root, par_path), out_root)
diff --git a/src/2_det_onnx_wo_opencv_cuda.py b/src/2_det_onnx_wo_opencv_cuda.py
new file mode 100644
index 0000000000000000000000000000000000000000..1c38fda1e211a38f319cd17b66216caa3583304e
--- /dev/null
+++ b/src/2_det_onnx_wo_opencv_cuda.py
@@ -0,0 +1,155 @@
+import os
+import numpy as np
+import onnxruntime as ort
+from PIL import Image, ImageOps
+
+model_size = "nano"
+model_size = "small"
+model_size = "medium"
+
+DET_MODEL_PATH = f"DocLayout-PageNumDet/models/yolo11-{model_size}-page-best-quant-ir9.onnx"
+DET_INPUT_SIZE = (736, 736)
+
+
+def letterbox(img, new_size):
+ h, w = img.size
+ new_h, new_w = new_size
+
+ ratio = min(new_w / w, new_h / h)
+ new_w_i = int(w * ratio)
+ new_h_i = int(h * ratio)
+
+ img = img.resize((new_w_i, new_h_i), Image.BILINEAR)
+
+ top = (new_h - new_h_i) // 2
+ bottom = new_h - new_h_i - top
+ left = (new_w - new_w_i) // 2
+ right = new_w - new_w_i - left
+
+ img = ImageOps.expand(img, (left, top, right, bottom), fill=114)
+ return img, ratio, (left, top)
+
+
+def load_det_model(model_path=DET_MODEL_PATH):
+ sess_options = ort.SessionOptions()
+ sess_options.log_severity_level = 3
+ providers = ["CUDAExecutionProvider", "CPUExecutionProvider"]
+ sess = ort.InferenceSession(model_path, sess_options, providers=providers)
+ input_name = sess.get_inputs()[0].name
+ return {"sess": sess, "input_name": input_name}
+
+
+def nms(boxes, iou_thresh=0.5):
+ if len(boxes) == 0:
+ return []
+ x1, y1, x2, y2 = boxes[:, 0], boxes[:, 1], boxes[:, 2], boxes[:, 3]
+ confs = boxes[:, 4]
+ areas = (x2 - x1 + 1e-6) * (y2 - y1 + 1e-6)
+ order = np.argsort(confs)[::-1]
+ keep = []
+ while len(order) > 0:
+ i = order[0]
+ keep.append(i)
+ if len(order) == 1:
+ break
+ xx1 = np.maximum(x1[i], x1[order[1:]])
+ yy1 = np.maximum(y1[i], y1[order[1:]])
+ xx2 = np.minimum(x2[i], x2[order[1:]])
+ yy2 = np.minimum(y2[i], y2[order[1:]])
+ w = np.maximum(0.0, xx2 - xx1)
+ h = np.maximum(0.0, yy2 - yy1)
+ inter = w * h
+ iou = inter / (areas[i] + areas[order[1:]] - inter + 1e-6)
+ order = order[1:][iou <= iou_thresh]
+ return boxes[keep]
+
+
+def det_infer(model, img_pil, conf_thresh=0.25, iou_thresh=0.5):
+ sess = model["sess"]
+ input_name = model["input_name"]
+
+ r, g, b = img_pil.split()
+ img_bgr = Image.merge("RGB", (b, g, r))
+
+ img_lb, ratio, (pad_w, pad_h) = letterbox(img_bgr, DET_INPUT_SIZE)
+ inp = np.array(img_lb, dtype=np.float32) / 255.0
+ inp = inp.transpose(2, 0, 1)[np.newaxis, ...]
+
+ out = sess.run(None, {input_name: inp})[0][0]
+
+ cx, cy, bw, bh, conf = out[0], out[1], out[2], out[3], out[4]
+
+ mask = conf > conf_thresh
+ cx, cy, bw, bh, conf = cx[mask], cy[mask], bw[mask], bh[mask], conf[mask]
+
+ x1 = (cx - bw / 2 - pad_w) / ratio
+ y1 = (cy - bh / 2 - pad_h) / ratio
+ x2 = (cx + bw / 2 - pad_w) / ratio
+ y2 = (cy + bh / 2 - pad_h) / ratio
+
+ boxes = np.stack([x1, y1, x2, y2, conf], axis=1)
+
+ if len(boxes) > 0:
+ boxes = nms(boxes, iou_thresh)
+
+ return boxes.tolist()
+
+
+def crop_and_save(image_path, output_dir, det_model=None, txt_dir=None):
+ if det_model is None:
+ det_model = load_det_model()
+
+ os.makedirs(output_dir, exist_ok=True)
+ if txt_dir is not None:
+ os.makedirs(txt_dir, exist_ok=True)
+
+ exts = (".png", ".jpg", ".jpeg", ".bmp")
+ img_files = sorted([f for f in os.listdir(image_path) if f.lower().endswith(exts)])
+
+ for fi, fname in enumerate(img_files):
+ if fi == 400: break
+
+ img_path = os.path.join(image_path, fname)
+ img_pil = Image.open(img_path).convert("RGB")
+ img_w, img_h = img_pil.size
+ boxes = det_infer(det_model, img_pil)
+
+ base_name = os.path.splitext(fname)[0]
+ for idx, (x1, y1, x2, y2, conf) in enumerate(boxes):
+ x1_i, y1_i, x2_i, y2_i = int(x1), int(y1), int(x2), int(y2)
+ crop = img_pil.crop((x1_i, y1_i, x2_i, y2_i))
+ out_name = f"{base_name}_c{idx}.jpg"
+ crop.save(os.path.join(output_dir, out_name), "JPEG")
+ # print(f"[{fname}] crop {idx}: ({x1_i}, {y1_i}, {x2_i}, {y2_i}) conf={conf:.3f} -> {out_name}")
+
+ if len(boxes) == 1 and txt_dir is not None:
+ x1, y1, x2, y2, _ = boxes[0]
+ cx = (x1 + x2) / 2 / img_w
+ cy = (y1 + y2) / 2 / img_h
+ bw = (x2 - x1) / img_w
+ bh = (y2 - y1) / img_h
+ txt_name = f"{base_name}.txt"
+ with open(os.path.join(txt_dir, txt_name), "w") as f:
+ f.write(f"0 {cx:.6f} {cy:.6f} {bw:.6f} {bh:.6f}\n")
+ # print(f"[{fname}] saved txt -> {txt_name}")
+
+
+if __name__ == "__main__":
+ from time import time
+
+ root_dir = "DocLayNet-v1.2/images"
+ subdir = os.listdir(root_dir)
+
+ det_model = load_det_model()
+ for si, sub in enumerate(subdir, 1):
+ print(f"[{si}/{len(subdir)}] {sub}", flush=True)
+ start_time = time()
+ # if si == 3: break
+
+ input_dir = os.path.join(root_dir, sub)
+ output_dir = f"{root_dir}-crop-{model_size}/{sub}"
+ txt_dir = f"{root_dir}-txt-{model_size}/{sub}"
+
+ crop_and_save(input_dir, output_dir, det_model, txt_dir=txt_dir)
+
+ print(f"耗时: {time() - start_time:.2f}s", flush=True)
\ No newline at end of file
diff --git a/src/3_concat_crops_by_pages.py b/src/3_concat_crops_by_pages.py
new file mode 100644
index 0000000000000000000000000000000000000000..9853552a716fb7139ef0fc42cfd53cae9be0a75c
--- /dev/null
+++ b/src/3_concat_crops_by_pages.py
@@ -0,0 +1,93 @@
+import os
+from PIL import Image
+
+
+CROPS_DIR = "DocLayout-PageDataset/images-crops"
+OUT_DIR = "DocLayout-PageDataset/images-crops-concat"
+
+MAX_HEIGHT = 700
+TARGET_WIDTH = 600
+
+
+def concat_crops_across_pages(crops_dir=CROPS_DIR, out_dir=OUT_DIR, save_prefix="", max_height=MAX_HEIGHT, target_width=TARGET_WIDTH):
+ os.makedirs(out_dir, exist_ok=True)
+
+ crops = []
+ for fname in sorted(os.listdir(crops_dir)):
+ if not fname.endswith(".jpg"):
+ continue
+ path = os.path.join(crops_dir, fname)
+ img = Image.open(path)
+ crops.append((fname, img))
+
+ crops.sort(key=lambda x: (x[0].rsplit("_c", 1)[0], int(x[0].rsplit("_c", 1)[1].rsplit(".", 1)[0])))
+
+ rows = []
+ for fname, img in crops:
+ w, h = img.size
+ placed = False
+ for row in rows:
+ row_w = sum(box["img"].size[0] for box in row)
+ if row_w + w <= target_width:
+ row.append({"fname": fname, "img": img})
+ placed = True
+ break
+ if not placed:
+ rows.append([{"fname": fname, "img": img}])
+
+ row_heights = [max(box["img"].size[1] for box in row) for row in rows]
+
+ def render_page(page_rows):
+ page_total_h = sum(max(box["img"].size[1] for box in r) for r in page_rows)
+ result = Image.new("RGB", (target_width, page_total_h), (255, 255, 255))
+ y = 0
+ for r in page_rows:
+ r_h = max(box["img"].size[1] for box in r)
+ x = 0
+ for box in r:
+ result.paste(box["img"], (x, y))
+ x += box["img"].size[0]
+ y += r_h
+ return result
+
+ current_page = []
+ current_height = 0
+ page_idx = 1
+ all_outputs = []
+
+ for i, row in enumerate(rows):
+ row_h = row_heights[i]
+ if current_height > 0 and current_height + row_h > max_height:
+ result = render_page(current_page)
+ out_file = os.path.join(out_dir, f"{save_prefix}_p{page_idx}.png")
+ result.save(out_file)
+ all_outputs.append(out_file)
+ page_idx += 1
+ current_page = [row]
+ current_height = row_h
+ else:
+ current_page.append(row)
+ current_height += row_h
+
+ if current_page:
+ result = render_page(current_page)
+ out_file = os.path.join(out_dir, f"{save_prefix}_p{page_idx}.png")
+ result.save(out_file)
+ all_outputs.append(out_file)
+
+ return all_outputs
+
+
+if __name__ == "__main__":
+ src_subs = os.listdir(CROPS_DIR)
+ for si, src_sub in enumerate(src_subs, 1):
+ # if si == 3: break
+
+ src_sub_path = os.path.join(CROPS_DIR, src_sub)
+
+ if os.path.isdir(src_sub_path):
+ outputs = concat_crops_across_pages(src_sub_path, OUT_DIR, src_sub)
+
+ # for o in outputs:
+ # print(f"Saved: {o}")
+ print(f"[{si}/{len(src_subs)}], {src_sub}, Total: {len(outputs)}")
diff --git a/src/4_visualize_yolo_txt_distribution.py b/src/4_visualize_yolo_txt_distribution.py
new file mode 100644
index 0000000000000000000000000000000000000000..4eabb6041da297fdc88a71c24d6e8c851336b00c
--- /dev/null
+++ b/src/4_visualize_yolo_txt_distribution.py
@@ -0,0 +1,60 @@
+import os
+import matplotlib.pyplot as plt
+
+labels_dir = "images-labels"
+img_size = 600
+
+line_counts = []
+centers_x = []
+centers_y = []
+
+for root, dirs, files in os.walk(labels_dir):
+ for fname in files:
+ if fname == "classes.txt" or not fname.endswith(".txt"):
+ continue
+
+ filepath = os.path.join(root, fname)
+ with open(filepath, "r") as f:
+ lines = f.readlines()
+
+ count = len([l for l in lines if l.strip()])
+ line_counts.append(count)
+
+ for line in lines:
+ line = line.strip()
+ if not line:
+ continue
+ parts = line.split()
+ if len(parts) >= 5:
+ cx = float(parts[1])
+ cy = float(parts[2])
+ centers_x.append(cx * img_size)
+ centers_y.append((1 - cy) * img_size)
+
+plt.figure(figsize=(8, 8))
+plt.scatter(centers_x, centers_y, s=1, alpha=0.5, c='blue')
+plt.xlim(0, img_size)
+plt.ylim(img_size, 0)
+plt.gca().set_aspect('equal')
+plt.title(f"YOLO Centers Distribution ({len(centers_x)} points from {len(line_counts)} files)")
+plt.xlabel("X (pixels)")
+plt.ylabel("Y (pixels)")
+plt.grid(True, alpha=0.3)
+plt.tight_layout()
+plt.savefig("./yolo_centers_distribution.png", dpi=150)
+print("Saved: ./yolo_centers_distribution.png")
+
+# plt.figure(figsize=(10, 4))
+# plt.hist(line_counts, bins=range(max(line_counts) + 2), edgecolor='black', alpha=0.7)
+# plt.title("Annotations Per File Distribution")
+# plt.xlabel("Number of Annotations")
+# plt.ylabel("Number of Files")
+# plt.grid(True, alpha=0.3)
+# plt.tight_layout()
+# plt.savefig("./annotations_per_file.png", dpi=150)
+# print("Saved: ./annotations_per_file.png")
+
+print(f"\nTotal files: {len(line_counts)}")
+print(f"Total annotations: {len(centers_x)}")
+print(f"Max annotations/file: {max(line_counts)}")
+print(f"Avg annotations/file: {sum(line_counts) / len(line_counts):.1f}")
diff --git a/yolo_centers_distribution.png b/yolo_centers_distribution.png
new file mode 100644
index 0000000000000000000000000000000000000000..d1e506bb4b47242906ed34515a7241fc73c40cde
--- /dev/null
+++ b/yolo_centers_distribution.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bf5a15d701d45f3e803431aa57abf07ac7b3366127651f6a5d6774e15eb10eb0
+size 97253