Skip to content

Commit

Permalink
plot clf text_attr example
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Jun 3, 2024
1 parent 2b2fcf4 commit 926e4e0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
24 changes: 12 additions & 12 deletions docs/nb/clf_results_plotting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
"source": [
"# DEFINITIONS\n",
"CONFIG_PATH = '/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/project_config.ini'\n",
"VIDEO_SETTING = True # If True, mp4 videos\n",
"VIDEO_SETTING = True # If True, creates mp4 videos\n",
"FRAME_SETTING = False # If True, creates individual .png images.\n",
"VIDEO_PATH = '/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/videos/Together_1.avi' #If None, all videos represented in project_folder/csv/machine_results will be created\n",
"SHOW_TIMERS = True #If False, then show no classification time aggregate overlays\n",
"ROTATE = False #If true, rotates video 90 degrees.\n",
"TEXT_ATTRIBUTES = False #If dict, then user-defined font, spacing and circle sizes etc. If False, then autocompute.\n",
"ROTATE = False #If True, rotates video 90 degrees.\n",
"TEXT_ATTRIBUTES = False #If dict, then user-defined 'circle_size', 'font_size', 'space_size', and 'text_thickness': 2. If False, then autocompute. Example of expected ditionary if not False: text_settings = {'circle_size': 5, 'font_size': 0.528, 'space_size': 28, 'text_thickness': 2}\n",
"CORES = 5"
]
},
Expand Down Expand Up @@ -78,13 +78,13 @@
],
"source": [
"plotter = PlotSklearnResultsMultiProcess(config_path=CONFIG_PATH,\n",
" video_setting=VIDEO_SETTING,\n",
" frame_setting=FRAME_SETTING,\n",
" video_file_path=VIDEO_PATH,\n",
" print_timers=SHOW_TIMERS,\n",
" rotate=ROTATE,\n",
" text_settings=TEXT_ATTRIBUTES,\n",
" cores=CORES)\n",
" video_setting=VIDEO_SETTING,\n",
" frame_setting=FRAME_SETTING,\n",
" video_file_path=VIDEO_PATH,\n",
" print_timers=SHOW_TIMERS,\n",
" rotate=ROTATE,\n",
" text_settings=TEXT_ATTRIBUTES,\n",
" cores=CORES)\n",
"\n",
"plotter.run()"
]
Expand All @@ -100,9 +100,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:Python_3.6]",
"display_name": "simba",
"language": "python",
"name": "conda-env-Python_3.6-py"
"name": "simba"
},
"language_info": {
"codemirror_mode": {
Expand Down
7 changes: 6 additions & 1 deletion simba/plotting/plot_clf_results_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def create_visualizations(self):
height,
)
self.__get_print_settings()
print(self.text_attr)

for model in self.model_dict.values():
self.data_df[model["model_name"] + "_cumsum"] = self.data_df[
Expand Down Expand Up @@ -421,12 +422,16 @@ def run(self):
)



#text_settings = {'circle_scale': 5, 'font_size': 0.528, 'spacing_scale': 28, 'text_thickness': 2}

# clf_plotter = PlotSklearnResultsMultiProcess(config_path='/Users/simon/Desktop/envs/simba/troubleshooting/beepboop174/project_folder/project_config.ini',
# video_setting=True,
# frame_setting=False,
# rotate=False,
# video_file_path='Trial 10.mp4',
# cores=5)
# cores=5,
# text_settings=False)
# clf_plotter.run()


Expand Down

0 comments on commit 926e4e0

Please sign in to comment.