keremberke commited on
Commit
4892cfb
1 Parent(s): 3865b66

dataset uploaded by roboflow2huggingface package

Browse files
README.dataset.txt ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # undefined > 2022-02-26 3:03pm-1920
2
+ https://public.roboflow.ai/object-detection/undefined
3
+
4
+ Provided by undefined
5
+ License: CC BY 4.0
6
+
7
+ ## Background Information
8
+ This dataset was curated and annotated by [Find This Base](https://findthisbase.com/). A custom dataset composed of 16 classes from the popular mobile game, Clash of Clans.
9
+ * Classes: Canon, WizzTower, Xbow, AD, Mortar, Inferno, Scattershot, AirSweeper, BombTower, ClanCastle, Eagle, KingPad, QueenPad, RcPad, TH13 and WardenPad.
10
+
11
+ ![Find This Base](https://i.imgur.com/ztaqoaj.png)
12
+
13
+ [How to Use Find This Base](https://findthisbase.com/howto)
14
+ ![How to Use Find This Base](https://i.imgur.com/ibfFpyQ.gif)
15
+
16
+ The original custom dataset *(v1)* is composed of 125 annotated images.
17
+
18
+ The dataset is available under the [CC BY 4.0 license](https://creativecommons.org/licenses/by/4.0/).
19
+
20
+
21
+ ## Getting Started
22
+ You can download this dataset for use within your own projects, or fork it into a workspace on Roboflow to create your own model.
23
+
24
+ ## Dataset Versions
25
+ ### Version 1 (v1) - 125 images
26
+ * Preprocessing - Auto-Orient and Resize: Fit (black edges) to 640x640
27
+ * Augmentations - No augmentations applied
28
+ * Training Metrics - Trained from Scratch (no checkpoint used) on Roboflow
29
+ * mAP = 83.1%, precision = 43.0%, recall = 99.1%
30
+
31
+ ### Version 4 (v4) - 301 images
32
+ * Preprocessing - Auto-Orient and Resize: Fit (black edges) to 640x640
33
+ * Augmentations - Mosaic
34
+ * Generated Images - Outputs per training example: 3
35
+ * Training Metrics - Trained from Scratch (no checkpoint used) on Roboflow
36
+ * mAP = %, precision = %, recall = %
37
+
38
+ Find This Base: [Official Website](https://findthisbase.com/) | [How to Use Find This Base](https://findthisbase.com/howto) | [Discord](https://discord.gg/8EV8eRY) | [Patreon](https://www.patreon.com/FindThisBase)
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - object-detection
4
+ tags:
5
+ - roboflow
6
+ ---
7
+
8
+ ### Roboflow Dataset Page
9
+ https://universe.roboflow.com/find-this-base/clash-of-clans-vop4y/dataset/5
10
+
11
+ ### Dataset Labels
12
+
13
+ ```
14
+ ['ad', 'airsweeper', 'bombtower', 'canon', 'clancastle', 'eagle', 'inferno', 'kingpad', 'mortar', 'queenpad', 'rcpad', 'scattershot', 'th13', 'wardenpad', 'wizztower', 'xbow']
15
+ ```
16
+
17
+ ### Citation
18
+
19
+ ```
20
+ @misc{ clash-of-clans-vop4y_dataset,
21
+ title = { Clash of Clans Dataset },
22
+ type = { Open Source Dataset },
23
+ author = { Find This Base },
24
+ howpublished = { \\url{ https://universe.roboflow.com/find-this-base/clash-of-clans-vop4y } },
25
+ url = { https://universe.roboflow.com/find-this-base/clash-of-clans-vop4y },
26
+ journal = { Roboflow Universe },
27
+ publisher = { Roboflow },
28
+ year = { 2022 },
29
+ month = { feb },
30
+ note = { visited on 2022-12-30 },
31
+ }
32
+ ```
33
+
34
+ ### License
35
+ CC BY 4.0
36
+
37
+ ### Dataset Summary
38
+ This dataset was exported via roboflow.ai on March 30, 2022 at 4:31 PM GMT
39
+
40
+ It includes 125 images.
41
+ CoC are annotated in COCO format.
42
+
43
+ The following pre-processing was applied to each image:
44
+ * Auto-orientation of pixel data (with EXIF-orientation stripping)
45
+ * Resize to 1920x1920 (Fit (black edges))
46
+
47
+ No image augmentation techniques were applied.
48
+
49
+
50
+
README.roboflow.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Clash of Clans - v5 2022-02-26 3:03pm-1920
3
+ ==============================
4
+
5
+ This dataset was exported via roboflow.ai on March 30, 2022 at 4:31 PM GMT
6
+
7
+ It includes 125 images.
8
+ CoC are annotated in COCO format.
9
+
10
+ The following pre-processing was applied to each image:
11
+ * Auto-orientation of pixel data (with EXIF-orientation stripping)
12
+ * Resize to 1920x1920 (Fit (black edges))
13
+
14
+ No image augmentation techniques were applied.
15
+
16
+
clash-of-clans-object-detection.py ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import collections
2
+ import json
3
+ import os
4
+
5
+ import datasets
6
+
7
+
8
+ _HOMEPAGE = "https://universe.roboflow.com/find-this-base/clash-of-clans-vop4y/dataset/5"
9
+ _LICENSE = "CC BY 4.0"
10
+ _CITATION = """\
11
+ @misc{ clash-of-clans-vop4y_dataset,
12
+ title = { Clash of Clans Dataset },
13
+ type = { Open Source Dataset },
14
+ author = { Find This Base },
15
+ howpublished = { \\url{ https://universe.roboflow.com/find-this-base/clash-of-clans-vop4y } },
16
+ url = { https://universe.roboflow.com/find-this-base/clash-of-clans-vop4y },
17
+ journal = { Roboflow Universe },
18
+ publisher = { Roboflow },
19
+ year = { 2022 },
20
+ month = { feb },
21
+ note = { visited on 2022-12-30 },
22
+ }
23
+ """
24
+ _URLS = {
25
+ "train": "https://huggingface.co/datasets/keremberke/clash-of-clans-object-detection/resolve/main/data/train.zip",
26
+ "validation": "https://huggingface.co/datasets/keremberke/clash-of-clans-object-detection/resolve/main/data/valid.zip",
27
+ "test": "https://huggingface.co/datasets/keremberke/clash-of-clans-object-detection/resolve/main/data/test.zip",
28
+ }
29
+
30
+ _CATEGORIES = ['ad', 'airsweeper', 'bombtower', 'canon', 'clancastle', 'eagle', 'inferno', 'kingpad', 'mortar', 'queenpad', 'rcpad', 'scattershot', 'th13', 'wardenpad', 'wizztower', 'xbow']
31
+ _ANNOTATION_FILENAME = "_annotations.coco.json"
32
+
33
+
34
+ class CLASHOFCLANSOBJECTDETECTION(datasets.GeneratorBasedBuilder):
35
+ VERSION = datasets.Version("1.0.0")
36
+
37
+ def _info(self):
38
+ features = datasets.Features(
39
+ {
40
+ "image_id": datasets.Value("int64"),
41
+ "image": datasets.Image(),
42
+ "width": datasets.Value("int32"),
43
+ "height": datasets.Value("int32"),
44
+ "objects": datasets.Sequence(
45
+ {
46
+ "id": datasets.Value("int64"),
47
+ "area": datasets.Value("int64"),
48
+ "bbox": datasets.Sequence(datasets.Value("float32"), length=4),
49
+ "category": datasets.ClassLabel(names=_CATEGORIES),
50
+ }
51
+ ),
52
+ }
53
+ )
54
+ return datasets.DatasetInfo(
55
+ features=features,
56
+ homepage=_HOMEPAGE,
57
+ citation=_CITATION,
58
+ license=_LICENSE,
59
+ )
60
+
61
+ def _split_generators(self, dl_manager):
62
+ data_files = dl_manager.download_and_extract(_URLS)
63
+ return [
64
+ datasets.SplitGenerator(
65
+ name=datasets.Split.TRAIN,
66
+ gen_kwargs={
67
+ "folder_dir": data_files["train"],
68
+ },
69
+ ),
70
+ datasets.SplitGenerator(
71
+ name=datasets.Split.VALIDATION,
72
+ gen_kwargs={
73
+ "folder_dir": data_files["validation"],
74
+ },
75
+ ),
76
+ datasets.SplitGenerator(
77
+ name=datasets.Split.TEST,
78
+ gen_kwargs={
79
+ "folder_dir": data_files["test"],
80
+ },
81
+ ),
82
+ ]
83
+
84
+ def _generate_examples(self, folder_dir):
85
+ def process_annot(annot, category_id_to_category):
86
+ return {
87
+ "id": annot["id"],
88
+ "area": annot["area"],
89
+ "bbox": annot["bbox"],
90
+ "category": category_id_to_category[annot["category_id"]],
91
+ }
92
+
93
+ image_id_to_image = {}
94
+ idx = 0
95
+
96
+ annotation_filepath = os.path.join(folder_dir, _ANNOTATION_FILENAME)
97
+ with open(annotation_filepath, "r") as f:
98
+ annotations = json.load(f)
99
+ category_id_to_category = {category["id"]: category["name"] for category in annotations["categories"]}
100
+ image_id_to_annotations = collections.defaultdict(list)
101
+ for annot in annotations["annotations"]:
102
+ image_id_to_annotations[annot["image_id"]].append(annot)
103
+ image_id_to_image = {annot["file_name"]: annot for annot in annotations["images"]}
104
+
105
+ for filename in os.listdir(folder_dir):
106
+ filepath = os.path.join(folder_dir, filename)
107
+ if filename in image_id_to_image:
108
+ image = image_id_to_image[filename]
109
+ objects = [
110
+ process_annot(annot, category_id_to_category) for annot in image_id_to_annotations[image["id"]]
111
+ ]
112
+ with open(filepath, "rb") as f:
113
+ image_bytes = f.read()
114
+ yield idx, {
115
+ "image_id": image["id"],
116
+ "image": {"path": filepath, "bytes": image_bytes},
117
+ "width": image["width"],
118
+ "height": image["height"],
119
+ "objects": objects,
120
+ }
121
+ idx += 1
data/test.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:105f20bbd6730d7b2371964054b61275095280d693bdb58206fef9b7ce5f7647
3
+ size 4506881
data/train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:164a24610d74d111fdd5fc9fc0fef343af60d40ad37b6e73abdf2a374bae17fd
3
+ size 33770372
data/valid.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37b23798949abcbc631a481526d3d607b85f09e60ac36085c9ad53ed9cf1d1ba
3
+ size 9828443