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

BG calibration broken #24

Closed
pv33 opened this issue Jul 31, 2022 · 6 comments
Closed

BG calibration broken #24

pv33 opened this issue Jul 31, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@pv33
Copy link
Member

pv33 commented Jul 31, 2022

When I run code now there is a residual hand in the background model. Leads to the conclusion that tabletop calibration has changed but there is no issue notice indicating as much. Please explain here what happened and why the changes were made?

Are you really confirming that the changes are doing what they should?
Are you at least documenting how existing rosbag files will fail to function?
Are you even testing them?

@pv33 pv33 added the bug Something isn't working label Jul 31, 2022
@yiyeChen
Copy link
Collaborator

yiyeChen commented Aug 4, 2022

The tabletop calibration shouldn't change. I did try the new script on the default data coded in the rosbag runner, and there was no problems. I can test on other rosbag files.

Can you provide the data name on which issue happens?

@pv33
Copy link
Member Author

pv33 commented Aug 4, 2022

1] rosbag: ~/data/superviseit/Testing/Yunzhi/Test_human_activity/activity_multi_strict.bag
2] rosbag: ~/data/superviseit/Testing/Yunzhi/Test_human_activity/activity_single_strict.bag
3] rosbag: ~/data/superviseit/Testing/Yunzhi/Test_puzzle_solving/tangled_1_work.bag

1+2 have some kind of hand in the BG model.
3 does not have a hand in the BG model.

@yiyeChen
Copy link
Collaborator

@pv33

Problem figured out. The cause is that the configuration data is "bad". When waving over the workspace the hand stop at the starting location for too long, and didn't move away long enough. As a result, the GMM model capture the hand color as the major background element.

I show the weight sum of the Gaussian component mean below. You can see the result for the 1+2 contains hand (left):
Screenshot from 2022-08-11 15-26-56

Whereas ideally it should be (the result for 3):
Screenshot from 2022-08-11 15-25-34

Previously the problem does not reveal because the entire table region is used as ROI, rather than the updated black mat region. Also the default Gaussian component is updated to 3 rather than 5. More Gaussian components can capture more statistics, hence the black background is captured although veiled by the hand. Using the entire table region means that non-black region is not removed.

The current defaults are in the config/SystemDefaults.yaml (including the newly pushed SceneSegment.ROI.mode). For the data 1+2, I suggest overwriting the parameters as:

SceneSegment:
  bgGMM:
    gaussNum: 5
  ROI:
    mode: "table"

@pv33
Copy link
Member Author

pv33 commented Aug 11, 2022

@yiyeChen
Cool. Is it safe to say then that maybe we should not be using any of the ROS bags captured by Yunzhi. Especially in light of the fact that the setup has changed?
I could spend some time next week capturing new video for testing/debugging purposes.

The visualization of the background is a good thing to have. Does this mean that you have a test script that extracts it or displays it given a calibration ROS bag? Where can it be found?
This is the kind of executable that would help but needs to be available and documented somewhere.

@yiyeChen
Copy link
Collaborator

@pv33

I think some of Yunzhi's bags are good to use, because he re-calibrated when capturing some data. But I have no idea which ones are good. It requires to examine one-by-one.

The toggle of the background visualization already exist in the configuration file. Since it is part of the calibration, I use the vis_calib to control whether we want to visualize the results. To turn on the switch, just put the following in the yaml:

general:
  vis_calib:    true

For now maybe I can update the documentation in the #28 ? So that the issue collect all important APIs for the Surveillance.

@pv33
Copy link
Member Author

pv33 commented Sep 19, 2024

No longer using ROS bags to perform initialization of system. We are using HDF5 and YAML files as best fit. Not keeping in Old milestone issue storage.

@pv33 pv33 closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants