Classification results

Plot classification results overlays on videos. Results are stored in the project_folder/frames/output/sklearn_results directory of the SimBA project.

[1]:
from simba.plotting.plot_clf_results_mp import PlotSklearnResultsMultiProcess
/Users/simon/opt/anaconda3/envs/Python_3.6/lib/python3.6/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.classification module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
  warnings.warn(message, FutureWarning)
[2]:
# DEFINITIONS
CONFIG_PATH = '/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/project_config.ini'
VIDEO_SETTING = True # If True, mp4 videos
FRAME_SETTING = False # If True, creates individual .png images.
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
SHOW_TIMERS = True #If False, then show no classification time aggregate overlays
ROTATE = False #If true, rotates video 90 degrees.
TEXT_ATTRIBUTES = False #If dict, then user-defined font, spacing and circle sizes etc. If False, then autocompute.
CORES = 5
[3]:
plotter = PlotSklearnResultsMultiProcess(config_path=CONFIG_PATH,
                                       video_setting=VIDEO_SETTING,
                                       frame_setting=FRAME_SETTING,
                                       video_file_path=VIDEO_PATH,
                                       print_timers=SHOW_TIMERS,
                                       rotate=ROTATE,
                                       text_settings=TEXT_ATTRIBUTES,
                                        cores=CORES)

plotter.run()
Processing 1 video...
Image 348/1738, Video 1/1...
Image 696/1738, Video 1/1...
Image 1044/1738, Video 1/1...
Image 1392/1738, Video 1/1...
Image 1740/1738, Video 1/1...
Joining Together_1 multiprocessed video...
SIMBA COMPLETE: Video concatenated (elapsed time: 9.1994s)      complete
Video Together_1 complete (elapsed time: 24.8047s)...
SIMBA COMPLETE: 1 videos saved in project_folder/frames/output/sklearn_results directory (elapsed time: 24.9345s)       complete
[ ]: