dog_breeds_web_app/InceptionV3.py
def show_top5_result(self, img_path):
        """
        Visualize top 5 dog breeds that are predicted by the model via bar chart
        Parameters:
            None
        Return:
            None
        """
        top5_breeds_idx, top5_breeds_prob = self.predict_top5_breeds(img_path)
        top5_labels = [dog_names[idx] for idx in top5_breeds_idx]
        message = self.isMix_mutt(top5_breeds_prob, top5_labels)

        fig = plt.figure()
        #plot top5 result
        plt.barh(top5_labels, top5_breeds_prob)
        plt.xlabel('probability', fontsize=12)
        plt.xlim(0, 1.0)
        plt.tick_params(axis="y",direction="in", pad =-200)
        plt.title('dog breeds classifer', fontsize=16)

        figdata_png = u.convert_plt2png(fig)
        figdata_png = u.embed_png2html(figdata_png)
        return figdata_png, message

        Visualize top 5 dog breeds that are predicted by the model via bar chart
        Parameters:
            None
        Return:
            None
        
Visualize top 5 dog breeds that are predicted by the model via bar chart
Parameters:
None
Return:
None
Visualize top 5 dog breeds that are predicted by the model via bar chart Parameters : None Return : None
def show_top5_result(self, img_path):
        top5_breeds_idx, top5_breeds_prob = self.predict_top5_breeds(img_path)
        top5_labels = [dog_names[idx] for idx in top5_breeds_idx]
        message = self.isMix_mutt(top5_breeds_prob, top5_labels)
        fig = plt.figure()
        plt.barh(top5_labels, top5_breeds_prob)
        plt.xlabel('probability', fontsize=12)
        plt.xlim(0, 1.0)
        plt.tick_params(axis="y",direction="in", pad =-200)
        plt.title('dog breeds classifer', fontsize=16)
        figdata_png = u.convert_plt2png(fig)
        figdata_png = u.embed_png2html(figdata_png)
        return figdata_png, message
def show_top5_result ( self , img_path ) : top5_breeds_idx , top5_breeds_prob = self . predict_top5_breeds ( img_path ) top5_labels = [ dog_names [ idx ] for idx in top5_breeds_idx ] message = self . isMix_mutt ( top5_breeds_prob , top5_labels ) fig = plt . figure ( ) plt . barh ( top5_labels , top5_breeds_prob ) plt . xlabel ( 'probability' , fontsize = 12 ) plt . xlim ( 0 , 1.0 ) plt . tick_params ( axis = "y" , direction = "in" , pad = - 200 ) plt . title ( 'dog breeds classifer' , fontsize = 16 ) figdata_png = u . convert_plt2png ( fig ) figdata_png = u . embed_png2html ( figdata_png ) return figdata_png , message
Visualize top 5 dog breeds that are predicted by the model via bar chart
Parameters:
None
Return:
None
Visualize top 5 dog breeds that are predicted by the model via bar chart Parameters : None Return : None
"""
        Visualize top 5 dog breeds that are predicted by the model via bar chart
        Parameters:
            None
        Return:
            None
        """ #plot top5 result
self
img_path