python环境运行FCN遇到的若干问题

win10系统,python3.5运行GitHub中经典算法FCN,tensorflow版本0.12

代码链接:https://github.com/shekkizh/FCN.tensorflow

1、Cannot feed value of shape (0,) for Tensor 'input_image:0', which has shape '(?, 224, 224, 3)']

解决:删除Data_zoo\MIT_SceneParsing路径下的MITSceneParsing.pickle文件。


2、Annotation file not found for ADEChallengeData2016\images\validation\ADE_val_00001994 - Skipping

解决:修改read_MITSceneParsingData.py文件中的filename = os.path.splitext(f.split("/")[-1])[0],改为filename = os.path.splitext(f.split("\\")[-1])[0]


3、AttributeError: module 'scipy.misc' has no attribute 'imread'

解决:安装PIL第三方库,pip install Pillow

pip install Pillow

降级scipy的版本, 降级到scipy==1.2.1

pip install scipy==1.2.1

4、numpy.AxisError: axis 3 is out of bounds for array of dimension 3

解决:self.annotations = np.array(
            [np.expand_dims(self._transform(filename['annotation']), axis=3) for filename in self.files])将2改为2

self.annotations = np.array(
            [np.expand_dims(self._transform(filename['annotation']), axis=2) for filename in self.files])

 

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值