caffeNetViewer.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:caffeNetViewer 作者: birolkuyumcu 项目源码 文件源码
def showImg(self,label,img):
        if len(img.shape) == 2:
            img = cv2.applyColorMap(img, cv2.COLORMAP_JET)
            img = cv2.resize(img, (512, 512),cv2.INTER_AREA)
        height, width, byteValue = img.shape
        byteValue = byteValue * width
        timg = img.copy()
        image = QtGui.QImage(timg.data, width, height,byteValue, QtGui.QImage.Format_RGB888)
        label.setPixmap(QtGui.QPixmap(image).scaled(label.size(),aspectMode=QtCore.Qt.KeepAspectRatio))     


        """ visualize function from
        https://github.com/BVLC/caffe/blob/master/examples/00-classification.ipynb
        """
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号