Py之pixellib:pixellib库的简介、安装、经典案例之详细攻略
pixellib是一个库执行图像分割。它支持两种主要类型的图像分割:语义分割和实例分割,只需几行代码就可以实现语义分段和实例分段。特的特点如下:
官网:https://github.com/ayoolaolafenwa/PixelLib
案例:https://github.com/skywind3000/pixellib
whl文件:https://github.com/ayoolaolafenwa/PixelLib/releases/tag/0.1.0
Image Transform 图像变换 | |
Anti Aliasing 抗锯齿 | |
Image Drawing 图像绘制 | |
Geometry Render 几何渲染 | |
Image Warp 图像扭曲 | |
High Quality Render 高质量渲染 | ![]() |
pip install pixellib
pixellib使用Deeplabv3+框架实现,实现语义分割。采用在pascalvoc上预训练的Xception模型进行语义切分。基于xception模型的语义分割在pascalvoc上进行预处理。
import pixellib
from pixellib.semantic import semantic_segmentation
segment_image = semantic_segmentation()
segment_image.load_pascalvoc_model("deeplabv3_xception_tf_dim_ordering_tf_kernels.h5")
segment_image.segmentAsPascalvoc("path_to_image", output_image_name = "path_to_output_image")
联系客服