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

version increment

parent 2dcfdcf8
No related branches found
Tags v0.3
No related merge requests found
[tool.poetry] [tool.poetry]
name = "MaggotUBA-adapter" name = "MaggotUBA-adapter"
version = "0.2.0" version = "0.3.0"
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"
......
from taggingbackends.data.trxmat import TrxMat from taggingbackends.data.trxmat import TrxMat
from taggingbackends.data.chore import load_spine from taggingbackends.data.chore import load_spine
import taggingbackends.data.fimtrack as fimtrack
from taggingbackends.data.labels import Labels from taggingbackends.data.labels import Labels
from taggingbackends.features.skeleton import get_5point_spines from taggingbackends.features.skeleton import get_5point_spines
from randomforest import RandomForest from randomforest import RandomForest
...@@ -46,13 +47,17 @@ def predict_model(backend): ...@@ -46,13 +47,17 @@ def predict_model(backend):
if run == "spine": if run == "spine":
run, data = next(iter(data.items())) run, data = next(iter(data.items()))
t = t[run] t = t[run]
elif file.name.endswith(".csv"):
print("assuming 30 fps")
t, data = fimtrack.read_spines(file, fps=30)
run = "NA"
else: else:
# TODO: support more file formats # TODO: support more file formats
continue continue
# downsample the skeleton # downsample the skeleton
if isinstance(data, dict): if isinstance(data, dict):
for larva in data: for larva in data:
data[larva] = np.vstack([get_5point_spines(spine) for spine in data[larva]]) data[larva] = get_5point_spines(data[larva])
else: else:
data = get_5point_spines(data) data = get_5point_spines(data)
# load the model # load the model
......
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