当前位置: 首页 > news >正文

佛山网站制作建设平台网站 备案吗

佛山网站制作建设,平台网站 备案吗,洛阳网站建设外包,学做网站的学校Anomalib支持多种格式的数据集#xff0c;包括MVTec AD和BeanTech等最先进的异常检测基准数据集。对于希望在自定义数据集上使用该库的用户#xff0c;anomalib还提供了一个Folder datamodule#xff0c;可以从文件系统的文件夹中加载数据集。本文的目的是使用Folder datamo…Anomalib支持多种格式的数据集包括MVTec AD和BeanTech等最先进的异常检测基准数据集。对于希望在自定义数据集上使用该库的用户anomalib还提供了一个Folder datamodule可以从文件系统的文件夹中加载数据集。本文的目的是使用Folder datamodule在自定义数据集上训练anomalib模型。这将使用户能够灵活地使用anomalib来处理各种类型的数据并进行异常检测任务。 本文中我们将使用榛果玩具数据集。该数据集包含多个文件夹每个文件夹包含一组图像。colour和crack文件夹代表两种缺陷。本文忽略mask文件夹。anomalib将使用colour文件夹中的所有图像作为验证数据集的一部分然后随机划分good文件夹图像用于训练和验证。 Step 1: 安装Anomalib pip install anomalibStep 2: 搜集自定义数据 Anomalib支持多种图像扩展名如.jpg、“.jpeg”、“.png”、“.ppm”、“.bmp”、“.pgm”、“.tif”、“.tiff和”.webp。可以从具有任何这些扩展名的图像中收集数据集。 Step 3: 格式化数据 根据使用情况和收集方式自定义数据集可以具有不同的格式 包含好的和坏的图像的数据集。包含好的和坏的图像以及用于像素级评估的掩码真值的数据集。包含好的和坏的图像并已经分为训练集和测试集的数据集。 anomalib的Folder datamodule可以处理这些用例。 Step 4: 修改配置文件 要运行Anomalib的训练需要一个YAML配置文件。训练配置参数分为5个部分数据集(dataset)、模型(model)、项目(project)、日志(logging)和训练器(trainer)。Anomalib中使用自定义数据集只需要更改配置文件中的数据集部分即可。 这里选择Padim算法复制示例配置文件并修改数据集部分。 cp anomalib/models/padim/config.yaml custom_padim.yaml4-1 classification 数据目录 Hazelnut_toy ├── colour │ ├── 00.jpg │ ├── 01.jpg │ ... ├── good │ ├── 00.jpg │ ├── 01.jpg │ ...分类数据集没有ground truth的二值化掩膜mask因此需要将task字段设置为classification而不是segmentation。同时将metrics部分的pixel部分注释掉。 # Replace the dataset configs with the following. dataset:name: hazelnutformat: folderpath: ./datasets/hazelnut_toynormal_dir: good # name of the folder containing normal images.abnormal_dir: colour # name of the folder containing abnormal images.mask: null # optionalnormal_test_dir: null # name of the folder containing normal test images.task: classification # classification or segmentationextensions: nullsplit_ratio: 0.2 # ratio of the normal images that will be used to create a test splitimage_size: 256train_batch_size: 32test_batch_size: 32num_workers: 8normalization: imagenet # data distribution to which the images will be normalized: [none, imagenet]test_split_mode: from_dir # options: [from_dir, synthetic]val_split_mode: same_as_test # options: [same_as_test, from_test, sythetic]val_split_ratio: 0.5 # fraction of train/test images held out for validation (usage depends on val_split_mode)transform_config:train: nullval: nullcreate_validation_set: truetiling:apply: falsetile_size: nullstride: nullremove_border_count: 0use_random_tiling: Falserandom_tile_count: 16...metrics:image:- F1Score- AUROC # pixel: # - F1Score # - AUROCthreshold:method: adaptive #options: [adaptive, manual]manual_image: nullmanual_pixel: null注意每个dir值可以以列表的形式输入多个文件夹 4-2 segmentation Anomalib不仅可以对零件进行缺陷分类还可以用于缺陷分割。要实现这一点只需在与good和colour文件夹相同的目录级别上添加一个名为mask的文件夹。该文件夹应包含colour文件夹中缺陷的二进制图像。 数据目录 Hazelnut_toy ├── colour │ ├── 00.jpg │ ├── 01.jpg │ ... ├── good │ ├── 00.jpg │ ├── 01.jpg └── mask ├── 00.jpg ├── 01.jpg ...在配置文件中填充mask字段并将任务更改为segmentation即可使用Anomalib对缺陷进行分割。 # Replace the dataset configs with the following. dataset:name: hazelnutformat: folderpath: ./datasets/hazelnut_toynormal_dir: good # name of the folder containing normal images.abnormal_dir: colour # name of the folder containing abnormal images.mask: mask # optionalnormal_test_dir: null # name of the folder containing normal test images.task: segmentation # classification or segmentationextensions: nullsplit_ratio: 0.2 # ratio of the normal images that will be used to create a test splitimage_size: 256train_batch_size: 32test_batch_size: 32num_workers: 8normalization: imagenet # data distribution to which the images will be normalized: [none, imagenet]test_split_mode: from_dir # options: [from_dir, synthetic]val_split_mode: same_as_test # options: [same_as_test, from_test, sythetic]val_split_ratio: 0.5 # fraction of train/test images held out for validation (usage depends on val_split_mode)transform_config:train: nullval: nullcreate_validation_set: truetiling:apply: falsetile_size: nullstride: nullremove_border_count: 0use_random_tiling: Falserandom_tile_count: 16...metrics:image:- F1Score- AUROCpixel:- F1Score- AUROCthreshold:method: adaptive #options: [adaptive, manual]manual_image: nullmanual_pixel: nullStep 5: 训练 python tools/train.py --config custom_padim.yamlStep 6: 可视化 6-1 Logging and Experiment Management Anomalib提供了几种记录和跟踪实验的方式。这些可以单独或组合使用。 如要选择保存预测图像的结果请将配置文件中可视化部分的log_images参数更改为true。 results └── padim└── Hazelnut_toy├── images│ ├── colour│ │ ├── 00.jpg│ │ ├── 01.jpg│ │ └── ...│ └── good│ ├── 00.jpg│ ├── 01.jpg│ └── ...└── weights└── model.ckpt6-2 Logging to Tensorboard and/or WB 要使用TensorBoard和/或WB记录器和/或Comet记录器请确保在配置文件的日志部分将logger参数设置为comet、tensorboard、wandb或[tensorboardwandb]。下图显示了保存到TensorBoard的示例配置。 visualization:show_images: False # show images on the screensave_images: False # save images to the file systemlog_images: True # log images to the available loggers (if any)image_save_path: null # path to which images will be savedmode: full # options: [full, simple]logging:logger: [comet, tensorboard, wandb] #Choose any combination of these 3log_graph: false
http://www.yutouwan.com/news/108704/

相关文章:

  • 怎样免费个人网站建设域名怎么建设网站
  • 广州公司网站设计制作公司网站开发类属什么费用
  • 网站建设必备条件seo电商
  • 在线学做衣服 的网站官方网站的优势
  • 标签化网站网站开发行业竞争大吗
  • 东莞网站建设规范广东建设工程信息网官网证书查询
  • 怎么做购物平台网站哪里有网站建设加盟合作
  • 不属于网站建设方式的是学校网站做等级保护
  • 平凉市网站建设网站链接网址怎么做
  • 海南综合网站两学一做电视夜校新手做网站如何赚钱
  • 开发门户网站一家公司为什么要建官方网站
  • 口腔医院网站建设用flash做的网站展示
  • 网站建设怎么做账会计zhihu网站建设
  • 绿化信息网站建设网站登陆怎么做
  • 网站首页的功能中等职业学校网站建设模块
  • 网站销售都怎么做的深圳市房地产信息网查询系统
  • 商城移动端网站开发网站建设技术支持祥云平台
  • 花瓣按照哪个网站做的友情链接互换网站
  • 网站怎么集成支付宝如何自已建网站
  • 做传媒网站公司名称学生网站开发大赛
  • 制作一个交易平台网站南京网站建设服务
  • 电商网站介绍dw做旅游网站毕业设计模板下载
  • 成都网站建设 木木科技深圳网络营销渠道
  • 给个龙做罗拉的网站建设一个网站需要做哪些事情
  • 商城网站建站系统自己动手建设网站
  • 网站设计设计方案app网站建设手机APP软件开发
  • 广西电力工程建设有限公司网站宾果 wordpress
  • 针对不同网站的cdn加速模板之家官网手机模板
  • 专门做网站的公司交什么青岛品牌设计
  • 网站建设和优化内容最重要性wordpress旋转音乐