deepdisc.inference.match_objects
Functions
|
Returns indices for matched pairs of ground truth and detected objects in an image |
|
Returns indices for matched pairs of ground truth and detected objects in an image |
|
Returns object classes for matched pairs of ground truth and detected objects in an image |
|
Returns object classes for matched pairs of ground truth and detected objects test images |
|
Test function not yet implemented for batch prediction |
|
Returns object classes for matched pairs of ground truth and detected objects test images |
Module Contents
- get_matched_object_inds(dataset_dict, outputs, IOUthresh=0.5)[source]
Returns indices for matched pairs of ground truth and detected objects in an image
- Parameters:
dataset_dict (dictionary) – The dictionary metadata for a single image
IOUthresh (float) – The IOU threshold used to match detections and ground truth
- Returns:
matched_gts (list(int)) – The indices of matched objects in the ground truth list
matched_dts (list(int)) – The indices of matched objects in the detections list
outputs (list(Intances)) – The list of detected object Instances
- get_object_coords(dataset_dict, outputs)[source]
Returns indices for matched pairs of ground truth and detected objects in an image
- Parameters:
dataset_dict (dictionary) – The dictionary metadata containing the wcs for a single image
- Returns:
matched_gts (list(int)) – The indices of matched objects in the ground truth list
matched_dts (list(int)) – The indices of matched objects in the detections list
outputs (list(Intances)) – The list of detected object Instances
- get_matched_object_classes(dataset_dicts, imreader, key_mapper, predictor)[source]
Returns object classes for matched pairs of ground truth and detected objects in an image
- Parameters:
dataset_dicts (list[dict]) – The dictionary metadata for a test images
imreader (ImageReader object) – An object derived from ImageReader base class to read the images.
key_mapper (function) – The key_mapper should take a dataset_dict as input and return the key used by imreader
predictor (AstroPredictor) – The predictor object used to make predictions on the test set
- Returns:
true_classes (list(int)) – The classes of matched objects in the ground truth list
pred_classes (list(int)) – The classes of matched objects in the detections list
- get_matched_object_classes_new(dataset_dicts, predictor)[source]
Returns object classes for matched pairs of ground truth and detected objects test images assuming the dataset_dicts have the image HxWxC in the ‘image_shaped’ field
- Parameters:
dataset_dicts (list[dict]) – The dictionary metadata for a test images
predictor (AstroPredictor) – The predictor object used to make predictions on the test set
- Returns:
true_classes (list(int)) – The classes of matched objects in the ground truth list
pred_classes (list(int)) – The classes of matched objects in the detections list
- run_batched_match_class(dataloader, predictor)[source]
Test function not yet implemented for batch prediction
- run_batched_get_object_coords(dataloader, predictor, oclass=True, gmm=False)[source]
Returns object classes for matched pairs of ground truth and detected objects test images assuming the dataset_dicts have the image HxWxC in the ‘image_shaped’ field
- Parameters:
dataloader (Dataloader) – Dataloader that reads in images and formats input for the model
predictor (AstroPredictor) – The predictor object used to make predictions on the test set
- Returns:
zpreds (list(float)) – The predicted reshifts of detected objects
all_ras (list(float)) – The RAs of detected objects
all_decs (list(float)) – The DECs of detected objects
oclasses (list(int)) – The predicted classes of detected objects
scores (list(float)) – The confidence scores of detected objects