tf.image.crop_to_bounding_box的用法
来源:互联网 发布:房产中介软件xiazaiba 编辑:程序博客网 时间:2024/06/16 08:08
import tensorflow as tfwith tf.gfile.FastGFile('5.jpg','rb') as f: img=f.read() img=tf.image.decode_jpeg(img,channels=3) img = tf.image.resize_images(img, size=(286, 286))rand=tf.random_uniform([2], 0, 286 - 256 + 1)offset = tf.cast(tf.floor(rand), dtype=tf.int32)r = tf.image.crop_to_bounding_box(img, offset[0], offset[1], 256, 256)with tf.Session() as sess: img_,rand_,offset_,r_=sess.run([img,rand,offset,r])
阅读全文
1 0
- tf.image.crop_to_bounding_box的用法
- tf.concat的用法
- tf.reduce_mean的用法
- tf.clip_by_value的用法
- tf.convert_to_tensor的用法
- tf.select的用法
- tf.assign的用法
- tf.truncated_normal的用法
- tf.concat的用法
- tf.cond()的用法
- tf.concat的用法
- tf.assign的用法
- tf.truncated_normal的用法
- tf.truncated_normal的用法
- tf.truncated_normal的用法
- tf.variable_scope和tf.name_scope的用法
- tf.global_variables或者tf.all_variables的用法
- tf.stack()和tf.unstack()的用法
- 什么是 JWT -- JSON WEB TOKEN
- 初涉IDEA,破解与快捷键
- zookeeper-4 watcher
- sp
- WebRTC带宽估计
- tf.image.crop_to_bounding_box的用法
- supervisor uwsgi配置文件
- Redis-Study-tips-1-环境搭建
- 自定义漂亮的Android SeekBar样式
- UVA 10167
- 布局笔记
- [译文]深入理解JavaScript的this关键字(一)
- OracleDBA之数据库管理
- Angular表单验证