I have produced a new boolean column in the pandas dataframe (dlc2 output from analyze_videos) that indicates when a behavior is present. I would like to add a rectangle in the upper right corner of the labeled video that changes color depending on the absence or presence of the behavior during that frame. This will provide me with a customized labeled video that will facilitate debugging and adjusting my pipeline. I think this might be a desirable thing to have for other people also.
Since It is just another column in the pandas dataframe I guess one solution is to use the option save_frames of create_labeled_video and then run a piece of matplotlib code that will make the rectangle in all frames, and then produce the video (as suggested by the documentation). But I was wondering if there is a simpler and faster way to do it.
Maybe create_labeled_video can be modified in a future version to include the possibility of passing some code that will be plotted? If this is possible, please give me any idea on how to accomplish this. Also I will be grateful for any other recommendation or workaround.