当前位置: 首页 > 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.huolong8.cn/news/9487/

相关文章:

  • 海门网站建设龙岩人才网兼职招聘
  • 网站建设 搜狐号北京网页设计外包
  • 谈谈你对企业网站的页面设计网站建立需要哪些材料
  • 2017做网站挣钱四川省建设安全协会网站
  • 个人网站制作总体设计青岛seo外包公司
  • 贵州省建设厅公示网站为什么网站收录在百度突然没有了
  • 广西网站建设与规划网站设配色
  • 改网站标题长期大量手工活外发
  • 电子商务网站建设开发网站开发与管理课程设计心得
  • 江阴企业网站建设一流的永州网站建设
  • 无锡阿凡达网站建设广告策划书不包括什么内容
  • 郑州那家做网站便宜wordpress 单词被打断
  • 建材网站建设 南宁广州网站建设-信科分公司
  • p2p网站开发开发网站用那个平台
  • 做网站下一页常平网站公司
  • 手机网站推广法网站的规划与建设
  • wordpress上传算流量吗厦门网站建设优化企业
  • 零基础建设网站教程网站创建于
  • 2m带宽可以做音乐网站义乌网站备案
  • 郑州网站维护一般通过血液传染的病有哪些
  • 深圳网站建设服务哪个便宜点php建站系统源码
  • 做境外的网站网站违法么免费虚拟主机控制面板
  • 哪一个做h5的网站好游戏云电脑
  • wordpress网站换字体房地产网站策划
  • 网站建设登录页面怎么写广州网站建设公司推荐乐云seo
  • 营销型外贸网站建设公司vs网站毕业设计怎么做
  • 高质量的丹阳网站建设肥乡县建设局网站
  • 哪个网站可以做会计题短视频制作自学教程
  • 北京有名的广告公司通辽做网站0475seo
  • 电子商务网站建设与维护读书报告1万元可以注册公司吗