File tree Expand file tree Collapse file tree 4 files changed +41
-1
lines changed
Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 33Observes [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) standard and
44[ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) convention.
55
6+ ## [ 0.3.3] - TBD
7+
8+ + Add - Plotting with ` deeplabcut.utils.plotting.PlottingResults `
9+
610## [ 0.3.2] - 2024-09-09
711
812+ Fix - Save config file to output directory as ` dj_dlc_config `
Original file line number Diff line number Diff line change 1+ def plotting_results (pose_estimation_key : dict ):
2+ """
3+ Wrapper for deeplabcut.utils.plotting.PlottingResults,
4+ using dlc_result object from `dlc_reader.PoseEstimation`
5+ Args:
6+ pose_estimation_key (dict): PoseEstimation key
7+
8+ Returns:
9+ plots_dir (Path): Path to the folder containing the plots
10+ """
11+ import deeplabcut
12+ from element_deeplabcut import dlc_reader , model
13+
14+ output_dir = (model .PoseEstimationTask & pose_estimation_key ).fetch1 (
15+ "pose_estimation_output_dir"
16+ )
17+ output_dir = model .find_full_path (model .get_dlc_root_data_dir (), output_dir )
18+
19+ dlc_result = dlc_reader .PoseEstimation (output_dir )
20+
21+ plots_dir = output_dir / "plots"
22+ plots_dir .mkdir (exist_ok = True )
23+
24+ deeplabcut .utils .plotting .PlottingResults (
25+ tmpfolder = plots_dir ,
26+ Dataframe = dlc_result .rawdata ,
27+ cfg = dlc_result .yml ,
28+ bodyparts2plot = dlc_result .body_parts .to_list (),
29+ individuals2plot = "" ,
30+ showfigures = False ,
31+ suffix = ".png" ,
32+ resolution = 100 ,
33+ linewidth = 1.0 ,
34+ )
35+
36+ return plots_dir
Original file line number Diff line number Diff line change 22Package metadata
33"""
44
5- __version__ = "0.3.2 "
5+ __version__ = "0.3.3 "
You can’t perform that action at this time.
0 commit comments