Commit Graph

56 Commits

Author SHA1 Message Date
davidpagnon
344b299fb3 fixed calibration if board and show=false 2024-11-03 21:41:43 +01:00
davidpagnon
89d68bca90 missed an update to be done in calibration.py 2024-09-22 23:28:33 +02:00
davidpagnon
169a0348c8 next attempt at debugging 2024-07-30 17:17:42 +02:00
davidpagnon
48f169dfdb include Batch Demo folder + minor edits 2024-07-30 16:13:42 +02:00
davidpagnon
b31215c8c0 integration of pose estimation 2024-07-10 10:12:57 +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
davidpagnon
ebc9dca365 replaced imgp==[] with len(imgp)=0 2024-06-09 12:44:03 +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
f96b6166b5
Intrinsics not recalculated if overwrite_intrinsics = false 2024-04-12 15:55:00 +02:00
Alexandre Naaim
338c95ea27
objp should not be objp_not_used (#91) 2024-04-09 10:04:18 +02:00
davidpagnon
56f55674bf revert to model.predict(outputs) 2024-03-12 16:08:12 +01:00
davidpagnon
66df6bbd7c small improvements on multi-person detection 2024-03-04 18:46:56 +01:00
davidpagnon
cc27642468 biocv extension is now .calib 2024-02-27 11:36:56 +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
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
David PAGNON
cd5c565cab
Alphabetically sort calibration files to be converted 2024-01-24 17:21:04 +01:00
Anaaim
0af7b2c1a4 Correction in list comprehension to allow the second term to be consider 2024-01-18 11:48:55 +01:00
davidpagnon
9f8f40d413 undistortion applied to calibration and personAssociation too 2024-01-04 14:19:08 +01:00
David PAGNON
4167e672f9
extrinsic calibration recap fix 2023-12-19 18:00:01 +01:00
davidpagnon
167cd52f37 calibration ok 2023-12-08 11:21:48 +01:00
davidpagnon
96b1d59351 daily commit 2023-12-08 09:39:34 +01:00
davidpagnon
7652d271ff draft for batch processing 2023-12-06 09:48:11 +01:00
David PAGNON
29e83c803d
Fix non-video camera filtering in Vicon calibration 2023-11-22 11:40:56 +01:00
davidpagnon
0515c81988 fix vicon calibration 2023-11-17 23:36:34 +01:00
David PAGNON
28108493f2
Merge pull request #49 from ANaaim/Full_change_image_for_pointing
Full change of the image if pointing necessary
2023-11-12 09:25:01 +01:00
David PAGNON
4d375d9117
Merge pull request #52 from ANaaim/Correct_name_intrinsic_calib
Correct the name of the camera during intrinsics calibration using checkerboard
2023-11-11 11:44:20 +01:00
Anaaim
20c1d5ac8d True name of camera instead of a simple indices 2023-11-10 16:18:39 +01:00
Anaaim
b669a41e6c Full change of the image if pointing necessary 2023-11-08 11:09:32 +01:00
Anaaim
1a8dd214e6 Correction mm to m inside the code 2023-11-08 10:38:07 +01:00
Anaaim
ed0ae4b18a Correction of the position of obj to be able to run extrinsic correction 2023-11-07 15:34:14 +01:00
davidpagnon
c53553d8a3 only display the outer corners in findCorners 2023-11-07 13:35:43 +01:00
davidpagnon
475f7df0fa Fixed error message in calibration @ANaaim 2023-11-07 13:14:08 +01:00
Anaaim
b2486f79d6 Correction of try and except due to behavior of cv2.imread 2023-11-06 17:56:01 +01:00
davidpagnon
fe147dee82 caught calibration errors and raised clear message 2023-11-01 13:19:32 +01:00
davidpagnon
1e4a40b097 added intrinsic error feedback & solved bug when window closed 2023-10-10 13:35:57 +02:00
davidpagnon
4bd5106acb convert easymocap calibration files 2023-09-22 11:41:36 +02:00
davidpagnon
afed272759 support opencap and biocv calibration 2023-09-21 14:33:17 +02:00
davidpagnon
f3cff42d5c solved bug when last point hidden 2023-09-20 15:32:10 +02:00
davidpagnon
26e74bf320 solved error when closing window 2023-09-12 00:10:50 +02:00
davidpagnon
aacd2eef92 solve issue when video for extrinsics 2023-09-10 00:29:24 +02:00
davidpagnon
81f69c0c27 Same behavior when closing window as when n or q 2023-08-21 03:16:03 +02:00
davidpagnon
ef4bf7962e solved order of import for tests to work 2023-08-21 02:20:38 +02:00
davidpagnon
e6b5b93de5 b 2023-08-21 02:16:27 +02:00
davidpagnon
d819c09594 ready to merge 2023-08-21 01:03:01 +02:00