栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【BUG解决】deeplab

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【BUG解决】deeplab

解决方案:
deeplab/input_preprocess.py中
找到
if is_training and label is not None
然后添加:

else:
   rr = tf.minimum(tf.cast(crop_height,tf.float32)/tf.cast(image_height,tf.float32),
           tf.cast(crop_width,tf.float32)/tf.cast(image_width,tf.float32))
   newh = tf.cast(tf.cast(image_height, tf.float32)*rr, tf.float32)
   neww = tf.cast((tf.cast(image_width, tf.float32)*rr), tf.float32)
   processed_image = tf.image.resize_images(
       processed_image, (newh, neww), method=tf.image.ResizeMethod.BILINEAR, align_corners=True)
   processed_image = preprocess_utils.pad_to_bounding_box(
                       processed_image, 0, 0, crop_height, crop_width, mean_pixel)

在执行命令的时候额外添加
--min_resize_value 513 --max_resize_value 513
整个命令如下

python deeplab/eval.py --logtostderr --eval_split="val" --model_variant="xception_65" --atrous_rates=6 --atrous_rates=12 --atrous_rates=18 --output_stride=16 --decoder_output_stride=4  --eval_crop_size="513,513" --dataset="seasons_vision" --checkpoint_dir="/mnt/deeplabv3plus-label7/research/deeplab/datasets/seasons_seg_output/train_model" --eval_logdir="/mnt/deeplabv3plus-label7/research/deeplab/datasets/seasons_seg_output/eval" --dataset_dir="/mnt/deeplabv3plus-label7/research/deeplab/datasets/seasons_seg/tfrecords" --min_resize_value 513 --max_resize_value 513

参考链接:
https://github.com/tensorflow/models/issues/3695

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/822241.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号