自动标签是一种使用神经网络的图像标记工具
autolabel的Python项目详细描述
自动标签
自动标签是一种图像标签工具。 当前的图像是用ResNet18-152标记的,由pytorch实现。 Autolabel可以用作cli工具或库。在
安装
python setup.py install
命令行用法
有关命令概述,请参见--help
简单来说,这意味着:
autolabel image.jpg
Autolabel支持从STDIN读取文件名:
find /myimages -type f -iname '*.jpg'| autolabel
库的使用
fromautolabel.imageimportImageListDatasetfromautolabel.classifier.resnetimportResnet18ClassifierfrompathlibimportPathclassifier=Resnet18Classifier()images=[Path('/path/to/image.jpg'),Path('/path/to/another/image.png')]dataset=ImageListDataset(images)res=classifier.predict(dataset,top=top)forp,decodedinres.items():print(p,decoded)
- 项目
标签: