panel_segmentation.panel_detection.PanelDetection.clusterPanels

PanelDetection.clusterPanels(test_mask, boxes, fig=False)[source]

This function uses object detection outputs to cluster the panels

Parameters
  • test_mask (Array of booleans) – Size (640, 640, 3). This is the boolean mask output of the testSingle() function, where solar array pixels are masked.

  • boxes (Pytorch tensor) – Contains the detected boxes found by the object detection model. This is the ‘boxes’ output of the classifyMountingConfiguration() function.

  • fig (boolean) – shows the clustering image if fig = True

Returns

  • integer

  • Total number of clusters detected in the image

  • uint8

  • Masked image containing detected clusters each of

  • dimension (640,640,3). The masked image is 4D, with the first

  • dimension representing the total number of clusters, as follows

  • (number clusters, 640, 640, 3)