Attention center 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
Attention center 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
Attention center 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 Apache-2.0
开发语言 Python 查看源码 »
操作系统 跨平台
软件类型 开源软件
开源组织 Google
地区 不详
投 递 者 Alias_Travis
适用人群 未知
收录时间 2022-12-05

软件简介

Attention center 是一个机器学习模型,这个仓库包含:

  • 一个 TensorFlow Lite 模型,可用于预测图像的注意中心,即图像中最突出的部分所在的区域
  • 一个 Python 脚本,可用于使用注意力中心对图像进行批量编码。这可以和子模块 libjxl 一起使用,以便创建 JPEG XL 图像,这样解码图像将从由模型决定的注意中心开始。

Google Attention center 模型的一些预测实例,其中绿点是模型预测的图像注意力中心点。

如何使用

请确保你已经安装了 Python 和 Tensorflow:

  • 从 GitHub 上克隆它,包括子模块
  • 构建 libjxl,按照 libjxl repo 中给出的说明
  • 运行 encode_with_centers.py 脚本。
git clone https://github.com/google/attention-center --recursive --shallow-submodules
cd attention-center/libjxl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
cmake --build . -- -j$(nproc)
cd ../../
python encode_with_centers.py --lite_model_file=./model/center.tflite \
  --image_dir="${INPUT_IMAGE_DIR}" --output_dir="${OUTPUT_IMAGE_DIR}"

有以下标志:

  --[no]dry_run: If true, only do a dry run, do not write files.
    (default: 'false')
  --encoder: Location of th encoder binary.
  --image_dir: Name of the directory of input images.
    (default: './libjxl/build/tools/cjxl')
  --lite_model_file: Path to the corresponding TFLite model.
  --new_suffix: File extension of the compressed file.
    (default: 'jxl')
  --output_dir: Name of the directory of the output images.
  --[no]verbose: If true, prints info about the commands executed.
    (default: 'true')
展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击引领话题📣
发表了资讯
2022/12/06 08:25

Google 开源 ML 模型,根据用户目光调整内容加载优先级

当你看一张图片时,你会先注意图片的哪些部分,或者说图片中的哪些区域会首先吸引你的注意力,机器学习能不能提前知道用户的注意力会集中在什么地方? 基于这个想法,Google 训练了一个机器学习模型可以做出这样的预测,并将该模型应用于 JPEG XL 图像编码格式。当应用该模型之后,浏览器会首先加载用户会第一时间注意的图像部分,从用户的视角来看,图像加载速度会有明显提升,可以显著改善用户体验。 当然,这个模型不仅可以适...

1
2
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
4 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部