Skip to content
Snippets Groups Projects
Commit d8a0b10a authored by François  LAURENT's avatar François LAURENT
Browse files

Merge branch 'dev' into 'main'

make_dataset.py extracts more time segments at the ends of tracks

See merge request !2
parents 0a255373 a02dc0f4
No related branches found
No related tags found
1 merge request!2make_dataset.py extracts more time segments at the ends of tracks
[tool.poetry] [tool.poetry]
name = "MaggotUBA-adapter" name = "MaggotUBA-adapter"
version = "0.15.0" version = "0.16"
description = "Interface between MaggotUBA and the Nyx tagging UI" description = "Interface between MaggotUBA and the Nyx tagging UI"
authors = ["François Laurent"] authors = ["François Laurent"]
license = "MIT" license = "MIT"
...@@ -14,7 +14,7 @@ maggotuba-core = {git = "https://gitlab.pasteur.fr/nyx/MaggotUBA-core", tag = "v ...@@ -14,7 +14,7 @@ maggotuba-core = {git = "https://gitlab.pasteur.fr/nyx/MaggotUBA-core", tag = "v
torch = "^1.11.0" torch = "^1.11.0"
numpy = "^1.19.3" numpy = "^1.19.3"
protobuf = "3.9.2" protobuf = "3.9.2"
taggingbackends = {git = "https://gitlab.pasteur.fr/nyx/TaggingBackends", tag = "v0.14"} taggingbackends = {git = "https://gitlab.pasteur.fr/nyx/TaggingBackends", tag = "v0.14.1"}
[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["poetry-core>=1.0.0"]
......
...@@ -52,6 +52,8 @@ def make_dataset(backend, labels_expected=False, trxmat_only=False, ...@@ -52,6 +52,8 @@ def make_dataset(backend, labels_expected=False, trxmat_only=False,
# note kwargs['labels'] may be defined, but we dismiss # note kwargs['labels'] may be defined, but we dismiss
# the input argument, because we need to preserve the # the input argument, because we need to preserve the
# order of the labels (the class indices) # order of the labels (the class indices)
if isinstance(labels, dict):
labels = labels['names']
kwargs['labels'] = labels kwargs['labels'] = labels
break break
...@@ -59,6 +61,7 @@ def make_dataset(backend, labels_expected=False, trxmat_only=False, ...@@ -59,6 +61,7 @@ def make_dataset(backend, labels_expected=False, trxmat_only=False,
# generate a larva_dataset_*.hdf5 file in data/interim/{instance}/ # generate a larva_dataset_*.hdf5 file in data/interim/{instance}/
balance = isinstance(balancing_strategy, str) and balancing_strategy.lower() == 'maggotuba' balance = isinstance(balancing_strategy, str) and balancing_strategy.lower() == 'maggotuba'
out = backend.generate_dataset(backend.raw_data_dir(), out = backend.generate_dataset(backend.raw_data_dir(),
past_future_extensions=False,
balance=balance, **kwargs) balance=balance, **kwargs)
print(f"larva_dataset file generated: {out}") print(f"larva_dataset file generated: {out}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment