sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
289 stars 141 forks source link

do not rotate the video during Sklearn Visualization #214

Closed chongtianyifa closed 1 year ago

chongtianyifa commented 1 year ago

Hi,

Thank you for the wonderful tool for behavior analysis. In my case, the mice were head-fixed. Therefore, the best way to visualize the result is to keep the view angle. However, it seems that the video was rotated 90 degrees anticlockwise. image Is there a way to keep the view angle in the Sklearn Visualization step? Meanwhile, I found that the font is too small or blurry to discern sometimes. It would be better if we can set the font size.

Thanks, Lei

sronilsson commented 1 year ago

Hi @chongtianyifa! Someone else just pointed this out. If you update SimBA with pip install simba-uw-tf-dev --upgrade, you should see the checkbox with red underline in the screengrab in image linked below. To not rotate the video, leave this checkbox unchecked before creating video.

https://files.gitter.im/5de95babd73408ce4fd337a5/3iPz/rotate_90.png

The thickness of the font is too high for your resolution which makes it blurry, it is hard coded to 2 and can't currently be set in the GUI, but if you wait a few days I will make option available.. If you want to change it before, it's the final 2 in e.g., this line of code, maybe change it to a 1.

https://github.com/sgoldenlab/simba/blob/2f1a4c9f3a7a60e904f54dc0a510323feb867be4/simba/sklearn_plot_scripts/plot_sklearn_results_all.py#L144

chongtianyifa commented 1 year ago

Hi,

Thank you for the quick response. I cannot use the upgrade solution as I failed many times to install the tensor flow version. I am using simba-uw-no-tf. image I did not see plot_sklearn_results_all.py function here. Which one should I modify?

Lei

sronilsson commented 1 year ago

Hi @chongtianyifa - I have not maintained simba-uw-no-tf for some years, would you mind switching to pip install simba-uw-tf-dev? You could do pip uninstall simba-uw-no-tf followed by pip install simba-uw-tf-dev and you should be able to open your project as normal but let me know if not.

chongtianyifa commented 1 year ago

I still couldn't install the tf-dev version. Here is how I install it: 1) create a new virtual environment conda create --name simba-tf python=3.6 and activate it. 2) pip install simba-uw-tf-dev 3) after call 'simba', error came out image 4) then pip uninstall shapely and conda install -c conda-forge shapely. It failed: image

chongtianyifa commented 1 year ago

Hi, I actually tried pip uninstall shapely and then pip install shapely. It worked! Now I see the choice not to rotate the video. Thank you!