P2Trainer
- module P2Trainer
- class P2Trainer
The Precision-Level 2 (P2) Trainer class object instantiates a training session using PyTorch's MaskRCNN-Benchmark for taking an input dataset and fasterrcnn model from PyTorch model zoo in order to generate a custom-trained P2 ONNX model file.\n This model can then be deployed as a ROS2 package.
Public Functions
- __init__(self, path_to_dataset, model_name, label_list, max_iteration, checkpoint_period, test_period, steps)
The constructor. Sets all the required fixed path to various files needed to start a training session.\n Calls updateTrainingConfig function.
- updateTrainingConfig(self)
A Mutator function that modifies the various training session config files.
- updateTrainVerification(self)
- checkGPUAvailability(self)
- train(self, debug)
- export(self, debug)
- isTrainFarmSetupVerified(self)
- isExporterSetupVerified(self)
- pullTrainFarmDockerImage(self)
- createTrainFarmDockerContainer(self)
- pullExporterDockerImage(self)
- installTrainingDependencies(self)
- createExportDockerContainer(self)
- installExporterDependencies(self)
- copyTrainingFiles(self)
- runTraining(self)
- copyExportFiles(self)
- runExporter(self)
Public Members
- p2_train_logger
- model_name
- label_list
- max_iteration
- checkpoint_period
- test_period
- steps
- isGPUAvailableFlag
- path_to_dataset
- path_to_modif
- path_to_training_config
- path_to_export_config
- path_to_trim_tools
- path_to_remove_init_tool
- path_to_export_modif
- docker_inspect_process
- docker_pull_process
- docker_construct_process
- install_depend_process
- copy_process
- training_process
- exporter_process
- shift_process