Reference for ultralytics/utils/callbacks/comet.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/comet.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.utils.callbacks.comet._get_comet_mode()
Returns the mode of comet set in the environment variables, defaults to 'online' if not set.
ultralytics.utils.callbacks.comet._get_comet_model_name()
Returns the model name for Comet from the environment variable 'COMET_MODEL_NAME' or defaults to 'YOLOv8'.
ultralytics.utils.callbacks.comet._get_eval_batch_logging_interval()
Get the evaluation batch logging interval from environment variable or use default value 1.
ultralytics.utils.callbacks.comet._get_max_image_predictions_to_log()
Get the maximum number of image predictions to log from the environment variables.
ultralytics.utils.callbacks.comet._scale_confidence_score(score)
Scales the given confidence score by a factor specified in an environment variable.
ultralytics.utils.callbacks.comet._should_log_confusion_matrix()
Determines if the confusion matrix should be logged based on the environment variable settings.
ultralytics.utils.callbacks.comet._should_log_image_predictions()
Determines whether to log image predictions based on a specified environment variable.
ultralytics.utils.callbacks.comet._get_experiment_type(mode, project_name)
Return an experiment based on mode and project name.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._create_experiment(args)
Ensures that the experiment object is only created in a single process during distributed training.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._fetch_trainer_metadata(trainer)
Returns metadata for YOLO training including epoch and asset saving status.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._scale_bounding_box_to_original_image_shape(box, resized_image_shape, original_image_shape, ratio_pad)
YOLOv8 resizes images during training and the label values are normalized based on this resized shape.
This function rescales the bounding box labels to the original image shape.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._format_ground_truth_annotations_for_detection(img_idx, image_path, batch, class_name_map=None)
Format ground truth annotations for detection.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._format_prediction_annotations_for_detection(image_path, metadata, class_label_map=None)
Format YOLO predictions for object detection visualization.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._fetch_annotations(img_idx, image_path, batch, prediction_metadata_map, class_label_map)
Join the ground truth and prediction annotations if they exist.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._create_prediction_metadata_map(model_predictions)
Create metadata map for model predictions by groupings them based on image ID.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._log_confusion_matrix(experiment, trainer, curr_step, curr_epoch)
Log the confusion matrix to Comet experiment.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._log_images(experiment, image_paths, curr_step, annotations=None)
Logs images to the experiment with optional annotations.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._log_image_predictions(experiment, validator, curr_step)
Logs predicted boxes for a single image during training.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._log_plots(experiment, trainer)
Logs evaluation plots and label plots for the experiment.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet._log_model(experiment, trainer)
Log the best-trained model to Comet.ml.
ultralytics.utils.callbacks.comet.on_pretrain_routine_start(trainer)
Creates or resumes a CometML experiment at the start of a YOLO pre-training routine.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet.on_train_epoch_end(trainer)
Log metrics and save batch images at the end of training epochs.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet.on_fit_epoch_end(trainer)
Logs model assets at the end of each epoch.
Source code in ultralytics/utils/callbacks/comet.py
ultralytics.utils.callbacks.comet.on_train_end(trainer)
Perform operations at the end of training.