Skip to content
This repository was archived by the owner on Apr 24, 2026. It is now read-only.

Circle ROIs, ROIs dimension selector and batch processing of videos#22

Open
Snapyou2 wants to merge 7 commits into
PolarBean:masterfrom
Snapyou2:add-circle-roi-batch
Open

Circle ROIs, ROIs dimension selector and batch processing of videos#22
Snapyou2 wants to merge 7 commits into
PolarBean:masterfrom
Snapyou2:add-circle-roi-batch

Conversation

@Snapyou2
Copy link
Copy Markdown

I added the ability to use circles as ROIs, change the size in pixel of the ROIs, and also added a batch function to process multiple videos at once, with support for a different ROI shape for each video

…nction to process a lot of data at once, with support for a different shape for each video
@PolarBean
Copy link
Copy Markdown
Owner

looks good. Some small changes

  • Could you please update the image in the readme to match your updates to the GUI.
  • We should label both dimensions boxes explicitly, i see a label on just one and its not entirely clear what x in this context means.
  • Not entirely neccessary but as i no longer have DLC installed it is hard for me to test this. I think for users as well it might be nice to include some example files that allow them to test the program.

Thank you for your update!

@Snapyou2
Copy link
Copy Markdown
Author

Alright, thanks for feedback. I'll work on these improvements after my exam session, around 2 weeks from now.

@Snapyou2
Copy link
Copy Markdown
Author

I have added your remarks into this PR, everything should be ok (had a lot of troubles with the README formatting haha, but it should be alright now).

@Snapyou2 Snapyou2 force-pushed the add-circle-roi-batch branch from cd5edb5 to b4c0186 Compare June 17, 2025 15:06
@PolarBean
Copy link
Copy Markdown
Owner

great :) I see you've made more commits, let me know when it's ready for me to review and I will.

@PolarBean
Copy link
Copy Markdown
Owner

Would it be possible to include the mp4 you used for drawing the shape? Totally understandable if not!

@PolarBean
Copy link
Copy Markdown
Owner

Also wondering whether you would be interested in pursuing a submission to the Journal of Open Source software? I would be really happy for you to be first author and me last. It may also require a couple more features (Not as part of this pull request). Let me know if this is something you think would be worthwhile :)

@Snapyou2
Copy link
Copy Markdown
Author

I could join the mp4 (maybe not the full one though, it is quite heavy), but I do not know what it would add really to the project except a few megabytes ? Maybe for demonstrative/tutorial purposes ?
And thanks for the journal submission idea but it was just a PR, I won't be able to invest much energy in this project these times. I think all my contributions are done, the last one is just a UI revamp because the workflow was not some clear and I updated the theming and sections of tkinter, it is mostly for aesthetic purposes, feel free to reject it if you do not like it.

@PolarBean
Copy link
Copy Markdown
Owner

I think the aesthetic changes are great. I think the mp4 would be nice for testing the roi drawing functions but its not necessary. I'll review this this week and merge it. Thanks for your efforts!

@PolarBean
Copy link
Copy Markdown
Owner

OK just tried to test without a video and hit an error. I think we need the video to test (a couple seconds is enough).

The steps I took were

  1. create env
  2. launch application
  3. click Load DeepLabCut file.

This results in the error

❯ conda activate ROI_ENV
❯ python ROI_tool.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/harryc/anaconda3/envs/ROI_ENV/lib/python3.8/tkinter/__init__.py", line 1883, in __call__
    return self.func(*args)
  File "ROI_tool.py", line 130, in <lambda>
    self.LoadDeepLabfromFile = ttk.Button(dlc_analysis_frame, text="Load DeepLabCut File", command=lambda: self.posn_tracker.load_deeplab_Coords())
AttributeError: 'Application' object has no attribute 'posn_tracker'

This error may be due to having no video, however this isn't possible in the original DLC ROI Tool as it forces the user to open a video when the program launches. This will require one of two changes.

  1. Force the user to open a video on launch.
  2. Fix the above error so that users can open a DLC file without a video open.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants