Open timsainb opened 1 year ago
I think I localized the issue. The problem is that with multiple cameras, you're resetting the number of cameras for each calibration you add, so its only the last callibration that counts.
Create a trainingset https://github.com/JARVIS-MoCap/JARVIS-HybridNet/blob/master/jarvis/train_interface.py#L15
training_set = Dataset3D(project.cfg, set='train',
cameras_to_use = camera_list)
in the trainingset, create a calibration/reprotool for each dataset
https://github.com/JARVIS-MoCap/JARVIS-HybridNet/blob/master/jarvis/dataset/dataset3D.py#L50
self.reproTools = {}
for calibParams in self.dataset['calibrations']:
calibPaths = {}
for cam in self.dataset['calibrations'][calibParams]:
if self.cameras_to_use == None or cam in self.cameras_to_use:
calibPaths[cam] = self.dataset['calibrations'] \
[calibParams][cam]
self.reproTools[calibParams] = ReprojectionTool(
os.path.join(cfg.PARENT_DIR, self.root_dir), calibPaths)
**self.num_cameras = self.reproTools[calibParams].num_cameras**
self.reproTools[calibParams].resolution = [width,height]
So later when we're trying to grab something from the dataset, it's the last number of cameras that it expects:
https://github.com/JARVIS-MoCap/JARVIS-HybridNet/blob/master/jarvis/dataset/dataset3D.py#L189
centerHM = np.full((self.num_cameras, 2), 128, dtype = int)
Hey Timo,
I'm looking into pretraining a keypoint network again and I'm having trouble figuring out how to follow the instructions you gave via email (shown below).
I have three types of datasets:
I'm trying to do inference on new data from the 5-camera rig, but since I have all of these other labeled data, I want to use them all together for training (at least the 2D network.
So my understanding is there are three steps in the Jarvis pipeline (center detect, 2D keypoints, 3D hybridnet). For your first step (train a model on the pretraining dataset) I first made a training set of all of the datasets combined. I then train a center detect network
Then I train a 2D keypoint network:
Both of these work fine and I get pretty good performance. The issue is when I then try to train the hybridnet:
Training starts to run smoothly for a few batches:
Then get the following error:
I believe what is happening is that since the 'dataset3D' object only has one version of
self.reproTools
, the network always expects the same reprojection parameters (despite different parameters existing for each trainingset, insidecalib_params
.Any help on this method would be appreciated!
Thanks