towhee.trainer.utils.plot_utilsΒΆ
Functions
Show sample images for torchvision.datasets.ImageFolder, Put another way, the image root path structure just need to be like this: |
|
Show count statistic infos for torchvision.datasets.ImageFolder. Put another way, the image root path structure just need to be like this: |
|
Use Captum to interpret the specified class of network output. Captum should be installed. :param model: Pytorch module. :type model: nn.Module :param image: The image before do transform. It can be produced by either pytorch DataLoader or read by Image.open() using PIL. :type image: Any :param eval_transform: Evaluation transform. :type eval_transform: transforms.Compose :param method: It can be in ['Occlusion', 'IntegratedGradients', 'GradientShap', 'Saliency']. :type method: method :param fig_size: Figure plotting size. :type fig_size: Tuple :param cmap: Matplotlib colormap. :type cmap: Any :param pred_label_idx: If None, use the predicted class automatically. :type pred_label_idx: int :param titles: Plotted titles of the two axs in the figure. :type titles: List :param **kwargs: Keyword Args. :type **kwargs: Any. |
|
Plot the lr for a config. |
|
Plot the lr curve for a specified optimizer and scheduler instance. |
|
Predict using an image classification model. |
|
Show the result which torchvision.transforms or any other callable function act on the image. |