vkashko commited on
Commit
e7c610a
·
1 Parent(s): c8ba8e9

refactor: all data

Browse files
Files changed (43) hide show
  1. Class_Segmentation/12.png +0 -3
  2. Class_Segmentation/13.png +0 -3
  3. Class_Segmentation/2.png +0 -3
  4. Class_Segmentation/3.png +0 -3
  5. Class_Segmentation/4.png +0 -3
  6. Class_Segmentation/5.png +0 -3
  7. Class_Segmentation/6.png +0 -3
  8. Class_Segmentation/7.png +0 -3
  9. Class_Segmentation/8.png +0 -3
  10. Class_Segmentation/9.png +0 -3
  11. Object_Segmentation/1.png +0 -3
  12. Object_Segmentation/10.png +0 -3
  13. Object_Segmentation/11.png +0 -3
  14. Object_Segmentation/12.png +0 -3
  15. Object_Segmentation/13.png +0 -3
  16. Object_Segmentation/2.png +0 -3
  17. Object_Segmentation/3.png +0 -3
  18. Object_Segmentation/4.png +0 -3
  19. Object_Segmentation/5.png +0 -3
  20. Object_Segmentation/6.png +0 -3
  21. Object_Segmentation/7.png +0 -3
  22. Object_Segmentation/8.png +0 -3
  23. Object_Segmentation/9.png +0 -3
  24. Plantations_Segmentation/annotations.xml +0 -0
  25. Plantations_Segmentation/img/1.png +0 -3
  26. Plantations_Segmentation/img/10.jpeg +0 -3
  27. Plantations_Segmentation/img/11.png +0 -3
  28. Plantations_Segmentation/img/12.png +0 -3
  29. Plantations_Segmentation/img/13.jpg +0 -3
  30. Plantations_Segmentation/img/2.jpg +0 -3
  31. Plantations_Segmentation/img/3.jpeg +0 -3
  32. Plantations_Segmentation/img/4.jpg +0 -3
  33. Plantations_Segmentation/img/5.png +0 -3
  34. Plantations_Segmentation/img/6.png +0 -3
  35. Plantations_Segmentation/img/7.png +0 -3
  36. Plantations_Segmentation/img/8.png +0 -3
  37. Plantations_Segmentation/img/9.jpg +0 -3
  38. Class_Segmentation/1.png → data/class_segmentation.tar.gz +2 -2
  39. Class_Segmentation/11.png → data/images.tar.gz +2 -2
  40. Class_Segmentation/10.png → data/object_segmentation.tar.gz +2 -2
  41. data/plantations_segmentation.csv +0 -0
  42. plantations.csv +0 -14
  43. plantations_segmentation.py +100 -0
Class_Segmentation/12.png DELETED

Git LFS Details

  • SHA256: edfcd5ecbc123654743bf576d7da2e88f5f6c479ff9536c2136475d23f7239f8
  • Pointer size: 131 Bytes
  • Size of remote file: 100 kB
Class_Segmentation/13.png DELETED

Git LFS Details

  • SHA256: b02c5c0c3b80cb2584b9736454c1e244be0bda9a2c162edab253f4511f3c2c29
  • Pointer size: 130 Bytes
  • Size of remote file: 33.1 kB
Class_Segmentation/2.png DELETED

Git LFS Details

  • SHA256: a9e999943a25e0821c2e4abf1cf28f7707e9a127638ed2c8365204d7d079d836
  • Pointer size: 129 Bytes
  • Size of remote file: 9.84 kB
Class_Segmentation/3.png DELETED

Git LFS Details

  • SHA256: c159a29b3b8db80b6832183bbef37cb689e6dd1d39fa57bfe8d1d01f47da0140
  • Pointer size: 130 Bytes
  • Size of remote file: 67.1 kB
Class_Segmentation/4.png DELETED

Git LFS Details

  • SHA256: c95dfbafacd2996609214dd6ededa6edb5768bd29c281bcfa83cf418bb796e7c
  • Pointer size: 131 Bytes
  • Size of remote file: 179 kB
Class_Segmentation/5.png DELETED

Git LFS Details

  • SHA256: 00885646e341b8976be48dd438c3d8e7494a8a7e93b719897f7947ad22820036
  • Pointer size: 130 Bytes
  • Size of remote file: 79.5 kB
Class_Segmentation/6.png DELETED

Git LFS Details

  • SHA256: 9ac4c1fe895d79c2c688a1d8cb9ed62742918f868c53927417204061d4e3248c
  • Pointer size: 130 Bytes
  • Size of remote file: 16.8 kB
Class_Segmentation/7.png DELETED

Git LFS Details

  • SHA256: 22788d4470c469e658ae0c88b30e33d1616bae560ac462599f4e204932a1b47b
  • Pointer size: 130 Bytes
  • Size of remote file: 17.4 kB
Class_Segmentation/8.png DELETED

Git LFS Details

  • SHA256: de4f1744294cf1b68dd2070df9806790d9a983d2145b8263e83400cfa4a33470
  • Pointer size: 130 Bytes
  • Size of remote file: 56 kB
Class_Segmentation/9.png DELETED

Git LFS Details

  • SHA256: 5449ff7f9b8a7cbf88773ce266d21a5bc51f30ea1c5cc7bee0c282232a7e943d
  • Pointer size: 130 Bytes
  • Size of remote file: 36.7 kB
Object_Segmentation/1.png DELETED

Git LFS Details

  • SHA256: 72f9c0a856d91620ee5729f0c0ba9013c339bb94da41885b65133dd71e4f0ac8
  • Pointer size: 130 Bytes
  • Size of remote file: 16.8 kB
Object_Segmentation/10.png DELETED

Git LFS Details

  • SHA256: ecf3de4092ab10abbb0754c92c4a41dde2b0f4cad367bbb08df5f045d36dfe46
  • Pointer size: 130 Bytes
  • Size of remote file: 23.5 kB
Object_Segmentation/11.png DELETED

Git LFS Details

  • SHA256: 02b71db0e0119374269d9f047a6c73c53a51e236d29d277792ca4e0ab6e40cd3
  • Pointer size: 130 Bytes
  • Size of remote file: 65.2 kB
Object_Segmentation/12.png DELETED

Git LFS Details

  • SHA256: d0c31e149249f267316e4e3c812380d1c1e3a45c156860901353d6c3da631af5
  • Pointer size: 130 Bytes
  • Size of remote file: 89.5 kB
Object_Segmentation/13.png DELETED

Git LFS Details

  • SHA256: 3b0df3e315f954f2d43c86d7a0215e9f8991e56ccbec0e24a61d74d239a7003c
  • Pointer size: 130 Bytes
  • Size of remote file: 28.2 kB
Object_Segmentation/2.png DELETED

Git LFS Details

  • SHA256: 891af8bf46e5f2bc9b8f2e29606f8963c2105464a3fbe28c98886f0fd31e1f14
  • Pointer size: 129 Bytes
  • Size of remote file: 7.33 kB
Object_Segmentation/3.png DELETED

Git LFS Details

  • SHA256: ed643c44c94baf364e821e3ab1a6f6e1f47264091954832fad8c752cfb6dd62d
  • Pointer size: 130 Bytes
  • Size of remote file: 62 kB
Object_Segmentation/4.png DELETED

Git LFS Details

  • SHA256: 2b8e2d90e0c3a3a4e7d8f91c7cccd3da0c9ca14ae8897b70f0740b43ac00deb8
  • Pointer size: 131 Bytes
  • Size of remote file: 161 kB
Object_Segmentation/5.png DELETED

Git LFS Details

  • SHA256: 4325c8309f261fb3e95a55c7993ea2e70e05769c012db49bd20fb1e85563f0ab
  • Pointer size: 130 Bytes
  • Size of remote file: 62.3 kB
Object_Segmentation/6.png DELETED

Git LFS Details

  • SHA256: 06b94c52ebbe87a8e077ee3cd7a1168a54f14aa7dac894cdddc5622a83b0f8b2
  • Pointer size: 130 Bytes
  • Size of remote file: 16.4 kB
Object_Segmentation/7.png DELETED

Git LFS Details

  • SHA256: f63388fbbde2a1401aca9ade444924b5dfde750fe4f79b6d46e7a0f619b251bb
  • Pointer size: 130 Bytes
  • Size of remote file: 14.8 kB
Object_Segmentation/8.png DELETED

Git LFS Details

  • SHA256: a903d41f35f7fba40579a221fbeae01d61872877206b6a924d5d3175edbc3c03
  • Pointer size: 130 Bytes
  • Size of remote file: 40.6 kB
Object_Segmentation/9.png DELETED

Git LFS Details

  • SHA256: 2ef5e19e707d5cde869498dc53b1127c81b9af4a3a7faec1bda8ec8ca095549e
  • Pointer size: 130 Bytes
  • Size of remote file: 32.8 kB
Plantations_Segmentation/annotations.xml DELETED
The diff for this file is too large to render. See raw diff
 
Plantations_Segmentation/img/1.png DELETED

Git LFS Details

  • SHA256: 801848a7dac492cf1f895cd8a3000c7457a081816f4705d54c14081927f2aa1f
  • Pointer size: 132 Bytes
  • Size of remote file: 6.23 MB
Plantations_Segmentation/img/10.jpeg DELETED

Git LFS Details

  • SHA256: bc2207a8b8666e80d5e34147635c827692dc2a0e717418953204093b4362a985
  • Pointer size: 131 Bytes
  • Size of remote file: 711 kB
Plantations_Segmentation/img/11.png DELETED

Git LFS Details

  • SHA256: 2597e109b7e43979f6b5c3fbed89c1c4f9ef953d89b031dc2e5d46744a94f236
  • Pointer size: 132 Bytes
  • Size of remote file: 6.8 MB
Plantations_Segmentation/img/12.png DELETED

Git LFS Details

  • SHA256: 4e2236b202775697b1dc3aab42afd04220a28045b3bb5c04bb82bfeb797bc555
  • Pointer size: 132 Bytes
  • Size of remote file: 6.21 MB
Plantations_Segmentation/img/13.jpg DELETED

Git LFS Details

  • SHA256: 2ea1f94711a495ec42037e704ce577bbd096b6cba637c9b60e1d21173e8e1ab4
  • Pointer size: 131 Bytes
  • Size of remote file: 275 kB
Plantations_Segmentation/img/2.jpg DELETED

Git LFS Details

  • SHA256: d1a527a83d3b5665b0daf1171825a423fd07fe656097a9bf7cbefb2572914c9f
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
Plantations_Segmentation/img/3.jpeg DELETED

Git LFS Details

  • SHA256: 6e989266d58254953b800e79af9320ec58a5a405512ca33d1a9bb42893e987cc
  • Pointer size: 131 Bytes
  • Size of remote file: 474 kB
Plantations_Segmentation/img/4.jpg DELETED

Git LFS Details

  • SHA256: 0e4d1c49e54c338a5284774f640da191907e28f236aedab1477ef790eae24568
  • Pointer size: 132 Bytes
  • Size of remote file: 2.26 MB
Plantations_Segmentation/img/5.png DELETED

Git LFS Details

  • SHA256: 0e6353114bb2e34703c3170a6015630bc5e6be2bbcfa51e5625dc6cdac03f2e8
  • Pointer size: 132 Bytes
  • Size of remote file: 5.06 MB
Plantations_Segmentation/img/6.png DELETED

Git LFS Details

  • SHA256: 61f26487e1577af698986247018ab0d479026e71728d84c2517ce56a76dfbd06
  • Pointer size: 131 Bytes
  • Size of remote file: 732 kB
Plantations_Segmentation/img/7.png DELETED

Git LFS Details

  • SHA256: 61f26487e1577af698986247018ab0d479026e71728d84c2517ce56a76dfbd06
  • Pointer size: 131 Bytes
  • Size of remote file: 732 kB
Plantations_Segmentation/img/8.png DELETED

Git LFS Details

  • SHA256: d83bc7a578babe72dab17c4f9d39fc7310208c0bc446366f918be0d0e9d773c1
  • Pointer size: 133 Bytes
  • Size of remote file: 17 MB
Plantations_Segmentation/img/9.jpg DELETED

Git LFS Details

  • SHA256: 310dbbb6a78ea7e2afbdc8e5428abcbc451c991f6b9e85fda97b63eb9198f96c
  • Pointer size: 131 Bytes
  • Size of remote file: 378 kB
Class_Segmentation/1.png → data/class_segmentation.tar.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2a3d786608dbb3e70e737cc251bfdd54ca68c39785641b8c6d54b75b97fff715
3
- size 19984
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6b859b5af1153513b186bfd3b533a4600d1c5c463a712c1b9c089b7cf0b2205
3
+ size 455833
Class_Segmentation/11.png → data/images.tar.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d080d67722542640345b656bb2ebb13e94a1c301a3e9ce51036f3d1aaec7b288
3
- size 78870
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b8d7facc832a219a6ed0e21f3f192bcac28af8e875eefbb4734e390f751a0dd
3
+ size 46809599
Class_Segmentation/10.png → data/object_segmentation.tar.gz RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0f47ac1f11fb5979f71b1f66dbe633aaeb091728e5067b4bfed19257bfcb1935
3
- size 28608
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc52606bb631f2e48eab104ebb87dd14a95ebdf2ecd1340d61cc43de9be0580e
3
+ size 510121
data/plantations_segmentation.csv ADDED
The diff for this file is too large to render. See raw diff
 
plantations.csv DELETED
@@ -1,14 +0,0 @@
1
- image_id;image_name
2
- 1;Plantations_Segmentation/img/1.png
3
- 2;Plantations_Segmentation/img/2.png
4
- 3;Plantations_Segmentation/img/3.png
5
- 4;Plantations_Segmentation/img/4.png
6
- 5;Plantations_Segmentation/img/5.png
7
- 6;Plantations_Segmentation/img/6.png
8
- 7;Plantations_Segmentation/img/7.png
9
- 8;Plantations_Segmentation/img/8.png
10
- 9;Plantations_Segmentation/img/9.png
11
- 10;Plantations_Segmentation/img/10.png
12
- 11;Plantations_Segmentation/img/11.png
13
- 12;Plantations_Segmentation/img/12.png
14
- 13;Plantations_Segmentation/img/13.png
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plantations_segmentation.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ import pandas as pd
3
+
4
+ _CITATION = """\
5
+ @InProceedings{huggingface:dataset,
6
+ title = {plantations_segmentation},
7
+ author = {TrainingDataPro},
8
+ year = {2023}
9
+ }
10
+ """
11
+
12
+ _DESCRIPTION = """\
13
+ The dataset consist of screenshots from videos of basketball games with
14
+ the ball labeled with a bounging box.
15
+ The dataset can be used to train a neural network in ball control recognition.
16
+ The dataset is useful for automating the camera operator's work during a match,
17
+ allowing the ball to be efficiently kept in frame.
18
+ """
19
+ _NAME = 'plantations_segmentation'
20
+
21
+ _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
22
+
23
+ _LICENSE = ""
24
+
25
+ _DATA = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}/resolve/main/data/"
26
+
27
+
28
+ class PlantationsSegmentation(datasets.GeneratorBasedBuilder):
29
+ """Small sample of image-text pairs"""
30
+
31
+ def _info(self):
32
+ return datasets.DatasetInfo(
33
+ description=_DESCRIPTION,
34
+ features=datasets.Features({
35
+ 'image_id': datasets.Value('int32'),
36
+ 'image': datasets.Image(),
37
+ 'class_segmentation': datasets.Image(),
38
+ 'object_segmentation': datasets.Image(),
39
+ 'shapes': datasets.Value('string')
40
+ }),
41
+ supervised_keys=None,
42
+ homepage=_HOMEPAGE,
43
+ citation=_CITATION,
44
+ )
45
+
46
+ def _split_generators(self, dl_manager):
47
+ images = dl_manager.download(f"{_DATA}images.tar.gz")
48
+ class_segmentation_masks = dl_manager.download(
49
+ f"{_DATA}class_segmentation.tar.gz")
50
+ object_segmentation_masks = dl_manager.download(
51
+ f"{_DATA}object_segmentation.tar.gz")
52
+ annotations = dl_manager.download(f"{_DATA}{_NAME}.csv")
53
+ images = dl_manager.iter_archive(images)
54
+ class_segmentation_masks = dl_manager.iter_archive(
55
+ class_segmentation_masks)
56
+ object_segmentation_masks = dl_manager.iter_archive(
57
+ object_segmentation_masks)
58
+ return [
59
+ datasets.SplitGenerator(
60
+ name=datasets.Split.TRAIN,
61
+ gen_kwargs={
62
+ "images": images,
63
+ 'class_segmentation_masks': class_segmentation_masks,
64
+ 'object_segmentation_masks': object_segmentation_masks,
65
+ 'annotations': annotations
66
+ }),
67
+ ]
68
+
69
+ def _generate_examples(self, images, class_segmentation_masks,
70
+ object_segmentation_masks, annotations):
71
+ annotations_df = pd.read_csv(annotations)
72
+
73
+ for idx, ((image_path, image), (class_segmentation_path,
74
+ class_segmentation),
75
+ (object_segmentation_path,
76
+ object_segmentation)) in enumerate(
77
+ zip(images, class_segmentation_masks,
78
+ object_segmentation_masks)):
79
+ yield idx, {
80
+ 'image_id':
81
+ annotations_df.loc[
82
+ annotations_df['image_name'] == image_path]
83
+ ['image_id'].values[0],
84
+ "image": {
85
+ "path": image_path,
86
+ "bytes": image.read()
87
+ },
88
+ "class_segmentation": {
89
+ "path": class_segmentation_path,
90
+ "bytes": class_segmentation.read()
91
+ },
92
+ "object_segmentation": {
93
+ "path": object_segmentation_path,
94
+ "bytes": object_segmentation.read()
95
+ },
96
+ 'shapes':
97
+ annotations_df.loc[
98
+ annotations_df['image_name'] == image_path]
99
+ ['shapes'].values[0]
100
+ }