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

A user-friendly GUI (beta version) #149

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Conversation

AYLARDJ
Copy link

@AYLARDJ AYLARDJ commented Nov 18, 2024

Edit by @davidpagnon (copy-pasted from an email from @AYLARDJ )

We are thrilled to share with you the first version of our Pose2Sim GUI. We focused on making it user-friendly, with error prevention and clear user feedback at every step.

First, here are the requirements:

python>=3.8
customtkinter>=5.2.0
opencv-python>=4.5.0
numpy>=1.21.0
pillow>=9.0.0
matplotlib>=3.4.0
tomlkit>=0.11.0.

We designed the interface to be easy to use, with automated checks and helpful messages throughout the entire workflow. Here's what users will experience:

  • Initial Setup
    The GUI starts with language selection (i'm adding French as soon as possible) and participant. If users forget to input a name it automatically generates "Participant" floder. For batch processing, it guides users through trial number selection with validation.

  • Calibration
    This stage includes validation for camera numbers (minimum 2, with appropriate warnings about accuracy). Whether using manual calibration or converting from external systems, it walks users through each step, making it more easy.

  • Video Preparation
    The interface handles many technical details like format checking in tomel, storage verification, and frame extraction, keeping users informed with progress updates. This in case users have other images in checkerboard videos, (which can be confusing sometimes when calibration is lunched in Pose2Sim)

  • Pose Estimation
    Handles multiple or single pose estimation.

  • Synchronization
    Users can costumize synchronization options including keypoints selection.

  • Advanced Configuration
    All other settings which can be used by experienced users are in this tab.

  • Activation
    The interface generate codes for Powershell, CMD and Anaconda making it supporting multiple launch methods

Throughout the process, users see:

Progress bars

  • Clear success/error messages
  • Helpful tips and recommendations

I'd really appreciate if you could test it thoroughly, and report me any errors. While this first version makes using Pose2Sim more easy, we see several areas for improving in the futur, for example (less pop-ups, better design, and better messages). I'll keep working on that whenever i have time.

@davidpagnon
Copy link
Collaborator

Hi @AYLARDJ ,

As I said in the last email, I'm thrilled to see this become reality!
I just edited your first message to copy-paste the content of your email.

Quick message before I test anything,

  • Could you write a simple "how-to" paragraph to tell us how to use it?
  • Do you need tomlkit specifically? If not, could you use toml instead so that it is compliant with the requirements of Pose2SIm? And if so, we need to entirely switch Pose2Sim to tomlkit instead. If you have time to do it that's great, otherwise I'll do it!
  • Out of curiosity, how did you determine the minimum version for the required libraries?

@AYLARDJ
Copy link
Author

AYLARDJ commented Nov 19, 2024

Hello @davidpagnon
I'm very happy to hear that, I'll start by answering your questions :
2. I created this beta version of the GUI as a tool to help users configure Pose2Sim more easily and to prevent common errors that many inexperienced users encounter. The goal was to streamline the process and ensure the correct structures are generated. As part of this, it automatically generates the config.toml file. I'll do my best to change the tomlkit to toml soon.

  1. Regarding the libraries, I want to thank Dr. M BLANDEAU, who tested the GUI. Some errors were related to packaging, as certain functions were no longer supported. I'll definitely keep an eye on this issue for the next version!
    Here how to use the GUI :
    Launch Python GUI.py
    Once you launch the application, you'll see two options: English or French. Pick your language (currently only English is supported)
    Next, you'll be prompted to enter a participant name, which will also be used as the folder name.
    image

Next, select the process : a single trial (choose "Single") or Multiple trials at once (choose "Batch")
image

If you pick Batch, just enter how many trials you want to process - super useful when you have multiple recordings with same cameras!

The Main Interface

You'll see several tabs at the top of the window, and there's progress bar at the top that shows how far along you are. Each tab has a dot:
Empty means you still need to complete that section
Filled means you're done with that section

Tab 1: Calibration Configuration

image

You have two choices:
Option 1: Calculate (If you're starting fresh)
Enter how many cameras you used (you need at least 2)
Put in your checkerboard details (width, height,)
Put your video format (like mp4 or jpg)
you'll see a preview of your checkerboard pattern! if you don't have any, you can just save it, print it and then use it :)
Option 2: Convert (If you have existing calibration)
Just pick your system type (like Qualisys or Vicon)
Import your file - super simple!

Tab 2: Prepare Video

This will help you to prepare the videos for Pose2Sim calibration, you'll have to choose between two options:
image

"Yes" if your videos only show the checkerboard
"No" if you need to extract frames
If you pick "No":
Set how often you want to grab frames (like every 1 second), and keep the images format to "png"
You'll get a nice preview window where you can keep or delete frames. Check ✓ the ones you want to keep (checkerboard only), then delete the rest

Tab 3: Pose Estimation

image
You can choose :
Single person tracking
Multiple person tracking
For single person:
Just enter height and weight
For multiple people:
Enter how many people you're tracking
Add details for each person
Then pick:
Your pose model (stick with HALPE_26 - only supported, i'll try to add OpenPose later!)
Processing mode:
Lightweight (faster but less accurate)
Balanced (good middle ground)
Performance (super accurate but slower)
Click Proceed and select the video files for each camera (make sure to follow the same order as the calibration cameras). For batch processing, after you select the videos for the first trial, the application will prompt you to select the videos for the second trial, and so on.

Tab 4: Synchronization

image
Got videos that aren't synced? No problem!
If they're already synced, just click "Yes" to skip
If not, click "No" and you can:
Choose which body points to track for synchronization (select a segment that performed a fast movement). If you're unsure, select all (slower processing)
You can choose Auto Timing (slower) or set your own timing manually (faster) for the "fast" movement at each camera.
Adjust any sync parameters as needed. The pre-configured parameters should work well for most cases.

Tab 5: Activation

image

You should be ready to use Pose2Sim by now, you can choose
CMD
Anaconda Prompt
PowerShell
Pick the one you installed - they all work the same!

Tab 6: Advanced Configuration

This is like the "power user" tab! You can edit:
Frame rates
Processing settings
Filtering options
Marker augmentations and so on
Don't worry too much about this tab if you're just starting - the default settings work great!

For batch processing, you can set different settings for each trial. A tab will appear for that.

Tips for users

Progress Tracking: watch the progress bar and indicators.
Verify input parameters
Ensure all videos are in the correct format
Remember: Take your time with the configuration process. Accurate setup leads to better results! Good luck with your motion capture analysis! 🎉
Note: This GUI is currently in beta. Regular improvements and updates are being made to enhance user experience, please report bugs or any recommendations.

@davidpagnon
Copy link
Collaborator

Thanks for the extensive answer! Will test that soon :)

@davidpagnon davidpagnon merged commit fa27b32 into perfanalytics:Gui Dec 6, 2024
davidpagnon pushed a commit that referenced this pull request Dec 6, 2024
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

Successfully merging this pull request may close these issues.

2 participants