Commit Graph

815 Commits

Author SHA1 Message Date
davidpagnon
7a3bcf76be minor edits 2024-07-09 19:19:41 +02:00
davidpagnon
86e3936a50 pose estimation support 2024-07-09 16:47:42 +02:00
davidpagnon
2551d479f9 pose estimation release 2024-07-09 16:46:35 +02:00
David PAGNON
b2fe4f7ba3
Pose estimation test (#116)
Edits from @hunminkim98's awesome work at integrating pose estimation into Pose2Sim with RTMLib. Most of the changes in syntax are not necessarily better, it is mostly for the code to be more consistent with the rest of the library. Thank you again for your fantastic work!

General:
- Automatically detects whether a valid CUDA install is available. If so, use the GPU with the ONNXRuntime backend. Otherwise, use the CPU with the OpenVINO backend
- The tensorflow version used for marker augmentation was incompatible with the cuda torch installation for pose estimation: edited code and models for it to work with the latest tf version.
- Added logging information to pose estimation
- Readme.md: provided an installation procedure for CUDA (took me a while to find something simple and robust)
- Readme.md: added information about PoseEstimation with RTMLib
- added poseEstimation to tests.py
- created videos for the multi-person case (used to only have json, no video), and reorganized Demo folders. Had to recreate calibration file as well

Json files:
- the json files only saved one person, I made it save all the detected ones
- tracking was not taken into account by rtmlib, which caused issues in synchronization: fixed, waiting for merge
- took the save_to_openpose function out from the main function
- minified the json files (they take less space when all spaces are removed)

Detection results:
- Compared the triangulated locations of RTMpose keypoints to the ones of OpenPose to potentially edit model marker locations on OpenSim. Did not seem to need it.

Others in Config.toml:
- removed the "to_openpose" option, which is not needed
- added the flag: save_video = 'to_images' # 'to_video' or 'to_images' or ['to_video', 'to_images']
- changed the way frame_range was handled (made me change synchronization in depth, as well as personAssociation and triangulation)
- added the flag: time_range_around_maxspeed in synchronization
- automatically detect framerate from video, or set to 60 fps if we work from images (or give a value)
- frame_range -> time_range
- moved height and weight to project (only read for markerAugmentation, and in the future for automatic scaling)
- removed reorder_trc from triangulation and Config -> call it for markerAugmentation instead

Others:
- Provided an installation procedure for OpenSim (for the future) and made continuous installation check its install (a bit harder since it cannot be installed via pip)
- scaling from motion instead of static pose (will have to study whether it's as good or not)
- added logging to synchronization
- Struggled quite a bit with continuous integration


* Starting point of integrating RTMPose into Pose2Sim. (#111)

* RTM_to_Open

Convert format from RTMPose to OpenPose

* rtm_intergrated

* rtm_integrated

* rtm_integrated

* rtm_integrated

* rtm

* Delete build/lib/Pose2Sim directory

* rtm

* Delete build/lib/Pose2Sim directory

* Delete onnxruntime-gpu

* device = cpu

* add pose folder

* Update tests.py

* added annotation

* fix typo

* Should work be still lots of tests to run. Detailed commit coming soon

* intermediary commit

* last checks before v0.9.0

* Update continuous-integration.yml

* Update tests.py

* replaced tabs with spaces

* unittest issue

* unittest typo

* deactivated display for CI test of pose detection

* Try to make continuous integration work

* a

* b

* c

* d

* e

* f

* g

* h

* i

* j

* k

* l

---------

Co-authored-by: HunMinKim <144449115+hunminkim98@users.noreply.github.com>
2024-07-09 16:39:33 +02:00
David PAGNON
f287b0e5b4
Conda install with OpenSim should work
Insha'llah
God willing
Dieu voulant
2024-06-30 16:53:32 +02:00
David PAGNON
1c74616f7d
Cleaned up conda install with opensim 2024-06-30 16:47:26 +02:00
David PAGNON
4ce440d342
forgot -n pose2sim in conda install opensim 2024-06-30 16:42:25 +02:00
David PAGNON
1525924a82
I am okay 2024-06-30 16:38:12 +02:00
David PAGNON
861f36c368
Trying again 2024-06-30 16:34:46 +02:00
David PAGNON
bb538455f7
Update continuous-integration.yml 2024-06-30 16:17:23 +02:00
David PAGNON
69e2918ecb
remove python install as is installed from conda 2024-06-30 16:09:22 +02:00
David PAGNON
a7e5f4aa6d
opensim not found on conda fix 2024-06-30 16:00:39 +02:00
David PAGNON
3338fe5c4f
Test opensim install (need conda env) 2024-06-30 15:57:15 +02:00
davidpagnon
21a5e7742b small minor edits 2024-06-24 17:21:56 +02:00
David PAGNON
d277f13e99
Calib.io corner number != Opencv count 2024-06-20 16:29:19 +02:00
David PAGNON
5da03add0f
Calib.io website to generate a good checkerboard 2024-06-20 08:52:47 +02:00
David PAGNON
2347bb679b
Solution to OpenPose models not available anymore 2024-06-14 11:18:55 +02:00
David PAGNON
cba40c83bb
planning for direct integration of pose estimation and opensim 2024-06-14 11:15:15 +02:00
David PAGNON
0b745a0a03
Update docstrings of tests.py 2024-06-12 11:34:30 +02:00
David PAGNON
c02c5d1769
Update CITATION.cff 2024-06-10 21:49:49 +02:00
davidpagnon
ebc9dca365 replaced imgp==[] with len(imgp)=0 2024-06-09 12:44:03 +02:00
davidpagnon
ac078342c8 fixed all nan slice issue 2024-06-09 12:29:02 +02:00
davidpagnon
cd66285690 does not try to augment more trc than len(participant_mass) 2024-06-09 12:05:42 +02:00
davidpagnon
34781a855a marker augmentation works when no neck nor midhip data 2024-06-08 17:42:42 +02:00
davidpagnon
f64a8b3591 bump to v0.8.4 2024-06-08 16:21:08 +02:00
davidpagnon
28c6e95047 added files for calculated calibration in Single trial demo 2024-06-08 16:20:33 +02:00
davidpagnon
d5a759fb77 solve "all nan slice encountered" in euclidian distance 2024-06-08 16:15:04 +02:00
davidpagnon
62e5e73262 update model with SKEL markers 2024-06-08 16:14:05 +02:00
davidpagnon
cab870efe8 much faster analysis 2024-06-07 14:11:19 +02:00
davidpagnon
f474838ff8 Merge branch 'main' of https://github.com/perfanalytics/pose2sim 2024-05-13 11:27:56 +02:00
David PAGNON
aaad2a8991
Update setup.cfg 2024-04-26 23:56:16 +02:00
David PAGNON
3935210d41
Update setup.cfg 2024-04-26 23:54:21 +02:00
David PAGNON
53aea43a43
Update README.md 2024-04-26 23:51:32 +02:00
David PAGNON
a765eae689
Update README.md 2024-04-26 23:34:47 +02:00
davidpagnon
6cee2078c1 only consider directories when looking for calib_dir 2024-04-26 23:15:34 +02:00
davidpagnon
de14598a42 replace non interpolated values by last valid value; change lxml version; fixed interpolation message 2024-04-26 23:07:48 +02:00
davidpagnon
9a60007a5a forgot an os.listdir -> could not find calib when run from trial + version update 2024-04-26 22:06:03 +02:00
David PAGNON
aaa56985e1
Update README.md 2024-04-26 11:35:53 +02:00
David PAGNON
66e3492e32
Add to to-do list
&#9634; **Pose:** Integrate pose estimation within Pose2Sim (via MMPose).

&#9634; **Triangulation:** If the gap is larger than the interpolation threshold, fill it with previous frames instead of leaving it blank. 

&#9634; **OpenSim:** Integrate OpenSim in Pose2Sim.
&#9634; **OpenSim:** Do not require a separate scaling trial: scale on the 10 slowest frames of the moving trial instead.
2024-04-26 11:25:23 +02:00
davidpagnon
14a4c15fb5 Merge branch 'main' of https://github.com/perfanalytics/pose2sim 2024-04-23 22:46:20 +02:00
davidpagnon
fb191d8a59 added screen axis for c3d so that import possible in blender 2024-04-23 22:46:10 +02:00
David PAGNON
e1cfc22b13
better sorting of json files 2024-04-20 23:12:50 +02:00
David PAGNON
1be1145b1b
Update README.md 2024-04-18 01:49:07 +02:00
David PAGNON
442683a63a
Update README.md 2024-04-17 10:10:55 +02:00
David PAGNON
3a9d405cae
forgot a debugging thing
L181: frame_by_frame_dist += [euclidean_distance(Q_kpt_old[comb[0]][:3],Q_kpt[comb[1]][:3])]
--> removed the [:3]
2024-04-17 09:41:58 +02:00
davidpagnon
db8014c3f5 few changes to the conversion to c3d 2024-04-16 17:28:37 +02:00
HunMinKim
46652a8eaa
Save to c3d and convert trc to c3d (#92)
* make c3d
2024-04-16 11:14:25 +02:00
David PAGNON
99a36f0d9b
Update README.md 2024-04-16 11:02:10 +02:00
davidpagnon
5a484ba6b3 minor changes 2024-04-16 02:33:46 +02:00
davidpagnon
2b02755920 minor changes 2024-04-16 02:28:46 +02:00