rex_xai.input_data¶
Attributes¶
Classes¶
Functions¶
|
Module Contents¶
- rex_xai.input_data.Setup¶
- rex_xai.input_data._guess_mode(input)¶
- class rex_xai.input_data.Data(input, model_shape, device, mode=None, process=True)¶
- input¶
- mode = None¶
- target: rex_xai.prediction.Prediction | None = None¶
- device¶
- model_shape¶
- model_order = None¶
- mask_value = None¶
- background = None¶
- context = None¶
- set_channels(c=None)¶
- set_classification(cl)¶
- match_data_to_model_shape()¶
a PIL image has the from H * W * C, so if the model takes C * H * W we need to transpose self.data to get it into the correct form for the model to consume This function does not add in the batch channel at the beginning
- generic_tab_preprocess()¶
- load_data(astype='float32')¶
- _normalise(means, stds, astype, norm)¶
- try_unsqueeze()¶
- generic_image_preprocess(means=None, stds=None, astype='float32', norm=255.0)¶
- Parameters:
norm (Optional[float])
- __get_shape()¶
returns height, width, channels, order, depth for the model
- set_mask_value(m)¶