britekit 0.0.9__py3-none-any.whl → 0.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of britekit might be problematic. Click here for more details.
- britekit/__about__.py +1 -1
- britekit/commands/_analyze.py +1 -1
- britekit/commands/_ckpt_ops.py +1 -1
- britekit/commands/_db_add.py +4 -4
- britekit/commands/_db_delete.py +7 -7
- britekit/commands/_embed.py +1 -1
- britekit/commands/_ensemble.py +2 -1
- britekit/commands/_extract.py +2 -2
- britekit/commands/_find_dup.py +1 -1
- britekit/commands/_pickle.py +1 -1
- britekit/commands/_plot.py +3 -3
- britekit/commands/_reextract.py +1 -1
- britekit/commands/_reports.py +4 -4
- britekit/commands/_search.py +1 -1
- britekit/commands/_train.py +2 -2
- britekit/commands/_tune.py +1 -1
- britekit/core/analyzer.py +1 -1
- britekit/core/audio.py +1 -1
- britekit/core/config_loader.py +13 -7
- britekit/core/data_module.py +1 -1
- britekit/core/dataset.py +1 -1
- britekit/core/pickler.py +1 -1
- britekit/core/plot.py +1 -1
- britekit/core/predictor.py +1 -1
- britekit/core/reextractor.py +1 -1
- britekit/core/trainer.py +1 -1
- britekit/core/tuner.py +1 -1
- britekit/core/util.py +3 -3
- britekit/models/base_model.py +1 -1
- britekit/models/model_loader.py +1 -1
- britekit/models/timm_model.py +1 -1
- britekit/testing/per_minute_tester.py +1 -1
- britekit/testing/per_recording_tester.py +1 -1
- britekit/testing/per_segment_tester.py +1 -1
- britekit/training_db/extractor.py +1 -1
- britekit/training_db/training_db.py +0 -2
- {britekit-0.0.9.dist-info → britekit-0.0.10.dist-info}/METADATA +2 -2
- {britekit-0.0.9.dist-info → britekit-0.0.10.dist-info}/RECORD +41 -41
- {britekit-0.0.9.dist-info → britekit-0.0.10.dist-info}/WHEEL +0 -0
- {britekit-0.0.9.dist-info → britekit-0.0.10.dist-info}/entry_points.txt +0 -0
- {britekit-0.0.9.dist-info → britekit-0.0.10.dist-info}/licenses/LICENSE.txt +0 -0
britekit/__about__.py
CHANGED
britekit/commands/_analyze.py
CHANGED
|
@@ -47,7 +47,7 @@ def analyze(
|
|
|
47
47
|
from britekit.core.analyzer import Analyzer
|
|
48
48
|
|
|
49
49
|
util.set_logging()
|
|
50
|
-
cfg
|
|
50
|
+
cfg = get_config(cfg_path)
|
|
51
51
|
try:
|
|
52
52
|
if rtype not in {"audacity", "csv", "both"}:
|
|
53
53
|
logging.error(f"Error. invalid rtype value: {rtype}")
|
britekit/commands/_ckpt_ops.py
CHANGED
|
@@ -142,7 +142,7 @@ def ckpt_onnx(
|
|
|
142
142
|
import torch
|
|
143
143
|
from britekit.models.model_loader import load_from_checkpoint
|
|
144
144
|
|
|
145
|
-
cfg
|
|
145
|
+
cfg = get_config(cfg_path)
|
|
146
146
|
base, _ = os.path.splitext(input_path)
|
|
147
147
|
output_path = base + ".onnx"
|
|
148
148
|
model = load_from_checkpoint(input_path)
|
britekit/commands/_db_add.py
CHANGED
|
@@ -23,7 +23,7 @@ def add_cat(db_path: Optional[str]=None, name: str="") -> None:
|
|
|
23
23
|
"""
|
|
24
24
|
from britekit.training_db.training_db import TrainingDatabase
|
|
25
25
|
|
|
26
|
-
cfg
|
|
26
|
+
cfg = get_config()
|
|
27
27
|
if db_path is None:
|
|
28
28
|
db_path = cfg.train.train_db
|
|
29
29
|
|
|
@@ -63,7 +63,7 @@ def add_stype(db_path: Optional[str]=None, name: str="") -> None:
|
|
|
63
63
|
"""
|
|
64
64
|
from britekit.training_db.training_db import TrainingDatabase
|
|
65
65
|
|
|
66
|
-
cfg
|
|
66
|
+
cfg = get_config()
|
|
67
67
|
if db_path is None:
|
|
68
68
|
db_path = cfg.train.train_db
|
|
69
69
|
|
|
@@ -103,7 +103,7 @@ def add_src(db_path: Optional[str]=None, name: str="") -> None:
|
|
|
103
103
|
"""
|
|
104
104
|
from britekit.training_db.training_db import TrainingDatabase
|
|
105
105
|
|
|
106
|
-
cfg
|
|
106
|
+
cfg = get_config()
|
|
107
107
|
if db_path is None:
|
|
108
108
|
db_path = cfg.train.train_db
|
|
109
109
|
|
|
@@ -154,7 +154,7 @@ def add_class(
|
|
|
154
154
|
"""
|
|
155
155
|
from britekit.training_db.training_db import TrainingDatabase
|
|
156
156
|
|
|
157
|
-
cfg
|
|
157
|
+
cfg = get_config()
|
|
158
158
|
if db_path is None:
|
|
159
159
|
db_path = cfg.train.train_db
|
|
160
160
|
|
britekit/commands/_db_delete.py
CHANGED
|
@@ -25,7 +25,7 @@ def del_cat(db_path: Optional[str]=None, name: Optional[str]=None) -> None:
|
|
|
25
25
|
"""
|
|
26
26
|
from britekit.training_db.training_db import TrainingDatabase
|
|
27
27
|
|
|
28
|
-
cfg
|
|
28
|
+
cfg = get_config()
|
|
29
29
|
if db_path is None:
|
|
30
30
|
db_path = cfg.train.train_db
|
|
31
31
|
|
|
@@ -78,7 +78,7 @@ def del_class(db_path: Optional[str]=None, name: Optional[str]=None) -> None:
|
|
|
78
78
|
"""
|
|
79
79
|
from britekit.training_db.training_db import TrainingDatabase
|
|
80
80
|
|
|
81
|
-
cfg
|
|
81
|
+
cfg = get_config()
|
|
82
82
|
if db_path is None:
|
|
83
83
|
db_path = cfg.train.train_db
|
|
84
84
|
|
|
@@ -128,7 +128,7 @@ def del_rec(db_path: Optional[str]=None, file_name: Optional[str]=None) -> None:
|
|
|
128
128
|
"""
|
|
129
129
|
from britekit.training_db.training_db import TrainingDatabase
|
|
130
130
|
|
|
131
|
-
cfg
|
|
131
|
+
cfg = get_config()
|
|
132
132
|
if db_path is None:
|
|
133
133
|
db_path = cfg.train.train_db
|
|
134
134
|
|
|
@@ -172,7 +172,7 @@ def del_sgroup(db_path: Optional[str]=None, name: Optional[str]=None) -> None:
|
|
|
172
172
|
"""
|
|
173
173
|
from britekit.training_db.training_db import TrainingDatabase
|
|
174
174
|
|
|
175
|
-
cfg
|
|
175
|
+
cfg = get_config()
|
|
176
176
|
if db_path is None:
|
|
177
177
|
db_path = cfg.train.train_db
|
|
178
178
|
|
|
@@ -217,7 +217,7 @@ def del_stype(db_path: Optional[str]=None, name: Optional[str]=None) -> None:
|
|
|
217
217
|
"""
|
|
218
218
|
from britekit.training_db.training_db import TrainingDatabase
|
|
219
219
|
|
|
220
|
-
cfg
|
|
220
|
+
cfg = get_config()
|
|
221
221
|
if db_path is None:
|
|
222
222
|
db_path = cfg.train.train_db
|
|
223
223
|
|
|
@@ -262,7 +262,7 @@ def del_src(db_path: Optional[str]=None, name: Optional[str]=None) -> None:
|
|
|
262
262
|
"""
|
|
263
263
|
from britekit.training_db.training_db import TrainingDatabase
|
|
264
264
|
|
|
265
|
-
cfg
|
|
265
|
+
cfg = get_config()
|
|
266
266
|
if db_path is None:
|
|
267
267
|
db_path = cfg.train.train_db
|
|
268
268
|
|
|
@@ -311,7 +311,7 @@ def del_seg(db_path: Optional[str]=None, class_name: Optional[str]=None, dir_pat
|
|
|
311
311
|
"""
|
|
312
312
|
from britekit.training_db.training_db import TrainingDatabase
|
|
313
313
|
|
|
314
|
-
cfg
|
|
314
|
+
cfg = get_config()
|
|
315
315
|
if db_path is None:
|
|
316
316
|
db_path = cfg.train.train_db
|
|
317
317
|
|
britekit/commands/_embed.py
CHANGED
|
@@ -57,7 +57,7 @@ def embed(
|
|
|
57
57
|
from britekit.models.model_loader import load_from_checkpoint
|
|
58
58
|
from britekit.training_db.training_db import TrainingDatabase
|
|
59
59
|
|
|
60
|
-
cfg
|
|
60
|
+
cfg = get_config(cfg_path)
|
|
61
61
|
if db_path is None:
|
|
62
62
|
db_path = cfg.train.train_db
|
|
63
63
|
|
britekit/commands/_ensemble.py
CHANGED
|
@@ -95,7 +95,7 @@ def ensemble(
|
|
|
95
95
|
logging.error(f"Error: invalid metric ({metric})")
|
|
96
96
|
return
|
|
97
97
|
|
|
98
|
-
cfg
|
|
98
|
+
cfg = get_config(cfg_path)
|
|
99
99
|
ckpt_paths = sorted(glob.glob(os.path.join(ckpt_path, "*.ckpt")))
|
|
100
100
|
num_ckpts = len(ckpt_paths)
|
|
101
101
|
if num_ckpts == 0:
|
|
@@ -145,6 +145,7 @@ def ensemble(
|
|
|
145
145
|
|
|
146
146
|
logging.info(f"Best score = {best_score:.4f}")
|
|
147
147
|
|
|
148
|
+
assert best_ensemble is not None
|
|
148
149
|
best_names = [Path(ckpt_path).name for ckpt_path in best_ensemble]
|
|
149
150
|
logging.info(f"Best ensemble = {best_names}")
|
|
150
151
|
|
britekit/commands/_extract.py
CHANGED
|
@@ -42,7 +42,7 @@ def extract_all(
|
|
|
42
42
|
from britekit.training_db.extractor import Extractor
|
|
43
43
|
from britekit.training_db.training_db import TrainingDatabase
|
|
44
44
|
|
|
45
|
-
cfg
|
|
45
|
+
cfg = get_config(cfg_path)
|
|
46
46
|
if db_path is not None:
|
|
47
47
|
cfg.train.train_db = db_path
|
|
48
48
|
|
|
@@ -172,7 +172,7 @@ def extract_by_image(
|
|
|
172
172
|
from britekit.training_db.extractor import Extractor
|
|
173
173
|
from britekit.training_db.training_db import TrainingDatabase
|
|
174
174
|
|
|
175
|
-
cfg
|
|
175
|
+
cfg = get_config(cfg_path)
|
|
176
176
|
if db_path is not None:
|
|
177
177
|
cfg.train.train_db = db_path
|
|
178
178
|
|
britekit/commands/_find_dup.py
CHANGED
britekit/commands/_pickle.py
CHANGED
britekit/commands/_plot.py
CHANGED
|
@@ -89,7 +89,7 @@ def plot_db(
|
|
|
89
89
|
from britekit.core.plot import plot_spec
|
|
90
90
|
from britekit.training_db.training_db import TrainingDatabase
|
|
91
91
|
|
|
92
|
-
cfg
|
|
92
|
+
cfg = get_config(cfg_path)
|
|
93
93
|
if power is not None:
|
|
94
94
|
cfg.audio.power = power
|
|
95
95
|
|
|
@@ -247,7 +247,7 @@ def plot_dir(
|
|
|
247
247
|
"""
|
|
248
248
|
from britekit.core.audio import Audio
|
|
249
249
|
|
|
250
|
-
cfg
|
|
250
|
+
cfg = get_config(cfg_path)
|
|
251
251
|
if power is not None:
|
|
252
252
|
cfg.audio.power = power
|
|
253
253
|
|
|
@@ -363,7 +363,7 @@ def plot_rec(
|
|
|
363
363
|
"""
|
|
364
364
|
from britekit.core.audio import Audio
|
|
365
365
|
|
|
366
|
-
cfg
|
|
366
|
+
cfg = get_config(cfg_path)
|
|
367
367
|
if power is not None:
|
|
368
368
|
cfg.audio.power = power
|
|
369
369
|
|
britekit/commands/_reextract.py
CHANGED
|
@@ -38,7 +38,7 @@ def reextract(
|
|
|
38
38
|
spec_group (str): Spectrogram group name for storing the extracted spectrograms. Defaults to 'default'.
|
|
39
39
|
"""
|
|
40
40
|
from britekit.core.reextractor import Reextractor
|
|
41
|
-
cfg
|
|
41
|
+
cfg = get_config(cfg_path)
|
|
42
42
|
|
|
43
43
|
if class_name and classes_path:
|
|
44
44
|
logging.error("Only one of --name and --classes may be specified.")
|
britekit/commands/_reports.py
CHANGED
|
@@ -143,7 +143,7 @@ def rpt_db(cfg_path: Optional[str] = None,
|
|
|
143
143
|
from britekit.training_db.training_db import TrainingDatabase
|
|
144
144
|
from britekit.training_db.training_data_provider import TrainingDataProvider
|
|
145
145
|
|
|
146
|
-
cfg
|
|
146
|
+
cfg = get_config(cfg_path)
|
|
147
147
|
if db_path is not None:
|
|
148
148
|
cfg.train.train_db = db_path
|
|
149
149
|
|
|
@@ -214,7 +214,7 @@ def rpt_epochs(
|
|
|
214
214
|
from britekit.core.analyzer import Analyzer
|
|
215
215
|
from britekit.testing.per_segment_tester import PerSegmentTester
|
|
216
216
|
|
|
217
|
-
cfg
|
|
217
|
+
cfg = get_config(cfg_path)
|
|
218
218
|
ckpt_paths = glob.glob(str(Path(input_path) / "*.ckpt"))
|
|
219
219
|
if len(ckpt_paths) == 0:
|
|
220
220
|
logging.error(f"No checkpoint files found in {input_path}")
|
|
@@ -403,7 +403,7 @@ def rpt_labels(
|
|
|
403
403
|
"""
|
|
404
404
|
import pandas as pd
|
|
405
405
|
|
|
406
|
-
cfg
|
|
406
|
+
cfg = get_config()
|
|
407
407
|
if min_score is None:
|
|
408
408
|
min_score = cfg.infer.min_score
|
|
409
409
|
|
|
@@ -556,7 +556,7 @@ def rpt_test(
|
|
|
556
556
|
from britekit.testing.per_recording_tester import PerRecordingTester
|
|
557
557
|
from britekit.testing.per_segment_tester import PerSegmentTester
|
|
558
558
|
|
|
559
|
-
cfg
|
|
559
|
+
cfg = get_config()
|
|
560
560
|
try:
|
|
561
561
|
if not recordings_path:
|
|
562
562
|
recordings_path = str(Path(annotations_path).parent)
|
britekit/commands/_search.py
CHANGED
|
@@ -62,7 +62,7 @@ def search(
|
|
|
62
62
|
from britekit.models.model_loader import load_from_checkpoint
|
|
63
63
|
from britekit.training_db.training_db import TrainingDatabase
|
|
64
64
|
|
|
65
|
-
cfg
|
|
65
|
+
cfg = get_config(cfg_path)
|
|
66
66
|
|
|
67
67
|
if not os.path.exists(output_path):
|
|
68
68
|
os.makedirs(output_path)
|
britekit/commands/_train.py
CHANGED
|
@@ -31,7 +31,7 @@ def train(
|
|
|
31
31
|
"""
|
|
32
32
|
from britekit.core.trainer import Trainer
|
|
33
33
|
|
|
34
|
-
cfg
|
|
34
|
+
cfg = get_config(cfg_path)
|
|
35
35
|
try:
|
|
36
36
|
start_time = time.time()
|
|
37
37
|
Trainer().run()
|
|
@@ -89,7 +89,7 @@ def find_lr(cfg_path: str, num_batches: int):
|
|
|
89
89
|
"""
|
|
90
90
|
from britekit.core.trainer import Trainer
|
|
91
91
|
|
|
92
|
-
cfg
|
|
92
|
+
cfg = get_config(cfg_path)
|
|
93
93
|
try:
|
|
94
94
|
suggested_lr, fig = Trainer().find_lr(num_batches)
|
|
95
95
|
fig.savefig("learning_rates.jpeg")
|
britekit/commands/_tune.py
CHANGED
britekit/core/analyzer.py
CHANGED
britekit/core/audio.py
CHANGED
britekit/core/config_loader.py
CHANGED
|
@@ -6,7 +6,7 @@ _base_config: Optional[BaseConfig] = None
|
|
|
6
6
|
_func_config: Optional[FunctionConfig] = None
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
def get_config(cfg_path: Optional[str] = None) ->
|
|
9
|
+
def get_config(cfg_path: Optional[str] = None) -> BaseConfig:
|
|
10
10
|
from omegaconf import OmegaConf, DictConfig
|
|
11
11
|
|
|
12
12
|
if cfg_path is None:
|
|
@@ -16,21 +16,27 @@ def get_config(cfg_path: Optional[str] = None) -> tuple[BaseConfig, FunctionConf
|
|
|
16
16
|
return get_config_with_dict(yaml_cfg)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
def
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
def get_func_config() -> FunctionConfig:
|
|
20
|
+
global _func_config
|
|
21
|
+
if _func_config is None:
|
|
22
|
+
_func_config = FunctionConfig()
|
|
23
|
+
|
|
24
|
+
return _func_config
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_config_with_dict(cfg_dict=None) -> BaseConfig:
|
|
22
28
|
from omegaconf import OmegaConf
|
|
23
29
|
|
|
24
|
-
global _base_config
|
|
30
|
+
global _base_config
|
|
25
31
|
if _base_config is None:
|
|
26
32
|
_base_config = OmegaConf.structured(BaseConfig())
|
|
27
|
-
|
|
33
|
+
|
|
28
34
|
# allow late merges/overrides even if already initialized
|
|
29
35
|
if cfg_dict is not None:
|
|
30
36
|
_base_config = cast(
|
|
31
37
|
BaseConfig, OmegaConf.merge(_base_config, OmegaConf.create(cfg_dict))
|
|
32
38
|
)
|
|
33
|
-
return
|
|
39
|
+
return _base_config
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
def set_base_config(cfg: BaseConfig) -> None:
|
britekit/core/data_module.py
CHANGED
britekit/core/dataset.py
CHANGED
britekit/core/pickler.py
CHANGED
|
@@ -30,7 +30,7 @@ class Pickler:
|
|
|
30
30
|
):
|
|
31
31
|
from britekit.training_db.training_db import TrainingDatabase
|
|
32
32
|
|
|
33
|
-
self.cfg
|
|
33
|
+
self.cfg = get_config()
|
|
34
34
|
self.classes_path = classes_path
|
|
35
35
|
self.output_path = output_path
|
|
36
36
|
self.max_per_class = max_per_class
|
britekit/core/plot.py
CHANGED
britekit/core/predictor.py
CHANGED
britekit/core/reextractor.py
CHANGED
britekit/core/trainer.py
CHANGED
|
@@ -14,7 +14,7 @@ class Trainer:
|
|
|
14
14
|
import pytorch_lightning as pl
|
|
15
15
|
import torch
|
|
16
16
|
|
|
17
|
-
self.cfg
|
|
17
|
+
self.cfg = get_config()
|
|
18
18
|
torch.set_float32_matmul_precision("medium")
|
|
19
19
|
if self.cfg.train.seed is not None:
|
|
20
20
|
pl.seed_everything(self.cfg.train.seed, workers=True)
|
britekit/core/tuner.py
CHANGED
|
@@ -42,7 +42,7 @@ class Tuner:
|
|
|
42
42
|
from britekit.core.pickler import Pickler
|
|
43
43
|
from britekit.core.reextractor import Reextractor
|
|
44
44
|
|
|
45
|
-
self.cfg
|
|
45
|
+
self.cfg = get_config()
|
|
46
46
|
self.original_seed = self.cfg.train.seed
|
|
47
47
|
self.recording_dir = recording_dir
|
|
48
48
|
self.output_dir = output_dir
|
britekit/core/util.py
CHANGED
|
@@ -101,7 +101,7 @@ def get_device() -> str:
|
|
|
101
101
|
"""Return the device for pytorch to use."""
|
|
102
102
|
import torch
|
|
103
103
|
|
|
104
|
-
cfg
|
|
104
|
+
cfg = get_config()
|
|
105
105
|
if cfg.misc.force_cpu:
|
|
106
106
|
return "cpu" # for performance comparisons
|
|
107
107
|
elif torch.cuda.is_available():
|
|
@@ -362,7 +362,7 @@ def get_source_name(filename: str) -> str:
|
|
|
362
362
|
if not filename:
|
|
363
363
|
return "default"
|
|
364
364
|
|
|
365
|
-
cfg
|
|
365
|
+
cfg = get_config()
|
|
366
366
|
if not cfg.misc.source_regexes:
|
|
367
367
|
return "default"
|
|
368
368
|
|
|
@@ -432,7 +432,7 @@ def expand_spectrogram(spec: bytes):
|
|
|
432
432
|
raise TypeError("spec must be bytes")
|
|
433
433
|
|
|
434
434
|
try:
|
|
435
|
-
cfg
|
|
435
|
+
cfg = get_config()
|
|
436
436
|
bytes_data = zlib.decompress(spec)
|
|
437
437
|
spec_array = np.frombuffer(bytes_data, dtype=np.uint8) / 255
|
|
438
438
|
spec_array = spec_array.astype(np.float32)
|
britekit/models/base_model.py
CHANGED
britekit/models/model_loader.py
CHANGED
britekit/models/timm_model.py
CHANGED
|
@@ -39,7 +39,7 @@ class TimmModel(BaseModel):
|
|
|
39
39
|
|
|
40
40
|
# head replacement is not supported here since it
|
|
41
41
|
# would be very complicated with so many model types
|
|
42
|
-
cfg
|
|
42
|
+
cfg = get_config()
|
|
43
43
|
assert model_type.startswith("timm.")
|
|
44
44
|
self.backbone = timm.create_model(
|
|
45
45
|
model_type[5:], # strip off the "timm." prefix
|
|
@@ -62,7 +62,7 @@ class PerMinuteTester(BaseTester):
|
|
|
62
62
|
self.threshold = threshold
|
|
63
63
|
self.gen_pr_table = gen_pr_table
|
|
64
64
|
|
|
65
|
-
self.cfg
|
|
65
|
+
self.cfg = get_config()
|
|
66
66
|
|
|
67
67
|
# ============================================================================
|
|
68
68
|
# Public methods - Main execution
|
|
@@ -56,7 +56,7 @@ class PerRecordingTester(BaseTester):
|
|
|
56
56
|
self.tp_secs_at_precision = tp_secs_at_precision
|
|
57
57
|
self.per_recording = True
|
|
58
58
|
|
|
59
|
-
self.cfg
|
|
59
|
+
self.cfg = get_config()
|
|
60
60
|
|
|
61
61
|
# ============================================================================
|
|
62
62
|
# Public methods - Main execution
|
|
@@ -6,7 +6,6 @@ from types import SimpleNamespace
|
|
|
6
6
|
from typing import Optional
|
|
7
7
|
|
|
8
8
|
from britekit.core.exceptions import DatabaseError
|
|
9
|
-
from britekit.core.config_loader import get_config
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
class TrainingDatabase:
|
|
@@ -20,7 +19,6 @@ class TrainingDatabase:
|
|
|
20
19
|
|
|
21
20
|
def __init__(self, db_path: str = os.path.join("data", "training.db")):
|
|
22
21
|
self.today = datetime.today().strftime("%Y-%m-%d")
|
|
23
|
-
_, self.fn_cfg = get_config()
|
|
24
22
|
try:
|
|
25
23
|
self.conn = sqlite3.connect(db_path)
|
|
26
24
|
self.conn.execute("PRAGMA foreign_keys = ON")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: britekit
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.10
|
|
4
4
|
Summary: Core functions for bioacoustic recognizers.
|
|
5
5
|
Project-URL: Documentation, https://github.com/jhuus/BriteKit#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/jhuus/BriteKit/issues
|
|
@@ -120,7 +120,7 @@ train:
|
|
|
120
120
|
This overrides the default values for model_type, learning_rate, drop_rate and num_epochs. When using the API, you can update configuration parameters like this:
|
|
121
121
|
```
|
|
122
122
|
import britekit as bk
|
|
123
|
-
cfg
|
|
123
|
+
cfg = bk.get_config()
|
|
124
124
|
cfg.train.model_type = "effnet.4"
|
|
125
125
|
```
|
|
126
126
|
## Downloading Recordings
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
britekit/cli.py,sha256=nnrCMfw3-1GJ4rKFpqTLu8JcBGxTocMn7nwzU4OSaew,3080
|
|
2
|
-
britekit/core/analyzer.py,sha256=
|
|
3
|
-
britekit/core/audio.py,sha256=
|
|
2
|
+
britekit/core/analyzer.py,sha256=0OYVxuwYx_R36MZwIlVgPMWQ1udZ_tdgYODJyEVDJm0,5604
|
|
3
|
+
britekit/core/audio.py,sha256=Ju1SBO9c8GUM0RZ-NuolZoPHF6hATLvayVEvKVOgxOw,15850
|
|
4
4
|
britekit/core/augmentation.py,sha256=5_wyB-6gt7uM68Zl-rO_fPu1D6tlsd2m5oWhA6l0W9Q,5721
|
|
5
5
|
britekit/core/base_config.py,sha256=wbCJI9cEH9mktUTSfLSCnU5AhJT6xhxhwZS4QWRYTpM,8744
|
|
6
|
-
britekit/core/config_loader.py,sha256=
|
|
7
|
-
britekit/core/data_module.py,sha256=
|
|
8
|
-
britekit/core/dataset.py,sha256=
|
|
6
|
+
britekit/core/config_loader.py,sha256=mDmLwKYXsWb9FRk12q9Rj2rVdvbCVCI3QTdsZSnUBCY,1339
|
|
7
|
+
britekit/core/data_module.py,sha256=0DkOZTTGymZ7JjukucDuAq-nXS_KPhqV7KFPhmMoQDw,9105
|
|
8
|
+
britekit/core/dataset.py,sha256=R_NDaFljl4IMKxGWWWm1PMkYCcfrEaiJU1NrVswt6eM,5801
|
|
9
9
|
britekit/core/exceptions.py,sha256=ti_ve7ZdhDmzgTuspXXqyw__SUt5NoAXGEwoe3agPU8,443
|
|
10
|
-
britekit/core/pickler.py,sha256=
|
|
11
|
-
britekit/core/plot.py,sha256=
|
|
12
|
-
britekit/core/predictor.py,sha256=
|
|
13
|
-
britekit/core/reextractor.py,sha256=
|
|
14
|
-
britekit/core/trainer.py,sha256=
|
|
15
|
-
britekit/core/tuner.py,sha256=
|
|
16
|
-
britekit/core/util.py,sha256=
|
|
17
|
-
britekit/models/base_model.py,sha256=
|
|
10
|
+
britekit/core/pickler.py,sha256=72hiqOiIbBeXvHGwmHAOODr9wGdyBwj4NUYecxIhtCE,5775
|
|
11
|
+
britekit/core/plot.py,sha256=H-SB2ooe2LT0j1KoXs2PgT3t05oAB4CWkYX_HvGMO_c,5329
|
|
12
|
+
britekit/core/predictor.py,sha256=9Heue3ku9rw4OfE0SWuWLKBLW-aMw8PXqWlBB4GUCbw,22911
|
|
13
|
+
britekit/core/reextractor.py,sha256=UqWLapReNhEne0dykBCN_UIpLOHkZxJMw4RAlG70nzI,8393
|
|
14
|
+
britekit/core/trainer.py,sha256=vFIVyFCYhnV0zdRjNU93wzd7_HLtiaXW8mAiK7BoJPA,6437
|
|
15
|
+
britekit/core/tuner.py,sha256=LoQi7jwIwqv2DY7MgupG32PdD6QiuneQrgRgxq8ANlk,16422
|
|
16
|
+
britekit/core/util.py,sha256=JKT-yqFPA9FBMT1-YsGvNE8E21242MYAsXvRGSgTNYg,19163
|
|
17
|
+
britekit/models/base_model.py,sha256=VpY2aMb7P3QWGzhIdJRGxdjT6z-o7XE5sJxnupeZtxQ,16880
|
|
18
18
|
britekit/models/dla.py,sha256=ALMY997AbERN7-sHqQuE5e43llRjpUDPZSFGL-Flv4M,3137
|
|
19
19
|
britekit/models/effnet.py,sha256=e7WdZMsLPXe8jcWChk6n97c8DMV0YyGV6lDP_Jv6Wz4,3129
|
|
20
20
|
britekit/models/gernet.py,sha256=7MEUZaDTfr-6oa8eE8dyDQb2LgahGBOEp1pTZSu1KOE,7022
|
|
21
21
|
britekit/models/head_factory.py,sha256=9X91_ZjY2GtfxSlCpo7RN6VCuWfqInPXDdv5qV9jv1Y,11268
|
|
22
22
|
britekit/models/hgnet.py,sha256=sgnNMpn98QI7JrytqOUzbAxngk_AIp5gKvsmu31hOzE,7125
|
|
23
|
-
britekit/models/model_loader.py,sha256=
|
|
24
|
-
britekit/models/timm_model.py,sha256=
|
|
23
|
+
britekit/models/model_loader.py,sha256=wws7sWBXskcjsxEsohXz2ZdBa-DdNNp39fu9WMqz2Hc,4362
|
|
24
|
+
britekit/models/timm_model.py,sha256=enGaxF-hV69Y3sn7axp8hYyL2GW2OMWwjk9gWzrGEAI,1465
|
|
25
25
|
britekit/models/vovnet.py,sha256=s8z5QaGO6zPNSN0e0CrgAPYd5qLxC7FNvxe4w7ZmkM4,5504
|
|
26
26
|
britekit/occurrence_db/occurrence_data_provider.py,sha256=1YR4Ubk1KPqLaTGp9Y8_VM-CQth1Am7X-hEl0I4ocT4,5967
|
|
27
27
|
britekit/occurrence_db/occurrence_db.py,sha256=-726UfhjppeIpDQ96VPtC675suk-7yR4Vgq3qMwFurM,11219
|
|
28
28
|
britekit/testing/base_tester.py,sha256=AHogaBK7wOICqtWUr6reuJK6IpV5F0HOXI2aBovXWIY,46182
|
|
29
|
-
britekit/testing/per_minute_tester.py,sha256=
|
|
30
|
-
britekit/testing/per_recording_tester.py,sha256=
|
|
31
|
-
britekit/testing/per_segment_tester.py,sha256=
|
|
32
|
-
britekit/training_db/extractor.py,sha256=
|
|
29
|
+
britekit/testing/per_minute_tester.py,sha256=wLIRatNCMhoylzYzXXFAikj_c9sy54O6SW4Wie8XSBQ,31553
|
|
30
|
+
britekit/testing/per_recording_tester.py,sha256=7Qzb3kyMDDXc1n9MACbht1xkgeZgDlU-eQX4Jw8I7bY,21726
|
|
31
|
+
britekit/testing/per_segment_tester.py,sha256=5zFpe8wVEEtVjthKKFRb0dwE9T0v4JIll9Tto4KDYbo,37066
|
|
32
|
+
britekit/training_db/extractor.py,sha256=yblYTco9b-bZhBTOkGkNANOabsNo8IfQGJxPvh_eJyo,8406
|
|
33
33
|
britekit/training_db/training_data_provider.py,sha256=V5aBjsCvrWViZ0Jv05hgcKRizcAXmqoj4q3hAHedoD8,5651
|
|
34
|
-
britekit/training_db/training_db.py,sha256=
|
|
35
|
-
britekit/__about__.py,sha256=
|
|
34
|
+
britekit/training_db/training_db.py,sha256=xZqN1sMC2yFMEDm9rOrCigN3CUfUzTaTUkX3IZ_zHRc,64922
|
|
35
|
+
britekit/__about__.py,sha256=litL8LIslwUFrsy5kr1J7Z0vtOgnQHWc_0EIkucH0_w,123
|
|
36
36
|
britekit/__init__.py,sha256=RpruzdjbvTcFNf21zJYY8HrAhJei91FtNNLjIBmw-kw,1857
|
|
37
37
|
britekit/install/data/classes.csv,sha256=OdTZ8oQdx7N-HKyhftxZStGZYsjhCy4UbanwtQJ2wBM,54
|
|
38
38
|
britekit/install/data/ignore.txt,sha256=RbKvEHtUCbgRYolwR1IucClwyD3q7l2s6QuRjph-Us4,68
|
|
@@ -65,31 +65,31 @@ britekit/install/yaml/samples/tune_learning_rate.yaml,sha256=UTtpsJwO33UWW0oecGR
|
|
|
65
65
|
britekit/install/yaml/samples/tune_optimizer.yaml,sha256=VtGlZmMJ22gaZWJ7CPLNHRZ-8EHeB5GmxywQm1Iy1MM,73
|
|
66
66
|
britekit/install/yaml/samples/tune_smooth.yaml,sha256=IZq2lohiJWVdzPl-i3aCEwEsJLmG_bg7EvyBUSI-R0o,83
|
|
67
67
|
britekit/commands/__init__.py,sha256=mms49ChyrGj4zzeUge6bl7uiPhOMjFm37NTk23ZFmXw,1586
|
|
68
|
-
britekit/commands/_analyze.py,sha256=
|
|
68
|
+
britekit/commands/_analyze.py,sha256=os2Td8bHN-JlLt7AFw4tfJD7g_yQQ7K8eSaCUfyxKs8,4951
|
|
69
69
|
britekit/commands/_audioset.py,sha256=BqmAJq6yWpyqBYIUWt9d0khBTQRa3vgUMdCS4U0fxvA,9957
|
|
70
70
|
britekit/commands/_calibrate.py,sha256=338dRyGRj-Bw_4wFxiANDCbo-lZgdl0OR2gD8PmLv8U,4912
|
|
71
|
-
britekit/commands/_ckpt_ops.py,sha256=
|
|
72
|
-
britekit/commands/_db_add.py,sha256=
|
|
73
|
-
britekit/commands/_db_delete.py,sha256=
|
|
74
|
-
britekit/commands/_embed.py,sha256=
|
|
75
|
-
britekit/commands/_ensemble.py,sha256=
|
|
76
|
-
britekit/commands/_extract.py,sha256=
|
|
77
|
-
britekit/commands/_find_dup.py,sha256=
|
|
71
|
+
britekit/commands/_ckpt_ops.py,sha256=2l-eJuxGBTHtQZ2Nked82KeSbP7WIwZ-yAYuM4v4HlU,5778
|
|
72
|
+
britekit/commands/_db_add.py,sha256=brUCb7LZVJ7XezlSmpaKilz9hYoII_DvfjhS1v64cr0,7249
|
|
73
|
+
britekit/commands/_db_delete.py,sha256=ziqxnQhBOjHgqlu0uk6GA8A7I9FOMYcPEscmPxThAVY,14520
|
|
74
|
+
britekit/commands/_embed.py,sha256=gTQK4YOilwsZCY2r8HhaWUZBpMkA-OEZsR5RkNV1euM,4388
|
|
75
|
+
britekit/commands/_ensemble.py,sha256=Pxh2Sg8otrkdOo9frkP-DReWkDng9Y9oL0Y6R3SesrQ,7883
|
|
76
|
+
britekit/commands/_extract.py,sha256=iz9VG1KnV-d7cFliQpmWiSi6Ezt9hCm5Iur9r-XBb20,8859
|
|
77
|
+
britekit/commands/_find_dup.py,sha256=Zig-s04BUQzeY4s7DjEQM53-e6KgCXxSw05R6BfSkNw,6350
|
|
78
78
|
britekit/commands/_inat.py,sha256=ojTre5BCj_jmEh6x2kzNhcminLN6h5bzsYpxyrxGRdQ,4164
|
|
79
79
|
britekit/commands/_init.py,sha256=FmaQRY-7SYSHCLXL__47LEPecWir7X6zEB05KpradFw,2829
|
|
80
|
-
britekit/commands/_pickle.py,sha256=
|
|
81
|
-
britekit/commands/_plot.py,sha256=
|
|
82
|
-
britekit/commands/_reextract.py,sha256=
|
|
83
|
-
britekit/commands/_reports.py,sha256=
|
|
84
|
-
britekit/commands/_search.py,sha256=
|
|
85
|
-
britekit/commands/_train.py,sha256=
|
|
86
|
-
britekit/commands/_tune.py,sha256=
|
|
80
|
+
britekit/commands/_pickle.py,sha256=5ZlAHlyR5Hdb4SOnJ-9qBaSZkSvi98fgkIV13KN5jSU,3485
|
|
81
|
+
britekit/commands/_plot.py,sha256=Jhzeo7_FJxBfJWPNVZaLn9QA8w9O3nMO1HtA0C3M48Q,13075
|
|
82
|
+
britekit/commands/_reextract.py,sha256=zth_E3IyBlrJ-ovHxzpyZntbamEDwelBZ3QrzozFwkA,3767
|
|
83
|
+
britekit/commands/_reports.py,sha256=Xxj9Au-v6I9X0jnKye6GaLggasXz5XhVVEG5bLfNQSg,22027
|
|
84
|
+
britekit/commands/_search.py,sha256=b7cIFSI3AuPhreYGO8HGqX12TKaOJ5uoc1uiqid04Mk,9988
|
|
85
|
+
britekit/commands/_train.py,sha256=40Zdu9FZkmdA0bIuTK-oADw-4X6aMQYS1XGigheocdo,4152
|
|
86
|
+
britekit/commands/_tune.py,sha256=xRnSI4VYLj5IrQS-TVgwRvcC7XkvUS8ETLpGYs8FIc0,7328
|
|
87
87
|
britekit/commands/_wav2mp3.py,sha256=2Q4cjT6OhJmBPTNzGRMrDd6dSdBBufuQdjhH1V8ghLo,2167
|
|
88
88
|
britekit/commands/_xeno.py,sha256=_6YxQ7xFdaSy5DNUaigkbYp3E8EhtOhTC9b6OFS0MFA,6026
|
|
89
89
|
britekit/commands/_youtube.py,sha256=_u1LrwY_2GxllKd505N_2ArFMbACQ_PtVxuqUCYxFe0,2214
|
|
90
90
|
britekit/core/__init__.py,sha256=QcjcFyvO5KqJLF_HBeqiCk925uU5jTUjIV5lJix9XY4,556
|
|
91
|
-
britekit-0.0.
|
|
92
|
-
britekit-0.0.
|
|
93
|
-
britekit-0.0.
|
|
94
|
-
britekit-0.0.
|
|
95
|
-
britekit-0.0.
|
|
91
|
+
britekit-0.0.10.dist-info/METADATA,sha256=CSjpfbKoD9BknB08SLdo2i_iEt4HmBGTGXnsJvt_5mY,18553
|
|
92
|
+
britekit-0.0.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
93
|
+
britekit-0.0.10.dist-info/entry_points.txt,sha256=ycnPy5DLX14RTf7lKfkQAVyIf1B1zTL1gMsHm455wmg,46
|
|
94
|
+
britekit-0.0.10.dist-info/licenses/LICENSE.txt,sha256=kPoHm6iop8-CUa_720Tt8gqyvLD6D_7218u1hCCpErk,1092
|
|
95
|
+
britekit-0.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|