# DeepLearningExampleOfTomatoLeafDiease **Repository Path**: q1957765780/deep-learning-example-of-tomato-leaf-diease ## Basic Information - **Project Name**: DeepLearningExampleOfTomatoLeafDiease - **Description**: Libtorch下的基于CNN魔改的图像识别网络,参数量达1亿 - **Primary Language**: C++ - **License**: CC0-1.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-05-02 - **Last Updated**: 2025-03-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: LibTorch, OpenCV, Deep-learning, cmake ## README # DeepLearningExampleOfTomatoLeafDiease #### 介绍 Libtorch下的基于CNN魔改的图像识别网络,参数量达1亿,经过测试准确率和准确率最高达到90%左右 #### 该深度神经网络基于的数据集 https://www.kaggle.com/datasets/luisolazo/tomato-diseases/data #### 编译所需框架 1. libtorch 2. opencv >= 3.5 #### 编译教程 1. 下载仓库中所有后缀为.txt、.cpp、.h的文件,放在同一个文件夹之中 2. 更改CMakeLists.txt中的path\\to\\your\\opencv\\lib字符串,设置该字符串为你的opencv的lib库的目录。 eg. F:\\OPENCV\\ALLBuildVersion\\opencv-4.1.0\\build\\x64\\vc14\\lib 注意:编译时请为opencv设置环境变量,否则可能出现未知错误。 3. 在文件所在目录下打开cmd,键入: ``` mkdir build && cd build cmake -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch ../CMakeLists.txt ``` 注意:1. 粘贴运行之前请将/absolute/path/to/libtorch替换为你的libtorch库所在的绝对路径。 2. 该安装教程为windows下使用cmake,VS生成工具混合编译,在编译之前请安装好相关环境。 ### 可能会问到的问题 1. 为什么没有使用教程? 代码里面的注释很详细,编译之后点击sln后缀的文件在VS中打开看源码就好了