perfanalytics / pose2sim

Markerless kinematics with any cameras — From 2D Pose estimation to 3D OpenSim motion
BSD 3-Clause "New" or "Revised" License
237 stars 44 forks source link

I have meet some problems while attempting to using my own vdieo to preview the results #127

Closed ESJIAN closed 1 week ago

ESJIAN commented 1 month ago

`Exception Traceback (most recent call last) Cell In[6], line 2 1 from Pose2Sim import Pose2Sim ----> 2 Pose2Sim.triangulation()

File D:\Conda_dir\pose2sim\lib\site-packages\Pose2Sim\Pose2Sim.py:375, in triangulation(config) 372 logging.info(f"Project directory: {project_dir}") 373 logging.info("---------------------------------------------------------------------\n") --> 375 triangulate_all(config_dict) 377 end = time.time() 378 elapsed = end-start

File D:\Conda_dir\pose2sim\lib\site-packages\Pose2Sim\triangulation.py:937, in triangulate_all(config_dict) 935 # 936 if nb_persons_to_detect == 0: --> 937 raise Exception('No persons have been triangulated. Please check your calibration and your synchronization, or the triangulation parameters in Config.toml.') 939 # IDs of excluded cameras 940 # id_excluded_cams_tot = [np.concatenate([id_excluded_cams_tot[f][k] for f in range(frames_nb)]) for k in range(keypoints_nb)] 941 id_excluded_cams_tot = [np.hstack(np.hstack(np.array(id_excluded_cams_tot[n]))) for n in range(nb_persons_to_detect)]

Exception: No persons have been triangulated. Please check your calibration and your synchronization, or the triangulation parameters in Config.toml. `

I cant analysis how do this happend ,I thought it may reason about the videos,but i have try the sample videos and still get the same results.. @...@

ESJIAN commented 1 month ago

It happend when i enter

from Pose2Sim import Pose2Sim Pose2Sim.triangulation()

ESJIAN commented 1 month ago

logs.txt Calib_scene.txt

here are relative files

hunminkim98 commented 1 month ago

Hello, I came across your post and I'm replying because this is an issue I've experienced as well. Sometimes, I faced this issue due to following

  1. Not match between calibration result and pose data.
  2. Calibration result is too bad.
  3. Pose data(json) is incorrect.

And I saw your logs.txt and I think this issue from calibration result which is too high reprojection error😢 Also, correlation for camera sync was 0 it is not normal.

Could you confirm that the data you used for calibration and the pose data (JSON) file are correct?

davidpagnon commented 1 month ago

I agree, I think your calibration is not good enough. Did you edit Config.toml with the coordinates of objects in your scene?

ESJIAN commented 1 month ago

屏幕截图 2024-08-14 171217 Just as you said,Calibration result is too bad. camera sync was 0 and it might has relationship with Calibration result?

Hello, I came across your post and I'm replying because this is an issue I've experienced as well. Sometimes, I faced this issue due to following

  1. Not match between calibration result and pose data.
  2. Calibration result is too bad.
  3. Pose data(json) is incorrect.

And I saw your logs.txt and I think this issue from calibration result which is too high reprojection error😢 Also, correlation for camera sync was 0 it is not normal.

Could you confirm that the data you used for calibration and the pose data (JSON) file are correct?

ESJIAN commented 1 month ago

I switch to use board to calibrate the extrinsic parameters and it looks OK from the preview.But still get the also error report like below

Exception                                 Traceback (most recent call last)
Cell In[22], line 2
      1 from Pose2Sim import Pose2Sim
----> 2 Pose2Sim.triangulation()

File D:\Conda_dir\pose2sim_sample\lib\site-packages\Pose2Sim\Pose2Sim.py:374, in triangulation(config)
    371 logging.info(f"Project directory: {project_dir}")
    372 logging.info("---------------------------------------------------------------------\n")
--> 374 triangulate_all(config_dict)
    376 end = time.time()
    377 elapsed = end-start

File D:\Conda_dir\pose2sim_sample\lib\site-packages\Pose2Sim\triangulation.py:937, in triangulate_all(config_dict)
    934 nb_persons_to_detect = len(Q_tot)
    936 if nb_persons_to_detect ==0:
--> 937     raise Exception('No persons have been triangulated. Please check your calibration and your synchronization, or the triangulation parameters in Config.toml.')
    939 # IDs of excluded cameras
    940 # id_excluded_cams_tot = [np.concatenate([id_excluded_cams_tot[f][k] for f in range(frames_nb)]) for k in range(keypoints_nb)]
    941 id_excluded_cams_tot = [np.hstack(np.hstack(np.array(id_excluded_cams_tot[n]))) for n in range(nb_persons_to_detect)]

Exception: No persons have been triangulated. Please check your calibration and your synchronization, or the triangulation parameters in Config.toml.
ESJIAN commented 1 month ago

My purpose is to test the videos from two same cameras, and I try to search the if any others try this project on CN Internet but none...(T ... T) I will keep trying!

ESJIAN commented 1 month ago

Oh, I wonder what files I should upload to give you to analysis the question

davidpagnon commented 1 month ago

It is definitely possible, even if it is not ideal, to use 2 single cameras. Can you send the preview of the extrinsic calibration images?

You may also have an issue with synchronization, it is sometimes good to play with the parameters in the Config file to get good results (or to synchronize by hand)

hunminkim98 commented 1 month ago

屏幕截图 2024-08-14 171217 Just as you said,Calibration result is too bad. camera sync was 0 and it might has relationship with Calibration result?

Hello, I came across your post and I'm replying because this is an issue I've experienced as well. Sometimes, I faced this issue due to following

  1. Not match between calibration result and pose data.
  2. Calibration result is too bad.
  3. Pose data(json) is incorrect.

And I saw your logs.txt and I think this issue from calibration result which is too high reprojection error😢 Also, correlation for camera sync was 0 it is not normal. Could you confirm that the data you used for calibration and the pose data (JSON) file are correct?

The synchronization would be performed with only pose data. So, It is not related to the calibration result!

davidpagnon commented 1 week ago

This issue has been marked as stale. Please feel free to reopen it if needed!