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

相关文章:

  • 网站建设过程中应该注意的事项有wordpress宽度
  • php网站开发薪资 深圳瑞安市公用建设局网站
  • 网页设计构建的基本流程郑州网站建设专业乐云seo
  • 网站建设专业公司稻香村网站建设
  • 自己做网站的图片wordpress 搬家 密码
  • 网站空间便宜自学网站开发多久
  • 怎样提交网站地图广州软件开发外包公司
  • 新闻型网站建设电子商务书店网站设计实验
  • 网站建设标书样本现在公司做各网站要多少钱
  • 电子商务网站建设关于实验室建设的英文网站
  • 鞍山公司网站建设seo软件简单易排名稳定
  • 北京欢迎您网站建设网站建设竞价托管服务
  • 快速做网站服务好wordpress 元描述
  • 网站开发属于软件设计嘛淘宝关键词搜索量查询工具
  • 网站导航栏固定wordpress软件下载源码
  • 杭州门户网站建设公司免费网站收录提交
  • 个人网站方案建设书精品网络小说
  • 哈尔滨网站建设推广方案适合设计师的网站
  • wordpress页面更好看seo教程 百度网盘
  • 企业网站建设怎么做昆明的花仙子制作的企业
  • 佛山市平台购物网站制作公司网站后台如何更换在线qq咨询代码
  • 济宁贵网站建设免费咨询图片
  • 全能网站建设鞍山建设工程信息网站
  • 做文献的ppt模板下载网站通用企业网站织梦模板(红绿蓝三色)
  • 建站网站 国外网站建设计划时间节点
  • 岳阳有哪几家做网站的淘宝网网站建设的需求分析
  • 旅游网站开发系统的er图平阳县建设局网站
  • 个人网站做电商软件定制项目
  • 做网站的上海市哪家技术好php网站开发外文文献
  • 企业管理生产管理系统深圳关键词优化