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

HELP NEEDED - WANT TO CONTRIBUTE? #40

Open
davidpagnon opened this issue Oct 27, 2023 · 19 comments
Open

HELP NEEDED - WANT TO CONTRIBUTE? #40

davidpagnon opened this issue Oct 27, 2023 · 19 comments
Labels
enhancement New feature or request

Comments

@davidpagnon
Copy link
Collaborator

davidpagnon commented Oct 27, 2023

Dear all,

I am now doing a relatively unrelated post-doc, and am working on Pose2Sim only on the side. There are tons of features that I think could be useful, and that I cannot find time to implement. If anyone wants to contribute, I'll be more than happy to oblige!

The list is at the end of the Readme file, but I'll put it here for the sake of clarity.

MAIN PROJECTS:
☑ Blender visualizer add-on
☑ Batch processing
☑ Multiple persons triangulation
☑ Synchronization
▢ Graphical User Interface
▢ Self-calibration based on keypoint detection
▢ Video tutorials, documentation on github.io
▢ Calibration of moving cameras

I have a clear idea of how to do each of these, so if you are not sure of the details or are not sure whether you can use or develop the skills, I can definitely tell you more about it! Here is an invite to a Discord server if you are interested in discussing it (no commitment at this stage 😛).

If you want to modify the code, please please follow this guide on how to fork, modify, and push code, and submit a pull request. I would appreciate it if you provided as much useful information as possible about how you modified the code, and a rationale for why you're making this pull request. Please also specify on which operating system and on which Python version you have tested the code.

@davidpagnon davidpagnon added the enhancement New feature or request label Oct 27, 2023
@davidpagnon
Copy link
Collaborator Author

davidpagnon commented Oct 27, 2023

DETAILED TO-DO LIST:

GUI:
▢ Simple tkinter interface (or Kivy if we want something nice and portable, or Google Colab, maybe Streamlit). Maybe have a look at the Deeplabcut GUI for inspiration. See Sports2D Demo for OpenPose and Python package installation on Google Drive).
Simply load, edit, and save Config.toml files. Only display relevant options (e.g., do not display options for calculating calibration if conversion is chosen).
▢ App or webapp (e.g., with Napari ).

Tutorials and Documentation:
▢ Make video tutorials.
▢ Several documentation pages would be clearer. Use Sphinx, MkDocs, or (maybe better) github.io.

Pose:
▢ Support MMPose, SLEAP, etc.
▢ Integrate pose estimation within Pose2Sim (via MMPose).
▢ Directly reading from DeepLabCut .csv or .h5 files instead of converting to .json (triangulation, person association, calibration, synchronization...)
▢ GUI help for DeepLabCut model creation.

Calibration:
▢ Calibration of moving cameras: Once object points have been detected or clicked once, track them. Propose to click again when they are lost.
▢ Calibrate cameras by pairs and compute average extrinsic calibration with aniposelib.
▢ Alternatively, self-calibrate with OpenPose keypoints. Set world reference frame in the end.
▢ Calculate calibration with points rather than board. (1) SBA calibration with wand (cf Argus, see converter here). Set world reference frame in the end.
▢ Convert fSpy calibration calibration.

Triangulation:
▢ Solve limb swapping. Try triangulating with opposite side if reprojection error too large (favored approach). Alternatively, ignore right and left sides, use RANSAC or SDS triangulation, and then choose right or left by majority voting. More confidence can be given to cameras whose plane is the most coplanar to the right/left line.
Undistort 2D points before triangulating (and distort them before computing reprojection error). See draft L468 in triangulation.py.
▢ Pre-compile weighted_triangulation and reprojection with @jit(nopython=True, parallel=True) for faster execution.
▢ Track hands and face (won't be taken into account in OpenSim at this stage).

Filtering:
▢ Implement SmoothNet

OpenSim:
▢ Integrate OpenSim in Pose2Sim.
▢ Do not require a separate scaling trial: scale on the 10 slowest frames of the moving trial instead.
▢ OpenSim: Implement optimal fixed-interval Kalman smoothing for inverse kinematics (this OpenSim fork), or Biorbd)

Others:
▢ Run pose estimation and OpenSim from within Pose2Sim
▢ Real-time: Run Pose estimation, Person association, Triangulation, Kalman filter, IK frame by frame (instead of running each step for all frames)
▢ Catch errors: try to make the code bug, and give a clear error message
▢ Conda package
▢ Docker image
▢ Run from command line via click or typer
▢ Utilities: Export other data from c3d files into .mot or .sto files (angles, powers, forces, moments, GRF, EMG...)
▢ Utilities: Create trc_to_c3d.py script

Bugs:
▢ common.py, class plotWindow(). Python crashes after a few runs of Pose2Sim.filtering() when display_figures=true. See superjax/plotWindow#7.

@hunminkim98
Copy link
Contributor

Hi, I'm an avid user of pose2sim.
I look forward to new updates every day thanks to your amazing work.
I would like to be of help to you, but I am not a very good developer, so I think I can help you with things like making tutorial videos.
I'm really excited to see your to-do list!

@carlosedubarreto
Copy link

thats a great todo list.
Pos2Sim was essential to make MPP2SOS to work, and I would like to give something back, helping to improve the tool.
The main problem I have now is also lack of time.

Some huge things happened in my life (like I had to move 4 times in less than 2 years and because of that and some other things I have basically no emergency funds, so I'm having to work my ass off to pay the debts)

the problem is that getting rid of those problems will take months.
but I'll keep following this topic, to be able to do something as soon as the moment comes.

thanks a lot for the project and for trying to make it even better.

I'm sure, with the help of others, it will go a long way and also help a lot of people!!!

@ANaaim
Copy link
Contributor

ANaaim commented Oct 30, 2023

Might be able to help :) As suggested above, your pipeline help our lab setting our marker-less pipeline so would be good to help you too. Not sure if i would be the best for the core of the code, however as a good an end user I might to some stuff on tutorial or element for easing the use of the tool-box.

@davidpagnon
Copy link
Collaborator Author

davidpagnon commented Nov 1, 2023

Hi everyone, I'm pleasantly surprised that anyone responded at all, thank you!

@rlagnsals, A tutorial would be great!
Other things that do not require extensive coding skills would be to try and make the code bug, and tell me when the error message is not clear so that I can raise a specific message.
I haven't looked much into it, but hosting the documentation to github.io may not be too complicated. Not sure about this though.

@carlosedubarreto, I don't know the details but your life does sound crazy, and I'm amazed at the way you're involved in so many other projects already! Good luck with everything, and let me know if things calm down a little.

@ANaaim That would be awesome! I feel like a relatively important and easy step would be to make a GUI. It does not have to be beautiful, I'm just thinking of a tkinter window with the exact same info as in the Config.toml file, but presented with tabs for each steps, and drop-down menus for each parameter. I guess it would be nice to be able to import or export a Config.toml file directly from the interface, too.
And I also see that you suggested changing skeletons.py to skeletons.toml, in order to access them more easily. If you are up for doing this, I would also greatly appreciate it!

@davidpagnon davidpagnon pinned this issue Nov 1, 2023
@hunminkim98
Copy link
Contributor

hunminkim98 commented Nov 4, 2023

@davidpagnon I'm eager to contribute to your project and bring value to Pose2Sim!
I'm currently in the process of creating a tutorial video. Additionally, I've been dedicating my efforts to code camera calibration using OpenPose keypoints for contribute. However, I've faced challenges during the joint optimization process. Initially, it diverged instead of converging and subsequently got stuck in a local optimum. This was unexpected, especially since I adhered to the methodology presented in the paper.😱

BY the way, could you guide me on how I can specifically communicate with you and collaboratively work on various projects to make meaningful contributions?

@davidpagnon
Copy link
Collaborator Author

davidpagnon commented Nov 4, 2023

@rlagnsals This would be awesome!
I put "calibration on OpenPose keypoints" low on the list of priorities because it would take me too long to dive in the subject, but if you already started, it could go back up on the bucket list!

Github is a good place for people to talk about how one would like to contribute, but you're right that once that step is passed, we should use another platform to exchange more in-depth. I don't know, I'm on all platforms (WhatsApp, Signal, Telegram, and others), but Teams or Discord may be best. I'm afraid I don't have the skills or time to set up a Discord server, so unless someone wants to do it, Teams may be the most convenient.

Here is an invite for people who may be interested in contributing: https://teams.live.com/l/community/FEAWpdmXJDNT5TA3AI
Edit: moved away from Teams to Discord: https://discord.gg/RpUeuhFN

@davidpagnon
Copy link
Collaborator Author

@carlosedubarreto @rlagnsals @ANaaim
I told you I would keep you informed when it is done, there is now a new version that allows for automatic batch processing :)
More information about it here: https://github.com/perfanalytics/pose2sim?tab=readme-ov-file#batch-processing

Don't hesitate to tell me if there is anything you think should be done differently!
Next project will be (whenever I find time) to handle limb swapping, and to look more in depth into the calibration based on keypoints that @rlagnsals has been working on. And then all the rest :D

@davidpagnon
Copy link
Collaborator Author

Blender add-on now released!

Pose2Sim.Blender.mp4

@timungereth
Copy link

Dear @davidpagnon thank you for your amazing work. I just found your work some weeks ago and noticed that we were on the exact same path and that you already did a lot of stuff we planned to do. I think we can help to further develop pose2sim, probably starting with a GUI since we want to start using markerless motion capture within a clinic.
Please do not hesitate to send me an email, so we could kick this off (tim.unger@llui.org). I will have a student working on this from next week on.
Best, Tim

@davidpagnon
Copy link
Collaborator Author

davidpagnon commented Feb 7, 2024

Hi Tim,
Thank you for your appreciation and your help!
Some people from the Université de Valenciennes are also into improving the user-experience: they are starting with conducting interviews with non-specialists (clinicians and coaches), and planned to build a GUI accordingly. It would be best not to make both of your works redundant, but there is probably space for other people working on it!
If you desire, here is a link to the Discord discussion about it: https://discord.com/invite/4mXUdSFjmt

@timungereth

This comment was marked as resolved.

@davidpagnon

This comment was marked as resolved.

@timungereth

This comment was marked as resolved.

@carlosedubarreto

This comment was marked as resolved.

@davidpagnon

This comment was marked as resolved.

@davidpagnon
Copy link
Collaborator Author

Multi-person analysis is now supported!

Sorting people across view, and then across frames.
Set [project] multi_person = true for each trial that contains multiple persons.
Set [triangulation] reorder_trc = true if you need to run OpenSim and match the generated .trc files with the static trials.
Make sure that the order of [markerAugmentation] participant_height and participant_mass matches the order of the static trials.

Feel free to test it and tell me if anything does not go as expected.

@davidpagnon
Copy link
Collaborator Author

Multiperson analysis much faster now: as fast as easymocap, and more robust results.
A challenging test scene used to take 1h30 to be processed, it is now under 2 minutes.

@davidpagnon
Copy link
Collaborator Author

Thanks to all the people who have boosted the project lately!

  • Automatic synchronization is now available (thanks @hunminkim98 for working on it with me)
  • Non-batch processing is possible for quick analysis

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

No branches or pull requests

5 participants