coupleswapper_gui.py 文件源码

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

项目:FaceSwapper 作者: QuantumLiu 项目源码 文件源码
def load_image(self):
        '''
        ????
        '''
        try:
            im_path,_=QFileDialog.getOpenFileName(self,'??????','./','Image Files(*.png *.jpg *.bmp)')
            if not os.path.exists(im_path):
                return
            self.im_path=im_path
            self.statu_text.append('???????'+self.im_path)
            if not self.swapper:
                self.swapper=Coupleswapper([self.im_path])
            elif not self.im_path== self.cur_im_path:
                self.swapper.load_heads([self.im_path])
            self.img_ori=self.swapper.heads[os.path.split(self.im_path)[-1]][0]
            cv2.imshow('Origin',self.img_ori)
        except (TooManyFaces,NoFace):
            self.statu_text.append(traceback.format_exc()+'\n????????????????????????????')
            return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号