Commit Graph

306 Commits

Author SHA1 Message Date
davidpagnon
9925d6d8c8 minor fix for concision 2024-07-13 22:16:33 +02:00
davidpagnon
29e27ce355 minor fixes 2024-07-13 22:05:03 +02:00
David PAGNON
05c4502735
Fixed error when no person association 2024-07-11 11:26:50 +02:00
davidpagnon
75943b90ca minor edits 2024-07-10 14:53:38 +02:00
davidpagnon
e21c763614 minor edits 2024-07-10 14:51:34 +02:00
davidpagnon
b31215c8c0 integration of pose estimation 2024-07-10 10:12:57 +02:00
davidpagnon
bc3cd4fb24 fixed typo 2024-07-09 21:11:32 +02:00
davidpagnon
86f7088b4e option to fill large gaps with nan, last valid value, or zeros 2024-07-09 20:54:18 +02:00
davidpagnon
7a3bcf76be minor edits 2024-07-09 19:19:41 +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
davidpagnon
21a5e7742b small minor edits 2024-06-24 17:21:56 +02:00
David PAGNON
0b745a0a03
Update docstrings of tests.py 2024-06-12 11:34:30 +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
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
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
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
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
davidpagnon
5a484ba6b3 minor changes 2024-04-16 02:33:46 +02:00
davidpagnon
2b02755920 minor changes 2024-04-16 02:28:46 +02:00
davidpagnon
7f6e6a829d Edited Readme and minor stuff 2024-04-15 23:40:01 +02:00
davidpagnon
38eca977ec fixed tests in single-trial mode 2024-04-15 17:11:01 +02:00
davidpagnon
f57b15ce0b Merge branch test 2024-04-15 16:03:44 +02:00
davidpagnon
d1285f3373 Merge branch 'test' 2024-04-15 16:03:07 +02:00
davidpagnon
aff6b836f7 Ready to merge 2024-04-15 15:36:47 +02:00
davidpagnon
139279950b Should be all good 2024-04-15 14:12:14 +02:00
davidpagnon
df99cfcf2b weekend commits 2024-04-15 09:33:55 +02:00
davidpagnon
bd9bbb68ab works both for single trial and batch 2024-04-13 18:42:30 +02:00
David PAGNON
f96b6166b5
Intrinsics not recalculated if overwrite_intrinsics = false 2024-04-12 15:55:00 +02:00
davidpagnon
db676146c9 should finish tomorrow 2024-04-12 01:59:59 +02:00
davidpagnon
88d9ffbfc1 should finish tomorrow 2024-04-12 01:59:32 +02:00
David PAGNON
1b2d0fff95
choose ids of persons to display 2024-04-11 16:33:41 +02:00
Alexandre Naaim
338c95ea27
objp should not be objp_not_used (#91) 2024-04-09 10:04:18 +02:00
davidpagnon
e858dfd2cd choose ids of persons to display 2024-04-04 23:28:43 +02:00
davidpagnon
8075224879 replace nans by empty string in trc for OpenSim compatibility 2024-04-02 13:34:21 +02:00
Alexandre Naaim
71e05dd48d
Process non filtered data if there is no data filtered in folder (#86) 2024-04-02 11:15:48 +02:00
David PAGNON
19efec2723
Faster and more robust multi-person analysis (#85)
* tests synchro

* draft

* further draft

* affinity ok

* proposals okay, need to incorporate in Pose2Sim+tests

* will transfer sorting across frames in triangulation in next commit

* Lasts tests need to be done but seems to work pretty well

* should all work smoothly

* update readme

* last checks

* fixed linting issues

* getting tired of being forgetful
2024-03-31 01:40:38 +01:00
davidpagnon
2bb5bbbc4b a 2024-03-20 14:16:38 +01:00
davidpagnon
c4773faa68 draft synchro 2024-03-19 10:33:07 +01:00
davidpagnon
f4c764f3cb tests synchro 2024-03-16 15:49:40 +01:00
HunMinKim
5ddef52185
Synchronize multi cams based on keypoints speed. (#76) @rlagnsals
@rlagnsals 

* synchronization

* Auto Synchronization

* Auto Synchronization

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Auto Synchronization

* Update synchronize_cams.py

* Auto Synchronization

* Delete Pose2Sim/S00_Demo_Session/Config.toml

* Add files via upload

* Update Config.toml
2024-03-15 20:26:49 +01:00
David PAGNON
ce0abe1929
Faster computation 2024-03-15 10:49:32 +01:00
David PAGNON
ded436e9fe
Merge pull request #78 from ANaaim/minor_correction
Change of the testing of Calib and calib to work properly
2024-03-12 16:40:57 +01:00
davidpagnon
56f55674bf revert to model.predict(outputs) 2024-03-12 16:08:12 +01:00
David PAGNON
7d13dc4d38
test with older tensorflow version
tensorflow<=2.15.0
2024-03-12 15:46:08 +01:00
Anaaim
7e8a93f1a2 Change of the testing of Calib and calib to work properly 2024-03-12 08:39:12 +01:00
David PAGNON
864f89c433
Merge pull request #77 from rlagnsals/patch-1
sort by frame number.
2024-03-06 22:32:18 +01:00
davidpagnon
5347f22d49 alternative to multi-person if not satisfying 2024-03-06 22:26:10 +01:00
davidpagnon
eb80393304 forgot a param 2024-03-06 14:48:31 +01:00
davidpagnon
31ef4d775d small changes to person association 2024-03-06 14:11:56 +01:00
HunMinKim
23cc2119f1
sort by frame number.
Robust performance on long length frames.
2024-03-06 15:36:22 +09:00
davidpagnon
938f2f2ff8 time in hours, minutes, seconds 2024-03-06 00:15:21 +01:00
davidpagnon
c04df78697 added datetime to logs 2024-03-05 02:59:25 +01:00
davidpagnon
3ffd39fe17 fixed error when comparing lists with nana 2024-03-05 01:35:06 +01:00
davidpagnon
66df6bbd7c small improvements on multi-person detection 2024-03-04 18:46:56 +01:00
davidpagnon
757673d01c get augmenterDir from site-packages 2024-03-01 09:59:55 +01:00
davidpagnon
4b8bf88c6f decreased likelihood threshold since weighted triangulation 2024-03-01 03:59:06 +01:00
davidpagnon
f7021be051 save images with right ratio 2024-03-01 03:56:10 +01:00
David PAGNON
80802c9226
catch interpolation error 2024-02-29 12:55:32 +01:00
davidpagnon
cd5fe2852a All should be good. 2024-02-29 03:10:23 +01:00
davidpagnon
5eec8ab6c2 delete demo results 2024-02-28 16:44:46 +01:00
davidpagnon
a948c205cf multi-person analysis almost there 2024-02-28 16:28:09 +01:00
davidpagnon
fdd521674f unclamp hip and knee 2024-02-27 22:13:56 +01:00
davidpagnon
e9fc09bc2f output type needs to be specified 2024-02-27 21:43:02 +01:00
Anaaim
cfac8af647 Clear keras session to avoid time increase when doing batch processing 2024-02-27 17:41:03 +01:00
davidpagnon
9438152ae0 multi-person analysis is almost there 2024-02-27 13:48:30 +01:00
davidpagnon
cc27642468 biocv extension is now .calib 2024-02-27 11:36:56 +01:00
davidpagnon
05ffe7f36f multi-person frame of work works with single person 2024-02-26 18:13:39 +01:00
davidpagnon
6220c1baa1 fixed only one frame reprojected 2024-02-26 14:57:52 +01:00
davidpagnon
607865e3d4 beta: multi-person 2024-02-23 18:16:56 +01:00
David PAGNON
1f7b752232
Demo folder name change 2024-02-20 21:06:24 +01:00
davidpagnon
7b11028d4c Changed demo folder name 2024-02-20 21:02:34 +01:00
davidpagnon
1c2fc6d9d1 minor script changes 2024-02-20 17:21:47 +01:00
David PAGNON
ecd39ff943
Check for consistent camera number 2024-02-19 13:30:27 +01:00
David PAGNON
f9b236a6cd
Check for consistent camera number 2024-02-19 13:28:23 +01:00
David PAGNON
02e786e55b
typo 2024-02-19 13:26:54 +01:00
David PAGNON
128730a334
Check for consistent camera number 2024-02-19 13:13:33 +01:00
David PAGNON
57d009e4f6
BODY_25 Neck index error 2024-02-16 01:29:51 +01:00
davidpagnon
1f9a179758 DEMO -> Demo 2024-02-09 12:36:41 +01:00
David PAGNON
449ce87fb7
foolproofing broke something -> fixed 2024-02-09 12:18:57 +01:00
David PAGNON
02d2c5c56f
Update reproj_from_trc_calib.py 2024-02-09 00:47:39 +01:00
davidpagnon
6eeaef6445 change version 2024-02-05 17:49:10 +01:00
davidpagnon
f57f72522f Added videos and Blender add-on 2024-02-05 12:59:03 +01:00
davidpagnon
1548953bbc careless push had overwritten previous changes 2024-02-05 11:55:21 +01:00
davidpagnon
db145942de careless push had overwritten previous changes 2024-02-05 11:51:26 +01:00
davidpagnon
a4d38da980 Added videos and foolproofing stuff 2024-02-05 00:04:36 +01:00
davidpagnon
e4c68e1c72 start calib names at 0 2024-02-01 10:42:58 +01:00
davidpagnon
bd453fcb58 replace .dot by @ 2024-01-25 11:02:58 +01:00
davidpagnon
070692afaf change RT2qca function -> world_to_camera_persp 2024-01-25 10:53:28 +01:00