From 4cb83cb0d44258928ab9343e35c8c6cd59fd79fb Mon Sep 17 00:00:00 2001 From: Jessy Lauer <30733203+jeylau@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:32:28 +0200 Subject: [PATCH 1/9] Stricter search of analyzed data --- deeplabcut/utils/auxiliaryfunctions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deeplabcut/utils/auxiliaryfunctions.py b/deeplabcut/utils/auxiliaryfunctions.py index 2770404e14..dd1bd5ca0c 100644 --- a/deeplabcut/utils/auxiliaryfunctions.py +++ b/deeplabcut/utils/auxiliaryfunctions.py @@ -722,6 +722,7 @@ def find_analyzed_data(folder, videoname, scorer, filtered=False, track_method=" candidates = [] for file in grab_files_in_folder(folder, "h5"): + stem = Path(file).stem if all( ( ( @@ -729,7 +730,7 @@ def find_analyzed_data(folder, videoname, scorer, filtered=False, track_method=" or file.startswith(videoname + scorer_legacy) ), "skeleton" not in file, - (tracker in file if tracker else not ("_sk" in file or "_bx" in file)), + (stem.endswith(tracker) if tracker else not (stem.endswith("_sk") or stem.endswith("_bx"))), (filtered and "filtered" in file) or (not filtered and "filtered" not in file), ) From 2fcc141bdf40595d60e0b6a3e7395330633332e2 Mon Sep 17 00:00:00 2001 From: Jessy Lauer <30733203+jeylau@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:32:45 +0200 Subject: [PATCH 2/9] Edit data file suffix --- deeplabcut/refine_training_dataset/stitch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deeplabcut/refine_training_dataset/stitch.py b/deeplabcut/refine_training_dataset/stitch.py index 1d449a30cd..7c0e18d649 100644 --- a/deeplabcut/refine_training_dataset/stitch.py +++ b/deeplabcut/refine_training_dataset/stitch.py @@ -1177,7 +1177,7 @@ def weight_func(t1, t2): stitcher.stitch() if transformer_checkpoint: stitcher.write_tracks( - output_name=output_name, animal_names=animal_names, suffix="transformer" + output_name=output_name, animal_names=animal_names, suffix="tr" ) else: stitcher.write_tracks( From 0de6c132eec7632dadddce8b995c7db92363e16f Mon Sep 17 00:00:00 2001 From: Jessy Lauer <30733203+jeylau@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:57:31 +0200 Subject: [PATCH 3/9] Clarify logic to find analyzed data --- deeplabcut/utils/auxiliaryfunctions.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/deeplabcut/utils/auxiliaryfunctions.py b/deeplabcut/utils/auxiliaryfunctions.py index dd1bd5ca0c..2a6bc02e65 100644 --- a/deeplabcut/utils/auxiliaryfunctions.py +++ b/deeplabcut/utils/auxiliaryfunctions.py @@ -723,14 +723,19 @@ def find_analyzed_data(folder, videoname, scorer, filtered=False, track_method=" candidates = [] for file in grab_files_in_folder(folder, "h5"): stem = Path(file).stem + starts_by_scorer = ( + file.startswith(videoname + scorer) + or file.startswith(videoname + scorer_legacy) + ) + if tracker: + matches_tracker = stem.endswith(tracker) + else: + matches_tracker = not any(stem.endswith(s) for s in TRACK_METHODS.values()) if all( ( - ( - file.startswith(videoname + scorer) - or file.startswith(videoname + scorer_legacy) - ), + starts_by_scorer, "skeleton" not in file, - (stem.endswith(tracker) if tracker else not (stem.endswith("_sk") or stem.endswith("_bx"))), + matches_tracker, (filtered and "filtered" in file) or (not filtered and "filtered" not in file), ) From eddfd9cd584c9cb912782343b955e3a76fcb6e79 Mon Sep 17 00:00:00 2001 From: AlexEMG Date: Tue, 12 Apr 2022 11:27:50 +0200 Subject: [PATCH 4/9] we're pythonic --- deeplabcut/create_project/modelzoo.py | 6 +++--- .../multiple_individuals_trainingsetmanipulation.py | 2 +- .../trainingsetmanipulation.py | 2 +- deeplabcut/gui/analyze_videos.py | 2 +- deeplabcut/gui/evaluate_network.py | 2 +- deeplabcut/gui/refine_tracklets.py | 2 +- deeplabcut/gui/train_network.py | 4 ++-- deeplabcut/pose_estimation_tensorflow/core/evaluate.py | 10 +++++----- .../core/evaluate_multianimal.py | 4 ++-- deeplabcut/pose_estimation_tensorflow/export.py | 2 +- .../pose_estimation_tensorflow/predict_videos.py | 8 ++++---- deeplabcut/pose_estimation_tensorflow/training.py | 4 ++-- deeplabcut/pose_estimation_tensorflow/visualizemaps.py | 8 ++++---- deeplabcut/utils/auxiliaryfunctions.py | 8 ++++---- 14 files changed, 32 insertions(+), 32 deletions(-) diff --git a/deeplabcut/create_project/modelzoo.py b/deeplabcut/create_project/modelzoo.py index 7fdd5ccd1f..e623b62e8e 100644 --- a/deeplabcut/create_project/modelzoo.py +++ b/deeplabcut/create_project/modelzoo.py @@ -219,7 +219,7 @@ def create_pretrained_project( os.path.join( config["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction=config["TrainingFraction"][0], shuffle=1, cfg=config, @@ -232,7 +232,7 @@ def create_pretrained_project( os.path.join( config["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction=config["TrainingFraction"][0], shuffle=1, cfg=config, @@ -246,7 +246,7 @@ def create_pretrained_project( train_dir.mkdir(parents=True, exist_ok=True) test_dir.mkdir(parents=True, exist_ok=True) - modelfoldername = auxiliaryfunctions.GetModelFolder( + modelfoldername = auxiliaryfunctions.get_model_folder( trainFraction=config["TrainingFraction"][0], shuffle=1, cfg=config ) path_train_config = str( diff --git a/deeplabcut/generate_training_dataset/multiple_individuals_trainingsetmanipulation.py b/deeplabcut/generate_training_dataset/multiple_individuals_trainingsetmanipulation.py index eb50f0349a..55618586c8 100755 --- a/deeplabcut/generate_training_dataset/multiple_individuals_trainingsetmanipulation.py +++ b/deeplabcut/generate_training_dataset/multiple_individuals_trainingsetmanipulation.py @@ -357,7 +357,7 @@ def create_multianimaltraining_dataset( # Test files as well as pose_yaml files (containing training and testing information) ################################################################################# - modelfoldername = auxiliaryfunctions.GetModelFolder( + modelfoldername = auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg ) auxiliaryfunctions.attempttomakefolder( diff --git a/deeplabcut/generate_training_dataset/trainingsetmanipulation.py b/deeplabcut/generate_training_dataset/trainingsetmanipulation.py index bdcd48b20f..f8990b1c70 100755 --- a/deeplabcut/generate_training_dataset/trainingsetmanipulation.py +++ b/deeplabcut/generate_training_dataset/trainingsetmanipulation.py @@ -956,7 +956,7 @@ def create_training_dataset( # Creating file structure for training & # Test files as well as pose_yaml files (containing training and testing information) ################################################################################# - modelfoldername = auxiliaryfunctions.GetModelFolder( + modelfoldername = auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg ) auxiliaryfunctions.attempttomakefolder( diff --git a/deeplabcut/gui/analyze_videos.py b/deeplabcut/gui/analyze_videos.py index 1ad19e9440..9746e2d73f 100644 --- a/deeplabcut/gui/analyze_videos.py +++ b/deeplabcut/gui/analyze_videos.py @@ -391,7 +391,7 @@ def edit_inf_config(self, event): #trainFraction = cfg["TrainingFraction"][trainingsetindex] self.inf_cfg_path = os.path.join( cfg["project_path"], - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, self.shuffle.GetValue(), cfg ), "test", diff --git a/deeplabcut/gui/evaluate_network.py b/deeplabcut/gui/evaluate_network.py index 30a495be3f..031f4ed433 100644 --- a/deeplabcut/gui/evaluate_network.py +++ b/deeplabcut/gui/evaluate_network.py @@ -233,7 +233,7 @@ def edit_inf_config(self, event): trainFraction = cfg["TrainingFraction"] self.inf_cfg_path = os.path.join( cfg["project_path"], - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction[-1], self.shuffles.GetValue(), cfg ), "test", diff --git a/deeplabcut/gui/refine_tracklets.py b/deeplabcut/gui/refine_tracklets.py index 4ef77b47b8..ddc8b1b6bd 100644 --- a/deeplabcut/gui/refine_tracklets.py +++ b/deeplabcut/gui/refine_tracklets.py @@ -227,7 +227,7 @@ def edit_inf_config(self, event): trainFraction = self.cfg["TrainingFraction"] self.inf_cfg_path = os.path.join( self.cfg["project_path"], - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction[-1], self.shuffle.GetValue(), self.cfg ), "test", diff --git a/deeplabcut/gui/train_network.py b/deeplabcut/gui/train_network.py index b2214560b6..ca1e69a40b 100644 --- a/deeplabcut/gui/train_network.py +++ b/deeplabcut/gui/train_network.py @@ -247,10 +247,10 @@ def edit_pose_config(self, event): cfg = auxiliaryfunctions.read_config(self.config) trainFraction = cfg["TrainingFraction"] #print(trainFraction[-1]) - # print(os.path.join(cfg['project_path'],auxiliaryfunctions.GetModelFolder(trainFraction, self.shuffles.GetValue(),cfg),'train','pose_cfg.yaml')) + # print(os.path.join(cfg['project_path'],auxiliaryfunctions.get_model_folder(trainFraction, self.shuffles.GetValue(),cfg),'train','pose_cfg.yaml')) self.pose_cfg_path = os.path.join( cfg["project_path"], - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction[-1], self.shuffles.GetValue(), cfg ), "train", diff --git a/deeplabcut/pose_estimation_tensorflow/core/evaluate.py b/deeplabcut/pose_estimation_tensorflow/core/evaluate.py index 325df04728..2851f7e389 100644 --- a/deeplabcut/pose_estimation_tensorflow/core/evaluate.py +++ b/deeplabcut/pose_estimation_tensorflow/core/evaluate.py @@ -85,7 +85,7 @@ def calculatepafdistancebounds( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -288,7 +288,7 @@ def return_evaluate_network_data( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -334,7 +334,7 @@ def return_evaluate_network_data( evaluationfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetEvaluationFolder( + auxiliaryfunctions.get_evaluation_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -649,7 +649,7 @@ def evaluate_network( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -681,7 +681,7 @@ def evaluate_network( evaluationfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetEvaluationFolder( + auxiliaryfunctions.get_evaluation_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), diff --git a/deeplabcut/pose_estimation_tensorflow/core/evaluate_multianimal.py b/deeplabcut/pose_estimation_tensorflow/core/evaluate_multianimal.py index 9c1edf127e..d327690f48 100644 --- a/deeplabcut/pose_estimation_tensorflow/core/evaluate_multianimal.py +++ b/deeplabcut/pose_estimation_tensorflow/core/evaluate_multianimal.py @@ -175,7 +175,7 @@ def evaluate_multianimal_full( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -218,7 +218,7 @@ def evaluate_multianimal_full( evaluationfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetEvaluationFolder( + auxiliaryfunctions.get_evaluation_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), diff --git a/deeplabcut/pose_estimation_tensorflow/export.py b/deeplabcut/pose_estimation_tensorflow/export.py index de6f096acf..6ba3ea8b39 100644 --- a/deeplabcut/pose_estimation_tensorflow/export.py +++ b/deeplabcut/pose_estimation_tensorflow/export.py @@ -114,7 +114,7 @@ def load_model(cfg, shuffle=1, trainingsetindex=0, TFGPUinference=True, modelpre model_folder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( train_fraction, shuffle, cfg, modelprefix=modelprefix ) ), diff --git a/deeplabcut/pose_estimation_tensorflow/predict_videos.py b/deeplabcut/pose_estimation_tensorflow/predict_videos.py index 910d07057b..a6391ffb23 100644 --- a/deeplabcut/pose_estimation_tensorflow/predict_videos.py +++ b/deeplabcut/pose_estimation_tensorflow/predict_videos.py @@ -99,7 +99,7 @@ def create_tracking_dataset( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -426,7 +426,7 @@ def analyze_videos( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -1233,7 +1233,7 @@ def analyze_time_lapse_frames( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -1584,7 +1584,7 @@ def convert_detections2tracklets( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), diff --git a/deeplabcut/pose_estimation_tensorflow/training.py b/deeplabcut/pose_estimation_tensorflow/training.py index be3a3b6202..7998c6fdcb 100644 --- a/deeplabcut/pose_estimation_tensorflow/training.py +++ b/deeplabcut/pose_estimation_tensorflow/training.py @@ -30,7 +30,7 @@ def return_train_network_path(config, shuffle=1, trainingsetindex=0, modelprefix from deeplabcut.utils import auxiliaryfunctions cfg = auxiliaryfunctions.read_config(config) - modelfoldername = auxiliaryfunctions.GetModelFolder( + modelfoldername = auxiliaryfunctions.get_model_folder( cfg["TrainingFraction"][trainingsetindex], shuffle, cfg, modelprefix=modelprefix ) trainposeconfigfile = Path( @@ -130,7 +130,7 @@ def train_network( # Read file path for pose_config file. >> pass it on cfg = auxiliaryfunctions.read_config(config) - modelfoldername = auxiliaryfunctions.GetModelFolder( + modelfoldername = auxiliaryfunctions.get_model_folder( cfg["TrainingFraction"][trainingsetindex], shuffle, cfg, modelprefix=modelprefix ) poseconfigfile = Path( diff --git a/deeplabcut/pose_estimation_tensorflow/visualizemaps.py b/deeplabcut/pose_estimation_tensorflow/visualizemaps.py index b51e7c69e7..fb3f2da9e8 100644 --- a/deeplabcut/pose_estimation_tensorflow/visualizemaps.py +++ b/deeplabcut/pose_estimation_tensorflow/visualizemaps.py @@ -120,7 +120,7 @@ def extract_maps( modelfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetModelFolder( + auxiliaryfunctions.get_model_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -150,7 +150,7 @@ def extract_maps( evaluationfolder = os.path.join( cfg["project_path"], str( - auxiliaryfunctions.GetEvaluationFolder( + auxiliaryfunctions.get_evaluation_folder( trainFraction, shuffle, cfg, modelprefix=modelprefix ) ), @@ -419,7 +419,7 @@ def extract_save_all_maps( from deeplabcut.utils.auxiliaryfunctions import ( read_config, attempttomakefolder, - GetEvaluationFolder, + get_evaluation_folder, IntersectionofBodyPartsandOnesGivenbyUser, ) from tqdm import tqdm @@ -438,7 +438,7 @@ def extract_save_all_maps( if not dest_folder: dest_folder = os.path.join( cfg["project_path"], - str(GetEvaluationFolder(frac, shuffle, cfg, modelprefix=modelprefix)), + str(get_evaluation_folder(frac, shuffle, cfg, modelprefix=modelprefix)), "maps", ) attempttomakefolder(dest_folder) diff --git a/deeplabcut/utils/auxiliaryfunctions.py b/deeplabcut/utils/auxiliaryfunctions.py index 2a6bc02e65..0d1bbb1f1d 100644 --- a/deeplabcut/utils/auxiliaryfunctions.py +++ b/deeplabcut/utils/auxiliaryfunctions.py @@ -469,7 +469,7 @@ def GetDataandMetaDataFilenames(trainingsetfolder, trainFraction, shuffle, cfg): return datafn, metadatafn -def GetModelFolder(trainFraction, shuffle, cfg, modelprefix=""): +def get_model_folder(trainFraction, shuffle, cfg, modelprefix=""): Task = cfg["Task"] date = cfg["date"] iterate = "iteration-" + str(cfg["iteration"]) @@ -486,7 +486,7 @@ def GetModelFolder(trainFraction, shuffle, cfg, modelprefix=""): ) -def GetEvaluationFolder(trainFraction, shuffle, cfg, modelprefix=""): +def get_evaluation_folder(trainFraction, shuffle, cfg, modelprefix=""): Task = cfg["Task"] date = cfg["date"] iterate = "iteration-" + str(cfg["iteration"]) @@ -569,7 +569,7 @@ def GetScorerName( modelfolder = os.path.join( cfg["project_path"], - str(GetModelFolder(trainFraction, shuffle, cfg, modelprefix=modelprefix)), + str(get_model_folder(trainFraction, shuffle, cfg, modelprefix=modelprefix)), "train", ) Snapshots = np.array( @@ -583,7 +583,7 @@ def GetScorerName( dlc_cfg = read_plainconfig( os.path.join( cfg["project_path"], - str(GetModelFolder(trainFraction, shuffle, cfg, modelprefix=modelprefix)), + str(get_model_folder(trainFraction, shuffle, cfg, modelprefix=modelprefix)), "train", "pose_cfg.yaml", ) From 8476ce1a5f92294c6cf1dbf69d01203d867fad92 Mon Sep 17 00:00:00 2001 From: AlexEMG Date: Tue, 12 Apr 2022 15:33:28 +0200 Subject: [PATCH 5/9] adding unit-test --- deeplabcut/utils/auxiliaryfunctions.py | 6 ++++ tests/test_auxiliaryfunctions.py | 38 ++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/deeplabcut/utils/auxiliaryfunctions.py b/deeplabcut/utils/auxiliaryfunctions.py index add1eb9ee3..7e389f017f 100644 --- a/deeplabcut/utils/auxiliaryfunctions.py +++ b/deeplabcut/utils/auxiliaryfunctions.py @@ -723,6 +723,8 @@ def find_analyzed_data(folder, videoname, scorer, filtered=False, track_method=" candidates = [] for file in grab_files_in_folder(folder, "h5"): + + stem = Path(file).stem starts_by_scorer = ( file.startswith(videoname + scorer) @@ -742,6 +744,10 @@ def find_analyzed_data(folder, videoname, scorer, filtered=False, track_method=" ) ): candidates.append(file) + + print(scorer, scorer_legacy,'scorer',tracker) + print(starts_by_scorer,matches_tracker) + print(file,candidates,stem) if not len(candidates): msg = ( f'No {"un" if not filtered else ""}filtered data file found in {folder} ' diff --git a/tests/test_auxiliaryfunctions.py b/tests/test_auxiliaryfunctions.py index 9689770cd4..b24777e028 100644 --- a/tests/test_auxiliaryfunctions.py +++ b/tests/test_auxiliaryfunctions.py @@ -2,6 +2,40 @@ from deeplabcut.utils.auxfun_videos import SUPPORTED_VIDEOS +def test_find_analyzed_data(tmpdir_factory): + import os + import pytest + + fake_folder = tmpdir_factory.mktemp('videos') + SUPPORTED_VIDEOS=['avi'] + n_ext = len(SUPPORTED_VIDEOS) + + SCORER = 'DLC_dlcrnetms5_multi_mouseApr11shuffle1_5' + WRONG_SCORER = 'DLC_dlcrnetms5_multi_mouseApr11shuffle3_5' + + def _create_fake_file(filename): + path = str(fake_folder.join(filename)) + with open(path, "w") as f: + f.write("") + return path + + for ind, ext in enumerate(SUPPORTED_VIDEOS): + vname="video"+str(ind) + _ = _create_fake_file(vname+'.'+ext) + _ = _create_fake_file(vname+SCORER+".pickle") + _ = _create_fake_file(vname+SCORER+".h5") + + for ind, ext in enumerate(SUPPORTED_VIDEOS): + # test if existing models are found: + assert auxiliaryfunctions.find_analyzed_data(fake_folder, "video"+str(ind), SCORER) + + # Test if nonexisting models are not found + with pytest.raises(FileNotFoundError): + auxiliaryfunctions.find_analyzed_data(fake_folder, "video"+str(ind), WRONG_SCORER) + + with pytest.raises(FileNotFoundError): + auxiliaryfunctions.find_analyzed_data(fake_folder, "video"+str(ind), SCORER,filtered=True) + def test_get_list_of_videos(tmpdir_factory): fake_folder = tmpdir_factory.mktemp('videos') n_ext = len(SUPPORTED_VIDEOS) @@ -16,11 +50,11 @@ def _create_fake_file(filename): for ext in SUPPORTED_VIDEOS: path = _create_fake_file(f"fake.{ext}") fake_videos.append(path) - + # Add some other office files: path = _create_fake_file("fake.xls") path = _create_fake_file("fake.pptx") - + # Add a .pickle and .h5 files _ = _create_fake_file("fake.pickle") _ = _create_fake_file("fake.h5") From b3209f5bfb4cf724856af3b75c19f3b4a9fd255e Mon Sep 17 00:00:00 2001 From: AlexEMG Date: Tue, 12 Apr 2022 15:35:13 +0200 Subject: [PATCH 6/9] typos --- deeplabcut/utils/auxiliaryfunctions.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/deeplabcut/utils/auxiliaryfunctions.py b/deeplabcut/utils/auxiliaryfunctions.py index 7e389f017f..e4c4c41794 100644 --- a/deeplabcut/utils/auxiliaryfunctions.py +++ b/deeplabcut/utils/auxiliaryfunctions.py @@ -745,9 +745,6 @@ def find_analyzed_data(folder, videoname, scorer, filtered=False, track_method=" ): candidates.append(file) - print(scorer, scorer_legacy,'scorer',tracker) - print(starts_by_scorer,matches_tracker) - print(file,candidates,stem) if not len(candidates): msg = ( f'No {"un" if not filtered else ""}filtered data file found in {folder} ' From 18a035be9d515694d9550aecb4e63cb4301f87cd Mon Sep 17 00:00:00 2001 From: AlexEMG Date: Tue, 12 Apr 2022 15:45:56 +0200 Subject: [PATCH 7/9] 2.2.1 --- deeplabcut/version.py | 2 +- examples/test.sh | 2 +- examples/testM1.sh | 2 +- examples/testscript_transreid.py | 2 +- reinstall.sh | 2 +- setup.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deeplabcut/version.py b/deeplabcut/version.py index 6f837de355..dc3e52f597 100644 --- a/deeplabcut/version.py +++ b/deeplabcut/version.py @@ -8,5 +8,5 @@ Licensed under GNU Lesser General Public License v3.0 """ -__version__ = "2.2.1rc1" +__version__ = "2.2.1" VERSION = __version__ diff --git a/examples/test.sh b/examples/test.sh index 0f1ebf4396..f707f18fa2 100755 --- a/examples/test.sh +++ b/examples/test.sh @@ -6,7 +6,7 @@ rm -r OUT cd .. pip uninstall deeplabcut python3 setup.py sdist bdist_wheel -pip install dist/deeplabcut-2.2.1rc1-py3-none-any.whl +pip install dist/deeplabcut-2.2.1-py3-none-any.whl cd examples diff --git a/examples/testM1.sh b/examples/testM1.sh index e24769b54d..c6ab3fefb5 100755 --- a/examples/testM1.sh +++ b/examples/testM1.sh @@ -10,7 +10,7 @@ rm -r OUT cd .. pip uninstall deeplabcut pythonw setup.py sdist bdist_wheel -pip install dist/deeplabcut-2.2.1rc1-py3-none-any.whl +pip install dist/deeplabcut-2.2.1-py3-none-any.whl # download: https://drive.google.com/file/d/17pSwfoNuyf3YR8vCaVggHeI-pMQ3xL7l/view?usp=sharing # assuming it's in Downloads... diff --git a/examples/testscript_transreid.py b/examples/testscript_transreid.py index 9ba151c9c5..28cfdadcd7 100644 --- a/examples/testscript_transreid.py +++ b/examples/testscript_transreid.py @@ -122,7 +122,7 @@ assert all(len(pickledata[i]["joints"]) == 3 for i in range(num_images)) print("Editing pose config...") - model_folder = auxiliaryfunctions.GetModelFolder( + model_folder = auxiliaryfunctions.get_model_folder( TRAIN_SIZE, 1, cfg, cfg["project_path"] ) pose_config_path = os.path.join(model_folder, "train", "pose_cfg.yaml") diff --git a/reinstall.sh b/reinstall.sh index 8e734542c7..a8d875554a 100755 --- a/reinstall.sh +++ b/reinstall.sh @@ -1,3 +1,3 @@ pip uninstall deeplabcut python3 setup.py sdist bdist_wheel -pip install dist/deeplabcut-2.2.1rc1-py3-none-any.whl +pip install dist/deeplabcut-2.2.1-py3-none-any.whl diff --git a/setup.py b/setup.py index ce56791a4a..2c93f7e89a 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setuptools.setup( name="deeplabcut", - version="2.2.1rc1", + version="2.2.1", author="A. & M. Mathis Labs", author_email="alexander@deeplabcut.org", description="Markerless pose-estimation of user-defined features with deep learning", From 61403d8af379d408fcfa84f6a8783cd106f07e46 Mon Sep 17 00:00:00 2001 From: AlexEMG Date: Tue, 12 Apr 2022 15:47:17 +0200 Subject: [PATCH 8/9] typos --- examples/testscript_multianimal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/testscript_multianimal.py b/examples/testscript_multianimal.py index f243c77247..e864e33b0c 100644 --- a/examples/testscript_multianimal.py +++ b/examples/testscript_multianimal.py @@ -120,7 +120,7 @@ assert all(len(pickledata[i]["image"]) == 3 for i in range(num_images)) print("Editing pose config...") - model_folder = auxiliaryfunctions.GetModelFolder( + model_folder = auxiliaryfunctions.get_model_folder( TRAIN_SIZE, 1, cfg, cfg["project_path"] ) pose_config_path = os.path.join(model_folder, "train", "pose_cfg.yaml") From 87403c6fbad4f50d80e3fb7a729a26ee20322d0b Mon Sep 17 00:00:00 2001 From: AlexEMG Date: Tue, 12 Apr 2022 15:52:50 +0200 Subject: [PATCH 9/9] removed torch --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 2c93f7e89a..6d02c1cf99 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,6 @@ "tensorpack>=0.11", "tf_slim>=1.1.0", "tqdm", - "torch", "pyyaml", "Pillow>=7.1", ],