Using train.pkg.slp, val.pkg.slp, test.pkg.slp for training in python, how to cofigure model and hyperparameter for training. #2123
-
Hey, i am having trouble getting my training going without my kernel crashing (to much memory ussage) am i doing something wrong here. I want to be able to just specify the models to be used in python and configure hyperparameters and then run training. I am really stuck. Thanks in advance. :) CODE: for frame_idx in range(num_frames):
LABELS_SAVE_PATH = dir_path + "slp_files/" + file_name.replace(".h5", ".slp") labels = sio.Labels( labels.save(LABELS_SAVE_PATH) labels = sio.Labels( labels.save(LABELS_SAVE_PATH) Load labels:labels = sio.load_file(dir_path + "slp_files/" + file_name.replace(".h5", ".slp")) Make splits and export with embedded images:labels.make_training_splits(n_train=0.8, n_val=0.1, n_test=0.1, save_dir=save_dir, seed=42) Initialize the default training job configuration.config = TrainingJobConfig() TRAINING_SLP_FILE = dir_path + "slp_files/splits/train.pkg.slp" config.data.labels.training_labels = TRAINING_SLP_FILE config.model.backbone.unet = UNetConfig() config.optimization.augmentation_config.rotate = True config.outputs.run_name = "baseline_model.topdown" config.save_json(dir_path + "config_files/config.json") trainer = sleap.nn.training.Trainer.from_config(config) trainer.train() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 17 replies
-
Hi @Powerwoody , Could you please share the Thanks, Divya |
Beta Was this translation helpful? Give feedback.
-
Hi @Powerwoody !
Let me know if you have any questions! Thanks, Divya |
Beta Was this translation helpful? Give feedback.
yes it's better to train separate models to track bat and worm! If you only have bat instance labeled in a frame, then you don't need to specify the anchor part in the config.
Thanks,
Divya