Lightly Insights:可以轻松获取关于机器学习数据集基本洞察的工具,可以可视化图像数据集的基本统计信息,仅需提供一个包含图像和对象检测标签的文件夹,它会生成一个包含指标和图表的静态 HTML 网页。
[1] 详细内容请参阅 MarkAI Blog [2] 更多资料请参阅 MarkAI Github
pip install lightly-insights
Lightly Insights 报告由 python 脚本生成。下面的示例使用PascalVOC 2007数据集。您可以按照示例下载它(~450MB):
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
tar -xvf VOCtrainval_06-Nov-2007.tar
要运行 Lightly Insights,我们需要提供:
from pathlib import Path
from labelformat.formats import PascalVOCObjectDetectionInput
from lightly_insights import analyze, present
# Analyze an image folder.
image_analysis = analyze.analyze_images(
image_folder=Path("./VOCdevkit/VOC2007/JPEGImages")
)
# Analyze object detections.
label_input = PascalVOCObjectDetectionInput(
input_folder=Path("./VOCdevkit/VOC2007/Annotations"),
category_names=(
"person,bird,cat,cow,dog,horse,sheep,aeroplane,bicycle,boat,bus,car,"
+ "motorbike,train,bottle,chair,diningtable,pottedplant,sofa,tvmonitor"
)
)
od_analysis = analyze.analyze_object_detections(label_input=label_input)
# Create HTML report.
present.create_html_report(
output_folder=Path("./html_report"),
image_analysis=image_analysis,
od_analysis=od_analysis,
)
要查看报告,请打开./html_report/index.html.