|
2 | 2 | A tool providing multi-animal tracking capabilities on top of other Deep learning based tracking software. |
3 | 3 | """ |
4 | 4 |
|
5 | | -__version__ = "0.4.0" |
| 5 | +__version__ = "0.4.1" |
6 | 6 |
|
7 | 7 | import warnings |
8 | 8 |
|
9 | 9 | # Can be used by functions to determine if diplomat was invoked through it's CLI interface. |
10 | 10 | CLI_RUN = False |
11 | 11 |
|
12 | | -from diplomat.predictor_ops import ( |
13 | | - list_predictor_plugins, |
14 | | - get_predictor_settings, |
15 | | - test_predictor_plugin, |
16 | | -) |
17 | | -from diplomat.frontend_ops import list_all_frontends, list_loaded_frontends |
18 | | -from diplomat.utils.video_splitter import split_videos |
19 | 12 | from diplomat.core_ops import ( |
20 | | - track_with, |
| 13 | + annotate, |
| 14 | + convert_tracks, |
| 15 | + interact, |
21 | 16 | track, |
22 | 17 | track_and_interact, |
23 | | - annotate, |
| 18 | + track_with, |
24 | 19 | tweak, |
| 20 | + update_ui_state, |
25 | 21 | yaml, |
26 | | - interact, |
27 | | - convert_tracks, |
28 | | - update_ui_state |
29 | 22 | ) |
| 23 | +from diplomat.frontend_ops import list_all_frontends, list_loaded_frontends |
| 24 | +from diplomat.predictor_ops import ( |
| 25 | + get_predictor_settings, |
| 26 | + list_predictor_plugins, |
| 27 | + test_predictor_plugin, |
| 28 | +) |
| 29 | +from diplomat.utils.video_splitter import split_videos |
30 | 30 |
|
31 | 31 | __all__ = [ |
32 | 32 | "list_predictor_plugins", |
|
43 | 43 | "yaml", |
44 | 44 | "interact", |
45 | 45 | "convert_tracks", |
46 | | - "update_ui_state" |
| 46 | + "update_ui_state", |
47 | 47 | ] |
48 | 48 |
|
| 49 | + |
49 | 50 | # Attempt to load all frontends, putting their public functions into submodules of diplomat. |
50 | 51 | def _load_frontends(): |
| 52 | + from multiprocessing import current_process |
| 53 | + from types import ModuleType |
| 54 | + |
51 | 55 | from diplomat import frontends |
52 | 56 | from diplomat.frontends import DIPLOMATFrontend |
53 | | - from diplomat.utils.pluginloader import load_plugin_classes |
54 | 57 | from diplomat.utils._function_tools import replace_function_name_and_module |
55 | | - from types import ModuleType |
56 | | - from multiprocessing import current_process |
| 58 | + from diplomat.utils.pluginloader import load_plugin_classes |
57 | 59 |
|
58 | 60 | if current_process().name != "MainProcess": |
59 | 61 | # If something in this package is using multiprocessing, disable the automatic frontend loading code. |
|
0 commit comments