Aluminum alloy industrial materials defect
收藏DataCite Commons2025-06-01 更新2025-01-06 收录
下载链接:
https://figshare.com/articles/dataset/Aluminum_alloy_industrial_materials_defect/27922929/1
下载链接
链接失效反馈官方服务:
资源简介:
The dataset used in this study experiment was from the preliminary competition dataset of the 2018 Guangdong Industrial Intelligent Manufacturing Big Data Intelligent Algorithm Competition organized by Tianchi Feiyue Cloud (https://tianchi.aliyun.com/competition/entrance/231682/introduction). We have selected the dataset, removing images that do not meet the requirements of our experiment. All datasets have been classified for training and testing. The image pixels are all 2560×1960. Before training, all defects need to be labeled using labelimg and saved as json files. Then, all json files are converted to txt files. Finally, the organized defect dataset is detected and classified.Description of the data and file structureThis is a project based on the YOLOv8 enhanced algorithm for aluminum defect classification and detection tasks.All code has been tested on Windows computers with Anaconda and CUDA-enabled GPUs. The following instructions allow users to run the code in this repository based on a Windows+CUDA GPU system already in use.Files and variablesFile: defeat_dataset.zip,algorithm.zip<b>Description:</b><b>Setup</b>Please follow the steps below to set up the project:<b>Download Project Repository</b>Download the project repository defeat_dataset.zip and algorithm.zip from the following location.Unzip and navigate to the project folder; it should contain a subfolder: quexian_dataset,ultralytics-main<b>Download data</b>1.Download data .defeat_dataset.zip and algorithm.zip2.Unzip the downloaded data and move the 'defeat_dataset','algorithm' folder into the project's main folder.3. Make sure that your defeat_dataset folder now contains a subfolder: quexian_dataset, and that your algorithm folder contains a subfolder within it: ultralytics-main4. Within the folder you should find various subfolders such as addquexian-13, quexian_dataset, new_dataset-13, ultralytics, examples, etc.Code/software<b>Set up the Python environment</b>1.Download and install the Anaconda.2.Once Anaconda is installed, activate the Anaconda Prompt. For Windows, click Start, search for Anaconda Prompt, and open it.3.Create a new conda environment with Python 3.8. You can name it whatever you like; for example. Enter the following command: conda create -n yolov8 python=3.84.Activate the created environment. If the name is , enter: conda activate yolov8Download and install the Visual Studio Code.Install PyTorch based on your system:For Windows/Linux users with a CUDA GPU: bash conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forgeInstall some necessary libraries:Install scikit-learn with the command: conda install anaconda scikit-learn=0.24.1Install astropy with: conda install astropy=4.2.1Install pandas using: conda install anaconda pandas=1.2.4Install Matplotlib with: conda install conda-forge matplotlib=3.5.3Install scipy by entering: conda install scipy=1.10.1<b>Code running</b>Once you have completed the setup process, follow these steps to run the code.Activate the environment that has been created and has all Python dependencies installed: if the environment name is different, replace it with the actual name.Once the environment is activated, navigate to the project folder you downloaded earlier.<b>Analysis Code</b>All analyses in the paper can be fully reproduced by running the analysis code in this folder. This folder contains the .py files used to preprocess the original dataset. the ultralytics-main folder contains the algorithms used in this experiment, with subfolders clearly indicating the roles and functions of the modules. For example, train.py is used to train the dataset and predict.py is used to test the results of the training.<b>Training Parameters</b>One of these is named train.py. This file defines default values for many hyperparameters. Note that these parameters need to be adjusted to fit your own computer; each parameter is accompanied by a comment explaining its meaning and possible parameters.Before the training, the size of the defect images was uniformly processed. The resolution was scaled from the original 2560 × 1920 to 640 × 640, the training period (epochs) was set to 200 rounds, and the number of images in each batch (batch size) was set to 32. The GPU training was specified by default, the number of workers was set to 8, and the optimization algorithm was Stochastic Gradient Descent (SGD). The learning rate was 0.01, and the weight decay was 0.0005. The mean Average Precision (mAP) measures the model in the final test.<b>Repeatability</b>For PyTorch, it's a well-known fact:There is no guarantee of fully reproducible results between PyTorch versions, individual commits, or different platforms. In addition, results may not be reproducible between CPU and GPU executions, even if the same seed is used.All results in the Analysis Notebook that involve only model evaluation are fully reproducible. However, when it comes to updating the model on the GPU, the results of model training on different machines vary.Access informationOther publicly accessible locations of the data:https://tianchi.aliyun.com/dataset/public/Data was derived from the following sources:https://tianchi.aliyun.com/dataset/140666<br>
本研究实验所用数据集,源自天池飞天云(Tianchi Feiyue Cloud)主办的2018年广东工业智能制造大数据智能算法大赛初赛数据集(https://tianchi.aliyun.com/competition/entrance/231682/introduction)。我们对该数据集进行了筛选,移除了不符合本实验要求的图像。所有数据集已完成训练集与测试集的划分。图像分辨率统一为2560×1960。训练前,需使用labelimg对所有缺陷进行标注并保存为JSON文件,随后将所有JSON文件转换为TXT文件,最终完成整理后的缺陷数据集的检测与分类任务。
**数据与文件结构说明**
本项目基于YOLOv8增强算法,用于铝制品缺陷分类与检测任务。所有代码均在搭载Anaconda与支持CUDA的GPU的Windows计算机上完成测试。以下操作指南可帮助用户在已部署Windows+CUDA GPU的系统中运行本仓库内的代码。
**文件与变量**
文件:defect_dataset.zip、algorithm.zip
**描述:**
**项目搭建**
请按照以下步骤搭建本项目:
**下载项目仓库**
从指定位置下载项目仓库defect_dataset.zip与algorithm.zip。解压并进入项目文件夹,该文件夹应包含子文件夹quexian_dataset、ultralytics-main。
**下载数据**
1. 下载数据文件defect_dataset.zip与algorithm.zip
2. 解压已下载的数据,并将`defect_dataset`、`algorithm`文件夹移动至项目主文件夹中。
3. 确保此时你的defect_dataset文件夹包含子文件夹quexian_dataset,且algorithm文件夹内包含子文件夹ultralytics-main。
4. 在该文件夹中可找到各类子文件夹,如addquexian-13、quexian_dataset、new_dataset-13、ultralytics、examples等。
**代码与软件配置**
**配置Python环境**
1. 下载并安装Anaconda。
2. 安装完成Anaconda后,激活Anaconda提示符:对于Windows系统,点击开始菜单,搜索Anaconda Prompt并打开。
3. 创建Python 3.8版本的新Conda环境,可自行命名,例如执行以下命令:
`conda create -n yolov8 python=3.8`
4. 激活已创建的环境,若环境名为yolov8,则执行:
`conda activate yolov8`
下载并安装Visual Studio Code。
根据你的系统安装PyTorch:对于搭载CUDA GPU的Windows/Linux用户,执行以下命令:
`conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge`
安装必要依赖库:
安装scikit-learn:
`conda install anaconda scikit-learn=0.24.1`
安装astropy:
`conda install astropy=4.2.1`
安装pandas:
`conda install anaconda pandas=1.2.4`
安装Matplotlib:
`conda install conda-forge matplotlib=3.5.3`
安装scipy:
`conda install scipy=1.10.1`
**代码运行**
完成项目搭建流程后,请按照以下步骤运行代码。
激活已安装所有Python依赖的创建好的环境:若环境名称不同,请替换为实际名称。
激活环境后,进入此前下载的项目文件夹。
**分析代码**
运行本文件夹内的分析代码,即可完全复现论文中的所有分析内容。该文件夹包含用于预处理原始数据集的Python脚本文件。ultralytics-main文件夹包含本实验所用的算法,其子文件夹清晰标注了各模块的角色与功能。例如,train.py用于训练数据集,predict.py用于测试训练结果。
**训练参数**
其中一个名为train.py的文件定义了多数超参数的默认值。请注意,需根据自身计算机调整这些参数,每个参数均附带注释说明其含义与可选参数范围。
训练前,需统一处理缺陷图像的尺寸:将原始分辨率2560×1920缩放至640×640。训练周期(epochs)设置为200轮,每批次图像数量(batch size)设置为32。默认指定GPU训练,工作线程数设置为8,优化算法采用随机梯度下降(Stochastic Gradient Descent, SGD),学习率为0.01,权重衰减系数为0.0005。最终测试阶段采用平均精度均值(mean Average Precision, mAP)评估模型性能。
**可复现性说明**
对于PyTorch而言,众所周知的是:不同PyTorch版本、提交版本或不同平台之间,无法保证结果完全可复现。此外,即使使用相同的随机种子,CPU与GPU执行的结果也可能无法复现。
本分析笔记本中所有仅涉及模型评估的结果均可完全复现。但当涉及GPU上的模型更新时,不同机器上的模型训练结果会存在差异。
**数据获取途径**
该数据的其他公开可访问位置:https://tianchi.aliyun.com/dataset/public/
数据源自以下来源:https://tianchi.aliyun.com/dataset/140666
提供机构:
figshare创建时间:
2024-11-28
搜集汇总
数据集介绍

背景与挑战
背景概述
该数据集包含铝合金工业材料的缺陷图像,像素为2560×1960,用于YOLOv8增强算法的缺陷分类和检测任务。数据集经过筛选和分类,包含训练和测试集,需预先标注缺陷并转换为特定格式。
以上内容由遇见数据集搜集并总结生成



