农作物病害识别

In order to mitigate the agrarian crisis in the current status quo, there is a need for better recommendation systems to alleviate the crisis by helping the farmers to make an informed decision before starting the cultivation of crops.

为了缓解当前的农业危机,需要更好的推荐系统,通过帮助农民在开始种植作物之前做出明智的决定来缓解危机。

项目重点:根据几个参数推荐农民要种植的最佳农作物,并帮助他们在种植前做出明智的决定 (Project Focus: To recommend optimum crops to be cultivated by farmers based on several parameters and help them make an informed decision before cultivation)

The major parameters considered here are:

这里考虑的主要参数是:

1. Crop name

1.作物名称

2. Sowing Time (Month)

2.播种时间(月)

3. Region

3.地区

4. Temperature - Minimum & Maximum

4.温度-最小和最大

5. Rainfall - Minimum & Maximum

5.降雨-最小和最大

6. pH value of the Soil

6.土壤的pH值

7. Soil Type

7.土壤类型

Data File Headers
数据文件头

让我们详细讨论步骤 (Let’s discuss the steps in detail)

Step 1: Data Collection

步骤1:资料收集

This was by far the most important and crucial step during the project building.

到目前为止,这是项目构建过程中最重要,最关键的一步。

Since there was no specific dataset available I had to work on building that dataset from scratch and had to choose the parameters accordingly. Additionally, I had several other parameters in mind such as Nitrogen level of Soil, Irrigation Facilities, Crop Rotation Cycle but due to data paucity was not able to take them into account.

由于没有可用的特定数据集,因此我不得不从头开始构建该数据集,并必须相应地选择参数。 另外,我还考虑了其​​他几个参数,例如土壤的氮含量,灌溉设施,作物轮作周期,但由于数据不足,无法将它们考虑在内。

The data obtained was distributed across different files such as:

获得的数据分布在不同的文件中,例如:

  1. Soil Type

    土壤类型

  2. Cash-crops

    现金作物

  3. Flower

  4. Fruit

    水果

  5. Grain

    粮食

  6. Herbs

    草药

  7. Shrubs

    灌木丛

  8. Spices

    香料

  9. Trees

    树木

  10. Vegetables

    蔬菜

  11. Average Rainfall

    平均降雨量

  12. Average Temperature

    平均温度

Step 2: Data Transformation

步骤2:资料转换

The data also had several inconsistencies since it was obtained from several different sources such as :

数据也有一些不一致之处,因为它是从以下几种不同的来源获得的:

  1. Missing Values

    缺失值

The missing values had to be removed from the dataset since they would lead to data inconsistencies and eventually to the wrong prediction.

必须从数据集中删除丢失的值,因为它们会导致数据不一致并最终导致错误的预测。

2. Spelling Aberrations

2. 拼写异常

The spellings were not consistent throughout the files and had to be normalised to a single value to improve the model accuracy.

整个文件中的拼写不一致,必须将其标准化为单个值以提高模型准确性。

3. Redundant Data

3. 冗余数据

The redundant data had to be discarded since they would not add any additional significance to the process.

冗余数据必须被丢弃,因为它们不会给流程增加任何其他意义。

The data was eventually coalesced into one dataset to ease the process of model building and computation.

最终将数据合并为一个数据集,以简化模型构建和计算过程。

Once, the data was collected the data types were checked and changes were made such as changing from String -> Integer where required.

一旦收集到数据,就检查数据类型并进行更改,例如在需要时从String-> Integer进行更改。

Also since a machine learning model works only with numbers, the string values need to be converted into numerical values. For this, I made use of Label Encoder Technique.

另外,由于机器学习模型仅适用于数字,因此需要将字符串值转换为数字值。 为此,我利用了标签编码器技术

“Label Encoder is a tool provided by Scikit Learn which helps one to encode the categorical features/variables into their numeric features. The encoder targets variables between 0 to n_classes-1 where n is the number of distinct labels.”

“标签编码器是Scikit Learn提供的一种工具,它可以帮助人们将分类特征/变量编码为数字特征。 编码器的目标变量在0到 n_classes-1 之间, 其中n是不同标签的数量。”

More can be learnt about Label Encoding by referring to the official Scikit Learn documentation here.

通过参考此处的官方Scikit Learn文档,可以了解有关标签编码的更多信息。

Step 3: Model Building

步骤3:建立模型

The model used here is: Ensemble Learning Model.

这里使用的模型是: 集成学习模型。

Okay first let us understand what ensemble learning is all about!

好吧,首先让我们了解集成学习的全部内容!

According to Wikipedia ensemble learning is stated follows :

根据维基百科的合奏学习陈述如下:

“Ensemble Learning approach uses multiple learning algorithms in statistics and machine learning to achieve greater predictive efficiency than either of the constituent learning algorithms alone might obtain.”

“集成学习方法在统计和机器学习中使用了多种学习算法,以实现比单独的任何一种组成学习算法都可实现的更高的预测效率。”

Here, I have made use of the functionality of Voting Classifier provided by Scikit Learn.

在这里,我利用了Scikit Learn提供的投票分类器的功能。

from sklearn.ensemble import VotingClassifiermodel=VotingClassifier(estimators=[('rf', random_forest),('gnb',gaussian_naive_bayes),('knn',k_nearest_neighbours), ('dt',decision_tree)  ], voting=''hard)

As seen in the above code snippet the model was built using algorithms listed below :

如上面的代码片段所示,该模型是使用以下算法构建的:

Random Forest Algorithm

随机森林算法

Gaussian Naive Bayes Algorithm

高斯朴素贝叶斯算法

K-Nearest Neighbours Algorithm

K最近邻居算法

Decision Tree Algorithm

决策树算法

Voting parameter is set to “hard” here since the model uses predicted class labels for majority rule voting.

由于模型使用预测的类别标签进行多数规则投票,因此此处的投票参数设置为“硬”。

Step 4: Deployment of the model

步骤4:模型的部署

In order to deploy the trained model for the farmers to use off, we would need an application with a simple user interface which the farmers can utilise.

为了部署经过培训的模型供农民使用,我们需要一个带有简单用户界面的应用程序,供农民使用。

Thus, here I made a simple web interface using HTML, CSS & Bootstrap.

因此,在这里,我使用HTML,CSS和Bootstrap创建了一个简单的Web界面。

The next step was to have a database to store the data for which I made use of : MongoDb

下一步是建立一个数据库来存储我使用的数据:MongoDb

Lastly, I wanted to predict the results for the obtained values from the user for which I made use of Flask framework to integrate the backend and the front end. Also,I generated the pickle file for our model to generate the predictions for the input data. Okay, so you would be wondering what is a pickle file? Let’s have a look at it as well.

最后,我想预测从用户那里获得的值的结果,我利用Flask框架为该值集成了后端和前端。 另外,我为模型生成了pickle文件,以生成输入数据的预测。 好的,您可能想知道什么是泡菜文件? 我们也来看看它。

According to the official Python documentation available at docs.python.org :

根据docs.python.org上提供的Python官方文档:

“The pickle module implements binary protocols for serialising and de-serialising a Python object structure. “Pickling” is the process whereby a Python object hierarchy is converted into a byte stream, and “unpickling” is the inverse operation, whereby a byte stream (from a binary file or bytes-like object) is converted back into an object hierarchy.”

pickle模块实现了二进制协议,用于对Python对象结构进行序列化和反序列化。 “ Pickling”是将Python对象层次结构转换为字节流的过程,而“ unpickling”是逆运算,将字节流(来自 二进制文件 类似字节的对象 )转换回对象层次结构的过程。 ”

In simple words, the pickled file converts the trained model into a byte stream and is sent to the website where it is unpickled again where it is used to train the incoming data from the farmers.

简而言之,腌制后的文件将训练后的模型转换为字节流,然后发送到网站,在该网站上再次进行腌制,然后将其用于训练来自农民的传入数据。

网站 (Website)

  • Login Page for the Farmer

    农民登录页面

The farmer needs to enter their details such as :

农民需要输入他们的详细信息,例如:

Name

名称

Email Id

电子邮件ID

Password

密码

  • Services offered

    提供的服务

Prediction

预测

Recommendation

建议

Information

信息

  • Predict now & Searching a Crop

    立即预测并搜索作物

If the farmer would like to search for more information about a specific crop the “Search Crop Section” would be there to the rescue.

如果农民想搜索有关特定作物的更多信息,则可以在“ 搜索作物部分”进行救援

It helps the farmer with detailed information about the crop for better understanding.

它可以帮助农民获得有关农作物的详细信息,以便更好地理解。

Predict Now Section

现在预测部分

The predict now takes in the following parameters for the farmer:

现在,预测将为农民提供以下参数:

Month

pH Scale

pH值

Region

地区

Soil Type

土壤类型

Additionally, 2 parameters are taken into account from the database itself accordingly to the region mentioned by the farmer

此外,根据农民自己提到的区域,从数据库本身考虑了两个参数

Temperature

温度

Rainfall

雨量

After inputting the values, the farmer can click on the “Predict Now” button.

输入值后,农民可以单击“立即预测”按钮。

The optimum Crop Name is displayed to the farmer for cultivation.

最佳作物名称显示给农民进行耕种。

实施的其他功能 (Additional Functionalities Implemented)

RSS News Feed

RSS新闻提要

Added the RSS functionality for farmers to get informative news for them to read and be updated!

为农民增加了RSS功能,以获取丰富的新闻供他们阅读和更新!

Voice Based Modelling System

基于语音的建模系统

Additionally, I have tried to implement a question-answer system model where I give a voice input as a question and I get an answer back in voice.

此外,我尝试实现一个问答系统模型,在该模型中,我以语音输入作为问题,然后以语音形式获得答案。

The system has been incorporated in the website to ease the process of the farmer for feeding in the application. The farmer just needs to click on the

农作物病害识别_FarmEasy:向农民推荐农作物变得容易相关推荐

  1. 基于深度卷积神经网络的农作物病害识别

    基于深度卷积神经网络的农作物病害识别 1.研究思路 运用深度学习的方法,基 于ResNet-50以及 InceptionV3.MobileNet等神经网络,并在这些基础结构上改进部分模型.该研 究主要 ...

  2. 基于 CNN 和迁移学习的农作物病害识别方法研究

    基于 CNN 和迁移学习的农作物病害识别方法研究 1.研究思路 采用互联网公开的 ImageNet 图像大数据集和PlantVillage 植物病害公共数据集, 以实验室的黄瓜和水稻病害数据集 AES ...

  3. 基于【EasyDL】【图像分类】实现农作物病害识别小程序

    内容.数据集来源:基于飞桨的农作物病害智能识别系统 - 飞桨AI Studio 项目背景 联合国粮食及农业组织的一份报告表明,每年农业生产的自然损失中有三分之一以上是由农业病虫害造成的,使这些成为当前 ...

  4. [病虫害识别|博士论文]面向农作物叶片病害鲁棒性识别的深度卷积神经网络研究

    文章目录 创新点: 文章中的方法 国内外现状 手工设计特征 基于深度特征学习的农作物病害识别研究 基于高阶残差的卷积神经网络的农作物病害识别 结构图: 对比方法 基于高阶残差和参数共享反馈的卷积神经网 ...

  5. 世界首个!AI农作物病害检测竞赛火热进行中 | AI Challenger 全球AI挑战赛

    乾明 发自 凹非寺 量子位 出品 | 公众号 QbitAI 如果你用谷歌搜索"AI+农业"或者"人工智能+农业",就会发现与AI在其他领域的应用相比,农业依旧是 ...

  6. 基于深度学习的农作物病虫害识别系统

    1 简介 今天向大家介绍一个帮助往届学生完成的毕业设计项目,基于深度学习的农作物病虫害识别系统. ABSTRACT 及时.准确地诊断植物病害,对于防止农业生产的损失和农产品的损失或减少具有重要作用.为 ...

  7. 计算机视觉农作物检测,基于计算机视觉的农作物病害检测系统的研究

    摘要: 农作物病害是制约农业发展的主要因素之一,准确,高效地识别病害对于保证农作物的正常生长具有重要的意义.计算机视觉技术对加速农业现代化建设,提高生产效率影响深远. 本文以农作物病害类别的检测与识别 ...

  8. 基于深度学习的农作物病虫害识别

    摘要:我国有广阔的农作物种植面积,其中病虫害对农作物产量的影响最大,当农作物得了病虫害时,其整体生理机能会大大下降从而导致植株瘦小,无法达到最优生产状态从而产量不高经济效益低.因此农民需要多关注农作物 ...

  9. 基于深度学习的农作物病害检测

    基于深度学习的农作物病害检测 1.研究思路 47 637 张图片总共 61 个分类标签.6 种模型对图像进行特征抽取. 采用交叉熵和正则化项组成损失函数进行反向传播调整,对数据集进行 4 种不同情况的 ...

最新文章

  1. python读取文件
  2. 读取CSV文件内容,将其转换成JSON字符串输出
  3. idea远程调试修改代码_使用IDEA远程调试线上代码
  4. python插件安装包_python 离线安装插件包
  5. Caffeine Cache~高性能 Java 本地缓存之王
  6. 【机器学习】Auto-Sklearn:使用 AutoML 加速你的机器学习模型
  7. [深度学习] 自然语言处理 --- Self-Attention(一) 基本介绍
  8. adobe 书签怎么设置_让我们设置一些规则…没有Adobe Analytics处理规则
  9. 值得所有设计师拥有的国内外“设计导航网站”
  10. iOS VideoToolBox decoder解码失败(-12909和-12911)问题解决
  11. CUDA 9.0安装+CUDA版本转换 + cuDNN7.1安装
  12. 2.两数相加(leetcode-2)
  13. 将 cordova-simulate 依赖项安装到扩展时出错(解决方案)
  14. 合肥宏晶微MS9334芯片特性/HDMI一分四开发板/HDMI分配器芯片/HDMI 1分4芯片
  15. 腾讯无限法则有几个服务器,腾讯《无限法则》亚服即将开测!PC配置需求公布,竟无官方中文!...
  16. 浏览器中网址访问过程详解
  17. 由多个库组成的 Android Jetpack,到底有多厉害?
  18. C语言math.h库函数中atan与atan2的区别
  19. 支付宝“刷脸支付”韩国遇冷 真相让人笑出眼泪
  20. win10中搭建并配置ftp服务器的方法(实现多用户登录整合版

热门文章

  1. java嵌套for循环基础练习 -班级平均分
  2. Semi-supervised semantic segmentation needs strong, varied perturbations
  3. 使用ffmpeg对mp3格式的音频文件类型转换、截取及合并
  4. MP地面站在飞行数据显示界面显示自己想显示的数据
  5. 给Ubuntu系统清理垃圾
  6. activiti java service task 服务任务
  7. 年前更新 阿里云冬季实战营第二期:Linux操作系统实战入
  8. 武汉大学IT职业培训
  9. ospfdr选举规则_OSPF如何选举DR/BDR规则
  10. C#中向Chart中添加数据