Gantt plots

Multiprocess creation of classifier gantt charts in video and/or image format.

[2]:
from simba.plotting.gantt_creator_mp import GanttCreatorMultiprocess
[9]:
# DEFINITIONS
CONFIG_PATH = '/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/project_config.ini'
STYLE_ATTRIBUTES = {'width': 640,
                    'height': 480,
                    'font size': 12,
                    'font rotation': 45} # Attributes of gannt chart (size, font size, font rotation etc).
FRAME_SETTING = False # If True, creates individual frames.
VIDEO_SETTING = True # If True, creates videos
LAST_FRAME_SETTING = True # If True, creates single .png image representing entire video.
CORES = 5 # Number of cores to use.
DATA_PATHS = ['/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/csv/machine_results/Together_1.csv'] # File paths representing files with machine predictions.
[10]:
gantt_creator = GanttCreatorMultiprocess(config_path=CONFIG_PATH,
                                         frame_setting=FRAME_SETTING,
                                         video_setting=VIDEO_SETTING,
                                         last_frm_setting=LAST_FRAME_SETTING,
                                         style_attr=STYLE_ATTRIBUTES,
                                         cores=CORES,
                                         files_found=DATA_PATHS)
gantt_creator.run()

Processing 1 video(s)...
Processing video Together_1, Frame count: 1738 (Video 1/1)...
SIMBA COMPLETE: Final gantt frame for video Together_1 saved at /Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/frames/output/gantt_plots/Together_1_final_image.png (elapsed time: 0.0967s)    complete
Creating gantt, multiprocessing (chunksize: 1, cores: 5)...
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: 1.7143s)      complete
Gantt video Together_1 complete (elapsed time: 26.7731s) ...
SIMBA COMPLETE: Gantt visualizations for 1 videos created in project_folder/frames/output/gantt_plots directory (elapsed time: 26.7921s)        complete
[ ]: