mwirth7 commited on
Commit
10b5b90
1 Parent(s): bcb4da6

add XCM classes

Browse files
Files changed (2) hide show
  1. classes.py +0 -0
  2. gadme.py +4 -4
classes.py CHANGED
The diff for this file is too large to render. See raw diff
 
gadme.py CHANGED
@@ -20,7 +20,7 @@ import pandas as pd
20
 
21
  from .classes import BIRD_NAMES_NIPS4BPLUS, BIRD_NAMES_AMAZON_BASIN, BIRD_NAMES_HAWAII, \
22
  BIRD_NAMES_HIGH_SIERRAS, BIRD_NAMES_SIERRA_NEVADA, BIRD_NAMES_POWDERMILL_NATURE, BIRD_NAMES_SAPSUCKER, \
23
- BIRD_NAMES_COLUMBIA_COSTA_RICA, BIRD_NAMES_XENOCANTO
24
 
25
  from .descriptions import _BIRD_DB_CITATION, _NIPS4BPLUS_CITATION, _NIPS4BPLUS_DESCRIPTION, \
26
  _HIGH_SIERRAS_DESCRIPTION, _HIGH_SIERRAS_CITATION, _SIERRA_NEVADA_DESCRIPTION, _SIERRA_NEVADA_CITATION, \
@@ -47,7 +47,7 @@ _BIRDSET_DESCRIPTION = """\
47
  base_url = "https://huggingface.co/datasets/DBD-research-group/gadme/resolve/data"
48
 
49
 
50
- #base_url = "data" # set a path to data folder to load localy
51
 
52
 
53
  class BirdSetConfig(datasets.BuilderConfig):
@@ -67,7 +67,7 @@ class BirdSetConfig(datasets.BuilderConfig):
67
  "low_freq": datasets.Value("int64"),
68
  "high_freq": datasets.Value("int64"),
69
  "ebird_code": datasets.ClassLabel(names=class_list),
70
- "ebird_code_multilabel": datasets.Sequence(datasets.ClassLabel(names=class_list)),
71
  "ebird_code_secondary": datasets.Sequence(datasets.Value("string")),
72
  "call_type": datasets.Value("string"),
73
  "sex": datasets.Value("string"),
@@ -267,7 +267,7 @@ class BirdSet(datasets.GeneratorBasedBuilder):
267
  description="TODO",
268
  citation="TODO",
269
  data_dir=f"{base_url}/XCM",
270
- class_list=BIRD_NAMES_XENOCANTO,
271
  ),
272
  BirdSetConfig(
273
  name="XCL",
 
20
 
21
  from .classes import BIRD_NAMES_NIPS4BPLUS, BIRD_NAMES_AMAZON_BASIN, BIRD_NAMES_HAWAII, \
22
  BIRD_NAMES_HIGH_SIERRAS, BIRD_NAMES_SIERRA_NEVADA, BIRD_NAMES_POWDERMILL_NATURE, BIRD_NAMES_SAPSUCKER, \
23
+ BIRD_NAMES_COLUMBIA_COSTA_RICA, BIRD_NAMES_XENOCANTO, BIRD_NAMES_XENOCANTO_M
24
 
25
  from .descriptions import _BIRD_DB_CITATION, _NIPS4BPLUS_CITATION, _NIPS4BPLUS_DESCRIPTION, \
26
  _HIGH_SIERRAS_DESCRIPTION, _HIGH_SIERRAS_CITATION, _SIERRA_NEVADA_DESCRIPTION, _SIERRA_NEVADA_CITATION, \
 
47
  base_url = "https://huggingface.co/datasets/DBD-research-group/gadme/resolve/data"
48
 
49
 
50
+ base_url = "../data" # set a path to data folder to load locally
51
 
52
 
53
  class BirdSetConfig(datasets.BuilderConfig):
 
67
  "low_freq": datasets.Value("int64"),
68
  "high_freq": datasets.Value("int64"),
69
  "ebird_code": datasets.ClassLabel(names=class_list),
70
+ "ebird_code_multilabel": datasets.Sequence(datasets.ClassLabel(names=["no_call"] + class_list)),
71
  "ebird_code_secondary": datasets.Sequence(datasets.Value("string")),
72
  "call_type": datasets.Value("string"),
73
  "sex": datasets.Value("string"),
 
267
  description="TODO",
268
  citation="TODO",
269
  data_dir=f"{base_url}/XCM",
270
+ class_list=BIRD_NAMES_XENOCANTO_M,
271
  ),
272
  BirdSetConfig(
273
  name="XCL",