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

软件简介

Arraymancer Vision (WIP)

Simple library for image loading, preprocessing and visualization for working with arraymancer.

Features

  • Loading image into tensors
  • Simple image transformations like flipping, rotation, scaling
  • Saving images
  • Image convolution filters like sharpen, edges
  • Visualization of images using visdom

Quick Start

Installation

Install using nimble package manager:

nimble install arraymancer_vision

For visualizing you have to install visdom and run it:

pip install visdom
python -m visdom.server

Then go to http://localhost:8097

Usage example

import arraymancer_vision

# Load image from file into a CxHxW Tensor[uint8]
var origimage = load("examples/lena.png")

# Do some preprocessing
var image = origimage.center_crop(128, 128)
image = image.hflip()
image = image.rot90(1)
image = image.filter_sharpen()
image = image.scale(512, 512, ScaleBilinear)

# Visualize it using visdom
let vis = newVisdomClient()
vis.image(origimage)
vis.image(image)

# Save it to a file
image.save("examples/preprocessed_lena.png")

This quickstart example is inside examples directory, you can run it by cloning the repo and running with nim c -r examples/quickstart.nim

You can visualize all predefined filters having visdom running and then running the filters example with nim c -r examples/visualize_filters.nim

API

Documentation of the completely available API is here

Details

The library operates all images as Tensor[uint8] with dimensions CxHxW, where C is in RGBA colorspace, note that other image libraries usually operates with images in HxWxC format, so remember this when using. This design choice is to optimize and facilitate operation on images in deep learning tasks.

TODO

  • Simple drawing routines
  • Colorspace conversions
展开阅读全文

代码

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{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 评论
0 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部