Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not rotate the video during Sklearn Visualization #214

Closed
chongtianyifa opened this issue Nov 9, 2022 · 5 comments
Closed

do not rotate the video during Sklearn Visualization #214

chongtianyifa opened this issue Nov 9, 2022 · 5 comments

Comments

@chongtianyifa
Copy link

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
Copy link
Collaborator

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.

cv2.putText(self.frame, str('Ensemble prediction'), (10, (self.video_meta_data['height'] - self.video_meta_data['height']) + self.spacing_scale * self.add_spacer), self.font, self.font_scale, (0, 255, 0), 2)

@chongtianyifa
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

chongtianyifa commented Nov 9, 2022

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
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants