rmarcosg commited on
Commit
bd2482f
·
verified ·
1 Parent(s): 8151640

Create bark_detection.py

Browse files
Files changed (1) hide show
  1. bark_detection.py +63 -0
bark_detection.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """A bark detection dataset"""
2
+
3
+ import csv
4
+
5
+ import datasets
6
+
7
+
8
+ _CITATION = """\
9
+ @InProceedings{huggingface:dataset,
10
+ title = {A bark detection dataset with positive and negative samples of 1 second},
11
+ author={Rodrigo Marcos García},
12
+ year={2024}
13
+ }
14
+ """
15
+
16
+
17
+
18
+ _DESCRIPTION = """\
19
+ This is a bark detection dataset with positive and negative samples of 1 second
20
+ """
21
+
22
+ _HOMEPAGE = "https://huggingface.co/datasets/rmarcosg/bark-detection"
23
+
24
+ _LICENSE = "Apache 2.0"
25
+
26
+
27
+ class BarkDetection(datasets.GeneratorBasedBuilder):
28
+
29
+ VERSION = datasets.Version("0.0.1")
30
+
31
+ def _info(self):
32
+ return datasets.DatasetInfo(
33
+ description=_DESCRIPTION,
34
+ homepage=_HOMEPAGE,
35
+ license=_LICENSE,
36
+ citation=_CITATION,
37
+ )
38
+
39
+ def _split_generators(self, dl_manager):
40
+
41
+ return [
42
+ datasets.SplitGenerator(
43
+ name=datasets.Split.TRAIN,
44
+ gen_kwargs={
45
+ "filepath": "train",
46
+ "split": "train",
47
+ },
48
+ ),
49
+ datasets.SplitGenerator(
50
+ name=datasets.Split.VALIDATION,
51
+ gen_kwargs={
52
+ "filepath": "validation",
53
+ "split": "validation",
54
+ },
55
+ ),
56
+ datasets.SplitGenerator(
57
+ name=datasets.Split.TEST,
58
+ gen_kwargs={
59
+ "filepath": "test",
60
+ "split": "test"
61
+ },
62
+ ),
63
+ ]