DataVisualization
The class for managing the data of the main repositories
A collection of methods to simplify your code.
Features management
Create a DataFrame from the data of the main repositories |
|
Create a DataFrame from the data of the main repositories |
Images management
|
Rescale boxes with probability greater than the threshold |
|
Create a DataFrame from the prediction of object detection |
|
Plot image with boxes |
Detailed list
- class smltk.datavisualization.DataVisualization(*args, **kwargs)
- bboxes_cxcywh_to_xyxy(bboxes)
Concatenate a sequence of tensors along a new dimension
- Arguments:
- bboxes (sequence of Tensors):
list of boxes Tensors
- Returns:
sequence of Tensors
- get_df(data)
Create a DataFrame from the data of the main repositories
- Arguments:
- data (mixed):
data loaded from one of the main repositories
- Returns:
Pandas DataFrame
- get_inference_df(data, x_test, y_test, y_pred)
Create a DataFrame from the data of the main repositories
- Arguments:
- x_test (Pandas DataFrame):
features used for the prediction
- y_test (list of str):
list of the targets
- y_pred (list of str):
list of the predictions
- Returns:
Pandas DataFrame
- get_inference_objects(image, prediction, threshold=0.7)
Rescale boxes with probability greater than the threshold
- Arguments:
- image (PIL Image):
object of type PIL Image
- prediction (dict):
prediction of the model with pred_logits and pred_boxes
- threshold (float):
probability value used like threshold, default 0.7
- Returns:
tuple of sequences of Tensors about probabilities and boxes
- get_inference_objects_df(probability, boxes)
Create a DataFrame from the prediction of object detection
- Arguments:
- probability (sequence of Tensors):
list of probabilities Tensors
- boxes (sequence of Tensors):
list of boxes Tensors
- Returns:
Pandas DataFrame
- plot_inference_objects(image, probability, boxes)
Plot image with boxes
- Arguments:
- image (PIL Image):
object of type PIL Image
- probability (sequence of Tensors):
list of probabilities Tensors
- boxes (sequence of Tensors):
list of boxes Tensors
- Returns:
plot
- rescale_bboxes(bboxes, size)
Rescale boxes on image size
- Arguments:
- bboxes (sequence of Tensors):
list of boxes Tensors
- size (tuple):
width and height of image
- Returns:
sequence of Tensors