WO2023029678A1 - Gis-based agricultural service management method and system - Google Patents

Gis-based agricultural service management method and system Download PDF

Info

Publication number
WO2023029678A1
WO2023029678A1 PCT/CN2022/100110 CN2022100110W WO2023029678A1 WO 2023029678 A1 WO2023029678 A1 WO 2023029678A1 CN 2022100110 W CN2022100110 W CN 2022100110W WO 2023029678 A1 WO2023029678 A1 WO 2023029678A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
gis
basic
staff
image
Prior art date
Application number
PCT/CN2022/100110
Other languages
French (fr)
Chinese (zh)
Inventor
羌栋强
Original Assignee
江苏商贸职业学院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 江苏商贸职业学院 filed Critical 江苏商贸职业学院
Publication of WO2023029678A1 publication Critical patent/WO2023029678A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q10/1091Recording time for administrative or management purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining

Definitions

  • the invention relates to the field of computer technology, in particular to a GIS-based agricultural service management method and system.
  • GIS geographic information system
  • GIS Geographical information system
  • the mainstream 3D GIS software abroad includes: Google Earth, Skyline Globe of Skyline, Virtual Earth of Microsoft and ArcGIS series products of ESRI, etc.
  • GIS software platforms in China, such as EV-Globe of Guoyao, GeoGlobe of Wuda Gio, CityMaker of Weijing Digital City Technology, SuperMap of Beijing SuperMap, and MapGIS of Zhongdi Digital.
  • the project involves interdisciplinary research on rural construction, agricultural economy and information technology, and some difficulties inevitably arise in collaborative research.
  • the object of the present invention is to provide a GIS-based agricultural service management method and system to solve the above-mentioned problems in the prior art.
  • the embodiment of the present invention provides a GIS-based agricultural service management method, including:
  • the multi-source data includes three-dimensional scene model, BMI data, multimedia data and statistical data;
  • the surveillance video is a video of the face of staff in the farm
  • the monitoring video is detected to obtain the human face existence time;
  • the human face existence time represents the time of work;
  • the face recognition model includes a subject feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers:
  • the input of the subject feature extraction network is one of the frame surveillance images in the surveillance video; the input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the subject feature The output of the extraction network; the input of the first fully connected layer is the output of the general feature extraction network; the input of the second fully connected layer is the output of the detailed feature extraction network.
  • the GIS global map is obtained through the GIS agricultural service management structure based on multi-source data, including:
  • the GIS agricultural service management structure includes a data layer and an application layer;
  • the data layer includes a data storage server and a data analysis server;
  • the application layer includes a data statistical analysis module, a GIS global map display module and a multimedia display module;
  • Input multi-source data into the data layer perform data storage and data analysis, and obtain agricultural data
  • the input layer includes a data storage server and a data analysis server
  • the agricultural data is input into the GIS global map display module in the application layer through the public network to obtain the GIS global map;
  • the monitoring video is detected to obtain the face existence time, including:
  • the monitoring video is input into the human face detection model, and the human face detection is carried out;
  • Described people's face existence start time is the time when the current frame of surveillance video detects people's face and the previous frame does not detect people's face;
  • the face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained;
  • the information of the staff includes the name, number and corresponding face image of the staff; the work
  • the correct value of the person is 1, it means that the face recognition is correct; when the correct value of the staff member is 0, it means that the face recognition is wrong;
  • the end time of the existence of the face is the time when the current frame of the surveillance video does not detect the face and the previous frame detects the face;
  • the face existence time is obtained
  • the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
  • the training method of the face recognition model :
  • the training set includes a training picture and label data
  • the training picture includes a plurality of training groups
  • the training group includes a basic image and a comparison image
  • the label data is an equal value
  • the equal value is 1 means that the basic image and the comparison image are the same person, and when the equal value is 0, it means that the basic image and the comparison image are not the same person
  • the comparison image is the corresponding face image in the staff information
  • the basic image is input into the face recognition model to obtain the first basic feature vector;
  • the first basic feature vector represents the eigenvalue in the basic image;
  • the comparison image is input into the face recognition model to obtain a first comparison feature vector;
  • the first comparison feature vector represents a feature value in the comparison image;
  • the loss value is the loss between the similarity of the face and the equal value;
  • the similarity of the face represents the probability that the first basic feature vector and the first comparison feature vector are the same person;
  • the training is stopped to obtain a trained face recognition model.
  • the inputting the basic image into the face recognition model to obtain the first basic feature vector includes:
  • the basic detailed feature vector and the basic general feature vector are combined into a first basic feature vector.
  • the loss value is a loss between the face similarity and an equal value;
  • the face similarity indicates that the first basic feature vector and the first comparison feature vector are the same Human probability, including:
  • R is the similarity of the human face
  • x i is an element in the first basic feature vector
  • x i represents the feature value of the predicted human face
  • y i is an element in the first comparison feature vector
  • y i represents the feature value of the staff information corresponding to the face
  • n represents the number of elements of the basic detailed feature vector in the first basic feature vector
  • m represents the number of elements in the first basic feature vector
  • i represents the first basic The i-th element in the feature vector
  • the loss value is specifically calculated by the following formula:
  • Loss is the loss value
  • R j is the face similarity of one frame image of the surveillance video
  • r j is the equal value of one frame image of the surveillance video
  • K is a one-time input recognition in the training process The number of image frames
  • j represents the jth image frame.
  • the staff information includes the staff name, serial number and Corresponding to face images, including:
  • the face image in the face detection frame is input into the face recognition model to obtain the first feature vector
  • the comparison feature vector is the feature vector obtained by inputting the face recognition model of the corresponding face image in the staff information stored in the database;
  • the difference vector is a vector obtained by subtracting the comparison feature vector from the first feature vector
  • the obtaining the work trajectory based on the GIS global map includes:
  • the coordinate points of the staff are obtained; the coordinate points of the staff are the coordinate points of the current location of the staff;
  • a corresponding curve is drawn on the farm map according to the coordinate points of the staff; the curve represents the movement trajectory of the staff.
  • the embodiment of the present invention provides a GIS-based agricultural service management system, including:
  • Acquisition module obtain multi-source data; the multi-source data includes three-dimensional scene model, BMI data, multimedia data and statistical data; collect monitoring video; the monitoring video is the video of the staff faces in the farm;
  • GIS global map acquisition module based on multi-source data, through the GIS agricultural service management structure, to obtain the GIS global map;
  • Human face existence time detection module based on the human face detection model and the human face recognition model, in the GIS global map, the monitoring video is detected to obtain the human face existence time; the human face existence time represents the working time.
  • Trajectory acquisition module based on the GIS global map, obtain the working trajectory
  • Storage module store the face existence time and the work track in the database
  • the face recognition model includes a subject feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers:
  • the input of the subject feature extraction network is one of the frame surveillance images in the surveillance video; the input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the subject feature The output of the extraction network; the input of the first fully connected layer is the output of the general feature extraction network; the input of the second fully connected layer is the output of the detailed feature extraction network.
  • the monitoring video is detected to obtain the face existence time, including:
  • the monitoring video is input into the human face detection model, and the human face detection is carried out;
  • Described people's face existence start time is the time when the current frame of surveillance video detects people's face and the previous frame does not detect people's face;
  • the face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained;
  • the information of the staff includes the name, number and corresponding face image of the staff; the work
  • the correct value of the person is 1, it means that the face recognition is correct; when the correct value of the staff member is 0, it means that the face recognition is wrong;
  • the end time of the existence of the face is the time when the current frame of the surveillance video does not detect the face and the previous frame detects the face;
  • the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
  • the embodiment of the present invention also provides a GIS-based agricultural service management method and system.
  • the method includes: obtaining multi-source data; the multi-source data includes a three-dimensional scene model, BMI data, multimedia data and statistical data.
  • GIS global map is obtained through GIS agricultural service management structure.
  • Collect surveillance video is a video of the faces of staff members in the farm.
  • the monitoring video is detected in the GIS global map to obtain the face existence time; the face existence time represents the working time.
  • the work trajectory is obtained.
  • the working time and the working track are stored in a database.
  • the face recognition model includes a main body feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers: the input of the main body feature extraction network is a frame of surveillance image in the surveillance video; The input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the output of the subject feature extraction network; the input of the first fully connected layer is the general feature extraction network output; the input of the second fully connected layer is the output of the detailed feature extraction network.
  • the innovation of the project lies in the development of a GIS-based refined service system for farmers with county-level supply and marketing cooperatives as nodes and provincial-level supply and marketing cooperatives as the application under the background of the rural revitalization strategy, using multi-source data fusion technology and WebGIS three-dimensional development technology And combined with the relevant theoretical knowledge of supply and marketing cooperatives serving farmers, integrating theories and technologies of different fields of disciplines, providing a new "digital supply and marketing" visual display and related function construction from multiple scenarios and multi-scales, using digital technology to support rural construction and development, and improving rural development.
  • the level of service informatization can effectively promote the important role of supply and marketing cooperatives in the development of new rural areas, and provide new theoretical basis and technical ideas for the realization of the national rural revitalization strategy.
  • the present invention adopts the method of face detection and face recognition for the workers in the farm to distinguish and calculate whether the workers leave early, arrive late, leave at last, and work for others.
  • the face detection of the present invention adopts the method of MTCNN, which can accurately detect the position of the face and obtain the frame of the face.
  • MTCNN MTCNN
  • two different convolutional layers are set to identify different features.
  • the general feature extraction network can extract general features such as facial texture
  • the detailed feature extraction network can extract complex features such as eyes.
  • the detailed feature extraction network is trained more accurately. It makes it possible to extract more accurate features and identify them through the combination of general feature extraction network and detailed feature extraction network.
  • Fig. 1 is a flowchart of a GIS-based agricultural service management method provided by an embodiment of the present invention.
  • Fig. 2 is a diagram of the training process of the face recognition module in the GIS-based agricultural service management system provided by the embodiment of the invention.
  • Fig. 3 is a schematic block diagram of an electronic device provided by an embodiment of the present invention.
  • Bus 500 Bus 500 ; receiver 501 ; processor 502 ; transmitter 503 ; memory 504 ; bus interface 505 .
  • the embodiment of the present invention provides a GIS-based agricultural service management method, the method comprising:
  • S101 Obtain multi-source data; the multi-source data includes a three-dimensional scene model, BMI data, multimedia data and statistical data.
  • S102 Obtain a GIS global map through the GIS agricultural service management structure based on multi-source data.
  • S103 Collect surveillance video.
  • the surveillance video is a video of the faces of staff members in the farm.
  • S104 Based on the face detection model and the face recognition model, detect the surveillance video in the GIS global map to obtain the face existence time.
  • the face existence time represents the working time.
  • S106 Store the working time and the working track in a database.
  • the threshold is 30s.
  • the input of the main body feature extraction network is one of the monitoring images in the monitoring video.
  • the input of the general feature extraction network is the output of the subject feature extraction network.
  • the input of the detailed feature extraction network is the output of the subject feature extraction network; the input of the first fully connected layer is the output of the general feature extraction network.
  • the input of the second fully connected layer is the output of the detailed feature extraction network.
  • Geographic Information System Geographic Information System or Geo-Information system, GIS
  • GIS Geographic Information System
  • Geo-Information system GIS
  • GIS Geographic Information System
  • It is a specific and very important spatial information system. It is a technical system that collects, stores, manages, calculates, analyzes, displays and describes the relevant geographical distribution data in the entire or part of the earth's surface (including the atmosphere) space with the support of computer hardware and software systems.
  • the subject feature extraction network in this embodiment is a partial Resnet50 residual network
  • the detailed feature extraction network includes 5 layers of convolutional network layers.
  • the general feature extraction network includes a 3-layer convolutional network layer, a residual module of the network convolutional layer, a pooling module and an activation function.
  • One of the convolutional network layers in this embodiment is shown in Table 1 below:
  • the staff sit on the tool cart to send instructions, and the tool cart can complete operations such as sowing and collecting. And the present invention is then in order to judge whether it is a staff member who works, and records the time and work track of the staff member's work simultaneously, so as to satisfy the method and system designed for the salary evaluation afterwards.
  • the method of face detection and face recognition for the staff in the farm to determine and calculate whether the staff leave early, arrive late, leave and work for others.
  • GIS Geographic Information System
  • the face detection of the present invention adopts the method of MTCNN, which can accurately detect the position of the face and obtain the frame of the face.
  • the general feature extraction network can extract general features such as facial texture
  • the detailed feature extraction network can extract complex features such as eyes.
  • the detailed feature extraction network is trained more accurately. It makes it possible to extract more accurate features and identify them through the combination of general feature extraction network and detailed feature extraction network.
  • the GIS global map is obtained through the GIS agricultural service management structure based on multi-source data, including:
  • the GIS agricultural service management structure includes a data layer and an application layer; the data layer includes a data storage server and a data analysis server; the application layer includes a data statistical analysis module, a GIS global map display module and a multimedia display module.
  • Multi-source data is input into the data layer for data storage and data analysis to obtain agricultural data;
  • the input layer includes a data storage server and a data analysis server.
  • the multi-source data is stored in the database, and then the data in the database is analyzed by the data analysis server in the data layer, and image data, terrain data, 3D spatial data models and various business data are analyzed. Integrate with each other to obtain data that can satisfy the application layer in the GIS agricultural service management structure.
  • the agricultural data is input into the GIS global map display module in the application layer through the public network to obtain the GIS global map.
  • data analysis and display can also be performed through the data statistical analysis module in the application layer of the GIS agricultural service management structure, and the multi-scale visual display of geographical information can be performed through the multimedia display module.
  • the GIS agricultural service management structure integrates image data, terrain data, three-dimensional spatial data models with various business data, realizes multi-scenario and multi-scale visual expression functions, and combines the characteristics of the supply and marketing cooperative system to realize a command Large-screen display system in the war room. Realize the functions of real-time dynamic data monitoring, customized scene roaming, emergency warning and other functions of the provincial management core. Through this system, it is possible to grasp the overall data of the territory, so that the provincial supply and marketing cooperatives can more intuitively plan and manage the county-level units, provide decision-making basis and technical reference for the decision-making department, and improve the management efficiency of the decision-making department.
  • the supply and marketing cooperatives provide technical support for the rural revitalization strategy.
  • the monitoring video is detected to obtain the face existence time, including:
  • the monitoring video is input into the face detection model for face detection.
  • the face detection frame is obtained through the MTCNN algorithm.
  • the human face existence start time is the time when the current frame of the surveillance video detects a human face and the previous frame does not detect a human face.
  • the face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained; the information of the staff includes the name, number and corresponding face image of the staff; the work
  • the correct value of the person is 1, it means that the recognized face is correct; when the correct value of the staff member is 0, it means that the recognized face is wrong.
  • the corresponding face image may be the face image on the staff member's ID card.
  • the human face existence end time is the time when no human face is detected in the current frame of the surveillance video and the human face is detected in the previous frame.
  • the face existence time is obtained.
  • C is the existence time of the human face; A is the correct value of the staff; a is the end time of the existence of the human face; b is the beginning time of the existence of the human face.
  • the existence time of the face is also 0.
  • the face existence time is calculated from the time recorded by the face detection model.
  • the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
  • the present invention adopts to detect human face and record time-recognize human face (recognize whether it is a correct human face)-detect human face (face is drawn, no human face is detected) and record time-detect human face (human face is drawn, detect human face) To the face) - the process of face recognition, it can be detected in real time that none of the faces detected later are the real faces.
  • face detection face into the picture, face detected
  • record time - face detection face out of the picture, no face detected
  • record time - face recognition take a frame to identify whether it is correct human face. It can only be used after the entire face detection process is completed, so it is not used.
  • the training method of the face recognition model :
  • the training set includes a training picture and label data
  • the training picture includes a plurality of training groups
  • the training group includes a basic image and a comparison image
  • the label data is an equal value
  • the equal value is 1
  • the equal value is 0, it means that the basic image and the comparison image are not the same person; the comparison image is the corresponding face image in the staff information.
  • the corresponding face image in the staff information may be the face image on the staff ID card.
  • the basic image Inputting the basic image into a face recognition model to obtain a first basic feature vector; the first basic feature vector represents a feature value in the basic image.
  • the comparison image Inputting the comparison image into a face recognition model to obtain a first comparison feature vector; the first comparison feature vector represents a feature value in the comparison image.
  • a loss value is obtained, and the loss value is a loss between a predicted probability that the first basic feature vector and the first comparison feature vector are the same person and an equal value in the labeled data.
  • the current number of training iterations of the face recognition model and the preset maximum number of iterations of training the face recognition model are obtained.
  • the training is stopped to obtain a trained face recognition model.
  • the number of elements in the first basic feature vector is 128, representing 128 facial features.
  • the number of elements in the first comparison feature vector is also 128.
  • the input label data corresponds to the face image and other training face images to train the neural network
  • the loss value is calculated by obtaining the degree of equality between the training face image and the label data corresponding to the face image and the equality of the labels in the label data. calculate.
  • a face recognition model that can accurately recognize faces can be trained.
  • the basic image is input into the face recognition model to obtain a first basic feature vector;
  • the first basic feature vector includes a basic detailed feature vector and a basic general feature vector, including:
  • the basic detailed feature vector and the basic general feature vector are combined into a first basic feature vector.
  • the basic detailed feature vector is [1,0.3,0.2]
  • the basic detailed feature vector is [0.9,0.5,0.2]
  • the combined first basic feature vector is [1, 0.3,0.2,0.9,0.5,0.2].
  • the general features are features that are easy to extract from the face, such as facial texture, skin color, and facial features.
  • the detailed features are features that are not easy to extract from the human face, such as features around the eyes. Therefore, by using different convolutions to extract the features that are easy to extract and the features that are not easy to extract, the features can be better extracted without losing feature information.
  • the loss value is a loss between the face similarity and an equal value;
  • the face similarity indicates that the first basic feature vector and the first comparison feature vector are the same Human probabilities, including:
  • R is the similarity of the human face
  • x i is an element in the first basic feature vector
  • x i represents the feature value of the predicted human face
  • y i is an element in the first comparison feature vector
  • y i represents the feature value of the staff information corresponding to the face
  • n represents the number of elements of the basic detailed feature vector in the first basic feature vector
  • m represents the number of elements in the first basic feature vector
  • i represents the first basic The i-th element in the feature vector
  • the elements in the first basic feature vector from subscript 0 to subscript n-1 represent the elements of the basic detailed feature vector in the first basic feature vector, and all represent the first basic feature vector from subscript n to subscript m Elements of the base general eigenvector in .
  • the elements in the first comparison feature vector from subscript 0 to subscript n-1 represent the elements of the comparison detailed feature vector in the first comparison feature vector, and from subscript n to subscript m represent elements in the first comparison feature vector Contrasting elements of general eigenvectors.
  • the loss value is specifically calculated by the following formula:
  • Loss is the loss value
  • R j is the face similarity of one frame image of the surveillance video
  • r j is the equal value of one frame image of the surveillance video
  • K is a one-time input recognition in the training process The number of image frames
  • j represents the jth image frame.
  • the number of image frames for one-time input recognition is set to 24.
  • the similarity is calculated first, and the range of the similarity is controlled at [0,1] to facilitate the calculation of the loss with the equality of the labeled data.
  • the detailed features account for a large part, which makes the training loss function more sensitive to a small part of the features that are not easy to distinguish, and increases the accuracy of face recognition.
  • the staff information includes the staff name, serial number and Corresponding to face images, including:
  • the face image in the face detection frame is input into the face recognition model to obtain the first feature vector
  • the comparison feature vector is the feature vector obtained by inputting the face recognition model of the corresponding face image in the staff information stored in the database;
  • the difference vector is a vector obtained by subtracting the comparison feature vector from the first feature vector
  • the comparison feature vectors are stored in the database, without inputting the face recognition model in the recognition process, which facilitates calculation, reduces the calculation burden, and thus reduces the calculation time.
  • the obtaining of the work trajectory based on the geographic information system includes:
  • the worker coordinate point is the coordinate point of the worker's current location.
  • the worker's coordinate point is the coordinate point returned by GPS.
  • drawing software such as arcgis, qgis, etc. to draw some farm map layers, save them as files in a specific format, or store them in the database in the form of tables.
  • the map of the farm is obtained, and the trajectory of the staff is accurately obtained.
  • the embodiment of the present invention also provides a GIS-based agricultural service management system, the system includes a collection module, a face existence time detection module and a judgment sending module
  • the collection module is used for collecting surveillance video.
  • the surveillance video is a video of the faces of staff members in the farm.
  • the face existence time detection module is used to detect the surveillance video based on the face detection model and the face recognition model to obtain the face existence time.
  • the face existence time represents the working time.
  • the trajectory acquisition module is used to obtain the work trajectory based on the geographic information system.
  • the face existence time and the work track are put into the storage module, and the storage module is used to store the face existence time and the work track in the database.
  • An embodiment of the present invention also provides an electronic device, as shown in FIG. 3 , including a memory 504, a processor 502, and a computer program stored in the memory 504 and operable on the processor 502.
  • the processor 502 executes the The above procedure is to realize the steps of any method of the above-mentioned GIS-based agricultural service management method.
  • bus 500 may include any number of interconnected buses and bridges, and bus 500 will include one or more processors represented by processor 502 and memory 504.
  • the various circuits of the memory are linked together.
  • the bus 500 may also link together various other circuits, such as peripherals, voltage regulators, and power management circuits, etc., which are well known in the art and thus will not be further described herein.
  • the bus interface 505 provides an interface between the bus 500 and the receiver 501 and the transmitter 503 .
  • Receiver 501 and transmitter 503 may be the same element, a transceiver, providing means for communicating with various other devices over a transmission medium.
  • Processor 502 is responsible for managing bus 500 and general processing, while memory 504 may be used to store data used by processor 502 in performing operations.
  • the embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of any method of the above-mentioned GIS-based agricultural service management method and all the above-mentioned the data involved.
  • modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment.
  • Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies.
  • All features disclosed in this specification including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined.
  • Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
  • the various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device according to the embodiments of the present invention.
  • the present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein.
  • Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals.
  • Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Software Systems (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Biophysics (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Agronomy & Crop Science (AREA)
  • Primary Health Care (AREA)
  • Remote Sensing (AREA)
  • Mining & Mineral Resources (AREA)
  • Operations Research (AREA)
  • Animal Husbandry (AREA)
  • Educational Administration (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)

Abstract

Disclosed in the present invention are a GIS-based agricultural service management method and system. The method comprises: obtaining multi-source data; on the basis of the multi-source data, obtaining a GIS global map by means of a GIS agricultural service management structure; acquiring a monitoring video; on the basis of a facial detection model and a facial recognition model, detecting the monitoring video in the GIS global map, so as to obtain a face existence time; obtaining a working trajectory on the basis of the GIS global map; and storing working time and the working trajectory in a database. A multi-scale GIS global map is obtained by means of fusing multi-source information, such that monitoring can be performed from multiple aspects. Different features are recognized by means of two different convolutional layers, for example, general features such as facial texture can be extracted by using a general feature extraction network, and complex features such as eyes can be extracted by using a detailed feature extraction network; and the detailed feature extraction network can be trained more accurately. Therefore, more accurate features are extracted by means of combining the general feature extraction network and the detailed feature extraction network, and are recognized.

Description

基于GIS的农业服务管理方法及***GIS-based Agricultural Service Management Method and System 技术领域technical field
本发明涉及计算机技术领域,具体而言,涉及基于GIS的农业服务管理方法和***。The invention relates to the field of computer technology, in particular to a GIS-based agricultural service management method and system.
背景技术Background technique
党的十九大报告明确提出了加快实施乡村振兴战略,这是对新时代“三农”工作方向做出的重要战略部署,该战略首次被写入了党章,这是***国务院着眼于全面发展和建成现代化小康社会、向中国特色***和现代化强国目标迈进所作出的战略性部署。然而,现阶段我国在乡村基础设施投入方面还相对滞后、产业融合发展较为薄弱,生态环境问题比较突出。在这一新形势下,供销合作社的发展面临着难得的机遇和新的挑战,本项目结合供销合作社正在深入开展的农村综合社会服务体制改革,就如何整合和充分发挥供销合作社自身独特的资源优势,更好的实施和服务国家乡村经济振兴战略进行了探索与思考。通过结合地理信息***(GIS),研究为农综合服务可视化技术及空间数据分析,围绕为农精细化服务平台功能实现开发展开工作,设计并实现基于GIS的为农精细化服务***,为供销合作社更好的为农服务提供基础服务平台。The report of the Nineteenth National Congress of the Communist Party of China clearly put forward the strategy of accelerating the implementation of the rural revitalization strategy, which is an important strategic deployment for the direction of "three rural" work in the new era. It is a strategic deployment to develop and build a modern well-off society, and move towards the goal of socialism with Chinese characteristics and a modernized power. However, at this stage, my country's investment in rural infrastructure is still relatively lagging behind, the development of industrial integration is relatively weak, and ecological and environmental problems are relatively prominent. Under this new situation, the development of supply and marketing cooperatives is facing rare opportunities and new challenges. This project combines the reform of the rural comprehensive social service system that supply and marketing cooperatives are carrying out in depth. How to integrate and give full play to the unique resource advantages of supply and marketing cooperatives , to better implement and serve the national rural economic revitalization strategy to explore and think. By combining the geographic information system (GIS), researching the visualization technology and spatial data analysis of comprehensive services for agriculture, and working around the realization of the functions of the refined service platform for agriculture, designing and implementing a fine service system for agriculture based on GIS, providing supply and marketing cooperatives Better provide a basic service platform for agricultural services.
地理信息***(geographical information system,GIS)是一个具有收集、储存、计算、管理、绘制、显示地理信息等诸多功能的计算机软件***是一门集地理学与空间信息科学的学科产物。主要功能为综合各种图形信息及数据信息并进行分析。该***由多个用于输入、编辑、管理空间地理数据和非空间地理数据的软件工具组成,能够合理并高效地储存和管理大量管理领域,目前已广泛应用于资源、环境、国防、农业、卫生、城市及社区规划、地图绘制等领域。国外主流的三维GIS软件包括:谷歌Google Earth、Skyline的Skyline Globe、微软的Virtual Earth和ESRI的ArcGIS系列产品等。Geographical information system (GIS) is a computer software system with many functions such as collecting, storing, calculating, managing, drawing, and displaying geographic information. It is a discipline product of geography and spatial information science. The main function is to synthesize and analyze various graphic information and data information. The system consists of multiple software tools for inputting, editing, and managing spatial geographic data and non-spatial geographic data. It can reasonably and efficiently store and manage a large number of management fields. Health, urban and community planning, mapping and other fields. The mainstream 3D GIS software abroad includes: Google Earth, Skyline Globe of Skyline, Virtual Earth of Microsoft and ArcGIS series products of ESRI, etc.
国内也有许多优秀的GIS软件平台,例如:国遥的EV-Globe、武大吉奥的GeoGlobe、伟景行数字城市科技的CityMaker、北京超图的SuperMap及中地数码的MapGIS等。该项目涉及农村建设、农业经济和信息技术交叉研究,在协同研究上难免出现一些难题。There are also many excellent GIS software platforms in China, such as EV-Globe of Guoyao, GeoGlobe of Wuda Gio, CityMaker of Weijing Digital City Technology, SuperMap of Beijing SuperMap, and MapGIS of Zhongdi Digital. The project involves interdisciplinary research on rural construction, agricultural economy and information technology, and some difficulties inevitably arise in collaborative research.
在智慧农业越来越普遍的时代,智慧管理处于重要的地位,对工作人员进行管理,对农作物、农产品进行管理,最农作物设备、农产品设备进行管理等。在管理领域,需要认证管理人员的身份是常见的。比如,对农场中的工作人员进行监控检测,会出现如果有人替代操作,无法识别的情况。所以需要加上人脸识别进行识别是否为正确工作人员。一般通过卷积 记得方式提取特征,进行人脸识别。由于人脸中各个部位的特征复杂性不相同,普通人脸识别直接对整张脸进行识别,没有考虑到人脸各个部分的特征密度不同。对应详细特征和一般特征没有分别考虑进行提取,所以对于识别人脸还不够精确。In the era when smart agriculture is becoming more and more common, smart management plays an important role in managing staff, crops and agricultural products, and most crop equipment and agricultural product equipment. In the field of management, the need to authenticate the identity of managers is common. For example, when monitoring and testing the staff on the farm, if someone replaces the operation, it will not be recognized. Therefore, it is necessary to add face recognition to identify whether it is the correct staff. Generally, features are extracted by convolution and memory for face recognition. Since the feature complexity of each part of the face is different, ordinary face recognition directly recognizes the entire face without considering the different feature densities of each part of the face. The corresponding detailed features and general features are not considered separately for extraction, so it is not accurate enough for face recognition.
发明内容Contents of the invention
本发明的目的在于提供了基于GIS的农业服务管理方法和***,用以解决现有技术中存在的上述问题。The object of the present invention is to provide a GIS-based agricultural service management method and system to solve the above-mentioned problems in the prior art.
第一方面,本发明实施例提供了基于GIS的农业服务管理方法,包括:In the first aspect, the embodiment of the present invention provides a GIS-based agricultural service management method, including:
获得多源数据;所述多源数据包括三维场景模型、BMI数据、多媒体数据和统计数据;Obtain multi-source data; the multi-source data includes three-dimensional scene model, BMI data, multimedia data and statistical data;
基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图;Based on multi-source data, through the GIS agricultural service management structure, get the GIS global map;
采集监控视频;所述监控视频为存在农场中工作人员人脸的视频;Gathering surveillance video; the surveillance video is a video of the face of staff in the farm;
基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间;所述人脸存在时间表示工作的时间;Based on the human face detection model and the human face recognition model, in the GIS global map, the monitoring video is detected to obtain the human face existence time; the human face existence time represents the time of work;
基于所述GIS全局地图,得到工作轨迹;Based on the GIS global map, the work trajectory is obtained;
将所述工作时间和所述工作轨迹存储在数据库中;storing the working time and the working track in a database;
人脸识别模型包括一个主体特征提取网络、一个详细特征提取网络、一个一般特征提取网络和两个全连接层:The face recognition model includes a subject feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers:
所述主体特征提取网络的输入为监控视频中的其中一帧监控图像;所述一般特征提取网络的输入为所述主体特征提取网络的输出;所述详细特征提取网络的输入为所述主体特征提取网络的输出;第一全连接层的输入为所述一般特征提取网络的输出;第二全连接层的输入为所述详细特征提取网络的输出。The input of the subject feature extraction network is one of the frame surveillance images in the surveillance video; the input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the subject feature The output of the extraction network; the input of the first fully connected layer is the output of the general feature extraction network; the input of the second fully connected layer is the output of the detailed feature extraction network.
可选的,所述基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图,包括:Optionally, the GIS global map is obtained through the GIS agricultural service management structure based on multi-source data, including:
所述GIS农业服务管理结构包括数据层和应用层;所述数据层包括数据存储服务器和数据分析服务器;所述应用层包括数据统计分析模块、GIS全局地图展示模块和多媒体展示模块;The GIS agricultural service management structure includes a data layer and an application layer; the data layer includes a data storage server and a data analysis server; the application layer includes a data statistical analysis module, a GIS global map display module and a multimedia display module;
将多源数据输入数据层,进行数据存储和数据分析,得到农业数据;所述输入层包括数据存储服务器和数据分析服务器;Input multi-source data into the data layer, perform data storage and data analysis, and obtain agricultural data; the input layer includes a data storage server and a data analysis server;
将所述农业数据通过公网输入应用层中的GIS全局地图展示模块,得到GIS全局地图;The agricultural data is input into the GIS global map display module in the application layer through the public network to obtain the GIS global map;
可选的,所述基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频 进行检测,得到人脸存在时间,包括:Optionally, based on the face detection model and the face recognition model, in the GIS global map, the monitoring video is detected to obtain the face existence time, including:
将所述监控视频输入人脸检测模型,进行人脸检测;The monitoring video is input into the human face detection model, and the human face detection is carried out;
若检测出人脸,得到人脸检测框,并记录下人脸存在开始时间;所述人脸存在开始时间为监控视频的当前帧检测到人脸而前一帧未检测到人脸的时间;If detect people's face, obtain people's face detection frame, and record people's face existence start time; Described people's face existence start time is the time when the current frame of surveillance video detects people's face and the previous frame does not detect people's face;
将所述人脸检测框内的人脸图像输入人脸识别模型,基于工作人员信息,得到工作人员正确值;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像;所述工作人员正确值为1时表示识别人脸正确;所述工作人员正确值为0时表示识别人脸错误;The face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained; the information of the staff includes the name, number and corresponding face image of the staff; the work When the correct value of the person is 1, it means that the face recognition is correct; when the correct value of the staff member is 0, it means that the face recognition is wrong;
将所述检测视频的下一帧继续输入人脸检测模型,进行人脸检测;Continue to input the next frame of the detection video into the face detection model to perform face detection;
若未检测到人脸,记下人脸存在结束时间;所述人脸存在结束时间为监控视频的当前帧未检测到人脸而前一帧检测到人脸的时间;If no face is detected, write down the end time of the existence of the face; the end time of the existence of the face is the time when the current frame of the surveillance video does not detect the face and the previous frame detects the face;
基于所述工作人员正确值和在GIS全局地图,得到人脸存在时间;Based on the correct value of the staff member and the GIS global map, the face existence time is obtained;
通过检测监控图像中每一帧的人脸,得到多个人脸存在时间,直到工作结束时间;将多个人脸存在时间相加,得到人脸检测存在时间。By detecting the faces of each frame in the surveillance image, the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
可选的,人脸识别模型的训练方法:Optional, the training method of the face recognition model:
获得训练集,所述训练集包括训练图片和标注数据,所述训练图片包括多个训练组;所述训练组包括基本图像和对比图像;所述标注数据为相等值;所述相等值为1时表示所述基本图像和对比图像为同一个人,所述相等值为0时表示所述基本图像和对比图像不为同一个人;所述对比图像为所述工作人员信息中的对应人脸图像;Obtain a training set, the training set includes a training picture and label data, the training picture includes a plurality of training groups; the training group includes a basic image and a comparison image; the label data is an equal value; the equal value is 1 means that the basic image and the comparison image are the same person, and when the equal value is 0, it means that the basic image and the comparison image are not the same person; the comparison image is the corresponding face image in the staff information;
将所述基本图像输入人脸识别模型,得到第一基本特征向量;所述第一基本特征向量表示基本图像中的特征值;The basic image is input into the face recognition model to obtain the first basic feature vector; the first basic feature vector represents the eigenvalue in the basic image;
将所述对比图像输入人脸识别模型,得到第一对比特征向量;所述第一对比特征向量表示对比图像中的特征值;The comparison image is input into the face recognition model to obtain a first comparison feature vector; the first comparison feature vector represents a feature value in the comparison image;
获得损失值,所述损失值为人脸相似度与相等值之间的损失;所述人脸相似度表示所述第一基本特征向量和所述第一对比特征向量为同一人的概率;Obtain a loss value, the loss value is the loss between the similarity of the face and the equal value; the similarity of the face represents the probability that the first basic feature vector and the first comparison feature vector are the same person;
获得人脸识别模型当前的训练迭代次数以及预先设定的所述人脸识别模型训练的最大迭代次数;Obtain the current number of training iterations of the face recognition model and the preset maximum number of iterations of the training of the face recognition model;
当所述损失值小于或等于阈值或训练迭代次数达到所述最大迭代次数时停止训练,得到训练好的人脸识别模型。When the loss value is less than or equal to the threshold or the number of training iterations reaches the maximum number of iterations, the training is stopped to obtain a trained face recognition model.
可选的,所述将所述基本图像输入人脸识别模型,得到第一基本特征向量,包括:Optionally, the inputting the basic image into the face recognition model to obtain the first basic feature vector includes:
将所述基本图像输入所述主体特征提取网络,进行特征提取,得到基本主体卷积特征图;Inputting the basic image into the main body feature extraction network, performing feature extraction, and obtaining the basic main body convolution feature map;
将所述基本主体卷积特征图输入详细特征提取网络,进行特征提取,得到基本详细特征图;Inputting the basic main body convolution feature map into the detailed feature extraction network, performing feature extraction, and obtaining the basic detailed feature map;
将所属将所述基本主体卷积特征图输入一般特征提取网络,进行特征提取,得到基本一般特征图;Input the basic subject convolution feature map into the general feature extraction network, perform feature extraction, and obtain the basic general feature map;
将所述基本详细特征图输入第一全连接层,得到基本详细特征向量;Input the basic detailed feature map into the first fully connected layer to obtain the basic detailed feature vector;
将所述基本一般特征图输入第二全连接层,得到基本一般特征向量;Inputting the basic general feature map into the second fully connected layer to obtain the basic general feature vector;
将所述基本详细特征向量和所述基本一般特征向量合并为第一基本特征向量。The basic detailed feature vector and the basic general feature vector are combined into a first basic feature vector.
可选的,所述获得损失值,所述损失值为人脸相似度与相等值之间的损失;所述人脸相似度表示所述第一基本特征向量和所述第一对比特征向量为同一人的概率,包括:Optionally, the obtaining a loss value, the loss value is a loss between the face similarity and an equal value; the face similarity indicates that the first basic feature vector and the first comparison feature vector are the same Human probability, including:
获得为人脸相似度;Obtained as face similarity;
所述人脸相似度具体通过下述公式计算方式获得:Described human face similarity is specifically obtained by the calculation method of the following formula:
Figure PCTCN2022100110-appb-000001
Figure PCTCN2022100110-appb-000001
其中,R为所述人脸相似度;x i为所述第一基本特征向量中的元素,x i表示预测人脸的特征值;y i为所述第一对比特征向量中的元素,y i表示工作人员信息对应人脸的特征值;n表示第一基本特征向量中的基本详细特征向量的元素个数;m表示所述第一基本特征向量中的元素个数;i表示第一基本特征向量中第i元素; Wherein, R is the similarity of the human face; x i is an element in the first basic feature vector, and x i represents the feature value of the predicted human face; y i is an element in the first comparison feature vector, y i represents the feature value of the staff information corresponding to the face; n represents the number of elements of the basic detailed feature vector in the first basic feature vector; m represents the number of elements in the first basic feature vector; i represents the first basic The i-th element in the feature vector;
所述损失值具体通过下述公式计算方式获得:The loss value is specifically calculated by the following formula:
Figure PCTCN2022100110-appb-000002
Figure PCTCN2022100110-appb-000002
其中,Loss为所述损失值;R j为所述监控视频其中一帧图像的人脸相似度;r j为所述监控视频其中一帧图像的相等值;K为训练过程中一次性输入识别的图像帧数量;j表示第j张图像帧。 Wherein, Loss is the loss value; R j is the face similarity of one frame image of the surveillance video; r j is the equal value of one frame image of the surveillance video; K is a one-time input recognition in the training process The number of image frames; j represents the jth image frame.
可选的,所述将所述人脸检测框内的人脸图像放入人脸识别模型,基于工作人员信息,判断是否为正确工作人员;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像,包括:Optionally, putting the face image in the face detection frame into the face recognition model, and judging whether it is a correct staff member based on the staff information; the staff information includes the staff name, serial number and Corresponding to face images, including:
所述人脸检测框内的人脸图像输入人脸识别模型,得到第一特征向量;The face image in the face detection frame is input into the face recognition model to obtain the first feature vector;
获得对比特征向量;所述对比特征向量为存储在数据库中的工作人员信息中的对应人脸图像输入人脸识别模型得到的特征向量;Obtain a comparison feature vector; the comparison feature vector is the feature vector obtained by inputting the face recognition model of the corresponding face image in the staff information stored in the database;
获得差值向量;所述差值向量为第一特征向量减去所述对比特征向量得到的向量;Obtaining a difference vector; the difference vector is a vector obtained by subtracting the comparison feature vector from the first feature vector;
若所述差值向量中所有元素的绝对值小于阈值,则说明为正确工作人员。If the absolute values of all the elements in the difference vector are smaller than the threshold, it means that the worker is correct.
可选的,所述基于所述GIS全局地图,得到工作轨迹,包括:Optionally, the obtaining the work trajectory based on the GIS global map includes:
基于所述GIS全局地图,得到工作人员坐标点;所述工作人员坐标点为工作人员当前所在位置的坐标点;Based on the GIS global map, the coordinate points of the staff are obtained; the coordinate points of the staff are the coordinate points of the current location of the staff;
根据所述工作人员坐标点在农场地图上绘制相应曲线;所述曲线表示工作人员行动轨迹。A corresponding curve is drawn on the farm map according to the coordinate points of the staff; the curve represents the movement trajectory of the staff.
第二方面,本发明实施例提供了基于GIS的农业服务管理***,包括:In the second aspect, the embodiment of the present invention provides a GIS-based agricultural service management system, including:
采集模块:获得多源数据;所述多源数据包括三维场景模型、BMI数据、多媒体数据和统计数据;采集监控视频;所述监控视频为存在农场中工作人员人脸的视频;Acquisition module: obtain multi-source data; the multi-source data includes three-dimensional scene model, BMI data, multimedia data and statistical data; collect monitoring video; the monitoring video is the video of the staff faces in the farm;
GIS全局地图获取模块:基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图;GIS global map acquisition module: based on multi-source data, through the GIS agricultural service management structure, to obtain the GIS global map;
人脸存在时间检测模块:基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间;所述人脸存在时间表示工作的时间。Human face existence time detection module: based on the human face detection model and the human face recognition model, in the GIS global map, the monitoring video is detected to obtain the human face existence time; the human face existence time represents the working time.
轨迹获取模块:基于所述GIS全局地图,得到工作轨迹;Trajectory acquisition module: based on the GIS global map, obtain the working trajectory;
存储模块:将所述人脸存在时间和所述工作轨迹存储在数据库中;Storage module: store the face existence time and the work track in the database;
人脸识别模型包括一个主体特征提取网络、一个详细特征提取网络、一个一般特征提取网络和两个全连接层:The face recognition model includes a subject feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers:
所述主体特征提取网络的输入为监控视频中的其中一帧监控图像;所述一般特征提取网络的输入为所述主体特征提取网络的输出;所述详细特征提取网络的输入为所述主体特征提取网络的输出;第一全连接层的输入为所述一般特征提取网络的输出;第二全连接层的输入为所述详细特征提取网络的输出。The input of the subject feature extraction network is one of the frame surveillance images in the surveillance video; the input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the subject feature The output of the extraction network; the input of the first fully connected layer is the output of the general feature extraction network; the input of the second fully connected layer is the output of the detailed feature extraction network.
可选的,所述基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间,包括:Optionally, based on the face detection model and face recognition model, in the GIS global map, the monitoring video is detected to obtain the face existence time, including:
将所述监控视频输入人脸检测模型,进行人脸检测;The monitoring video is input into the human face detection model, and the human face detection is carried out;
若检测出人脸,得到人脸检测框,并记录下人脸存在开始时间;所述人脸存在开始时间为监控视频的当前帧检测到人脸而前一帧未检测到人脸的时间;If detect people's face, obtain people's face detection frame, and record people's face existence start time; Described people's face existence start time is the time when the current frame of surveillance video detects people's face and the previous frame does not detect people's face;
将所述人脸检测框内的人脸图像输入人脸识别模型,基于工作人员信息,得到工作人员正确值;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像;所述工作人员正确值为1时表示识别人脸正确;所述工作人员正确值为0时表示识别人脸错误;The face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained; the information of the staff includes the name, number and corresponding face image of the staff; the work When the correct value of the person is 1, it means that the face recognition is correct; when the correct value of the staff member is 0, it means that the face recognition is wrong;
将所述检测视频的下一帧继续输入人脸检测模型,进行人脸检测;Continue to input the next frame of the detection video into the face detection model to perform face detection;
若未检测到人脸,记下人脸存在结束时间;所述人脸存在结束时间为监控视频的当前帧未检测到人脸而前一帧检测到人脸的时间;If no face is detected, write down the end time of the existence of the face; the end time of the existence of the face is the time when the current frame of the surveillance video does not detect the face and the previous frame detects the face;
基于所述工作人员正确值,在GIS全局地图中,得到人脸存在时间;Based on the correct value of the staff member, in the GIS global map, the face existence time is obtained;
通过检测监控图像中每一帧的人脸,得到多个人脸存在时间,直到工作结束时间;将多个人脸存在时间相加,得到人脸检测存在时间。By detecting the faces of each frame in the surveillance image, the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
相较于现有技术,本发明实施例达到了以下有益效果:Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects:
本发明实施例还提供了基于GIS的农业服务管理方法和***,所述方法包括:获得多源数据;所述多源数据包括三维场景模型、BMI数据、多媒体数据和统计数据。基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图。采集监控视频;所述监控视频为存在农场中工作人员人脸的视频。基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间;所述人脸存在时间表示工作的时间。基于所述GIS全局地图,得到工作轨迹。将所述工作时间和所述工作轨迹存储在数据库中。人脸识别模型包括一个主体特征提取网络、一个详细特征提取网络、一个一般特征提取网络和两个全连接层:所述主体特征提取网络的输入为监控视频中的其中一帧监控图像;所述一般特征提取网络的输入为所述主体特征提取网络的输出;所述详细特征提取网络的输入为所述主体特征提取网络的输出;所述第一全连接层的输入为所述一般特征提取网络的输出;所述第二全连接层的输入为所述详细特征提取网络的输出。The embodiment of the present invention also provides a GIS-based agricultural service management method and system. The method includes: obtaining multi-source data; the multi-source data includes a three-dimensional scene model, BMI data, multimedia data and statistical data. Based on multi-source data, GIS global map is obtained through GIS agricultural service management structure. Collect surveillance video; the surveillance video is a video of the faces of staff members in the farm. Based on the face detection model and the face recognition model, the monitoring video is detected in the GIS global map to obtain the face existence time; the face existence time represents the working time. Based on the GIS global map, the work trajectory is obtained. The working time and the working track are stored in a database. The face recognition model includes a main body feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers: the input of the main body feature extraction network is a frame of surveillance image in the surveillance video; The input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the output of the subject feature extraction network; the input of the first fully connected layer is the general feature extraction network output; the input of the second fully connected layer is the output of the detailed feature extraction network.
党的十九大提出乡村振兴战略,最有效的方案就是整合乡村优质资源配置,构建乡村治理新体系,带动各类产业共同发展。本项目就如何整合和充分发挥供销合作社自身独特的资源优势,更好的实施和服务国家乡村经济振兴战略,提出了构建基于GIS的为农精细化服务***的想法。项目的创新点在于基于乡村振兴战略的背景下,开发以县级供销合作社为节点,省级供销合作社为应用的基于GIS的为农精细化服务***,运用多源数据融合技术、WebGIS三维开发技术以及结合供销合作社为农服务的相关理论知识,整合不同领域学科的 理论与技术,从多场景多尺度提供全新“数字供销”可视化展示与相关功能构建,运用数字技术支撑乡村建设发展,提高为农服务信息化水平,有效推进供销合作社在新型乡村发展中的重要作用,为实现国家乡村振兴战略目标提供新的理论依据与技术思路。The 19th National Congress of the Communist Party of China put forward the strategy of rural revitalization. The most effective plan is to integrate the allocation of high-quality rural resources, build a new system of rural governance, and drive the common development of various industries. This project puts forward the idea of building a GIS-based fine service system for farmers on how to integrate and give full play to the unique resource advantages of the supply and marketing cooperatives, and better implement and serve the national rural economic revitalization strategy. The innovation of the project lies in the development of a GIS-based refined service system for farmers with county-level supply and marketing cooperatives as nodes and provincial-level supply and marketing cooperatives as the application under the background of the rural revitalization strategy, using multi-source data fusion technology and WebGIS three-dimensional development technology And combined with the relevant theoretical knowledge of supply and marketing cooperatives serving farmers, integrating theories and technologies of different fields of disciplines, providing a new "digital supply and marketing" visual display and related function construction from multiple scenarios and multi-scales, using digital technology to support rural construction and development, and improving rural development. The level of service informatization can effectively promote the important role of supply and marketing cooperatives in the development of new rural areas, and provide new theoretical basis and technical ideas for the realization of the national rural revitalization strategy.
本发明采用对农场中的工作人员进行人脸检测和人脸识别的方法,判别并计算工作人员是否早退、迟到、终于离开和替人工作等情况。本发明的人脸检测采用MTCNN的方法,能够精确的检测到人脸位置和得到人脸框。但是为了进行更精确的人脸识别,通过设置两个不同卷积层来识别不同的特征,如利用一般特征提取网络能提取面部纹理等一般特征,详细特征提取网络能提取眼部等复杂特征,并且通过损失函数,更加精确的训练详细特征提取网络。使得能够通过一般特征提取网络和详细特征提取网络两者结合的方式提取出更加准确的特征并进行识别。The present invention adopts the method of face detection and face recognition for the workers in the farm to distinguish and calculate whether the workers leave early, arrive late, leave at last, and work for others. The face detection of the present invention adopts the method of MTCNN, which can accurately detect the position of the face and obtain the frame of the face. However, in order to perform more accurate face recognition, two different convolutional layers are set to identify different features. For example, the general feature extraction network can extract general features such as facial texture, and the detailed feature extraction network can extract complex features such as eyes. And through the loss function, the detailed feature extraction network is trained more accurately. It makes it possible to extract more accurate features and identify them through the combination of general feature extraction network and detailed feature extraction network.
附图说明Description of drawings
图1是本发明实施例提供的基于GIS的农业服务管理方法流程图。Fig. 1 is a flowchart of a GIS-based agricultural service management method provided by an embodiment of the present invention.
图2是发明实施例提供的基于GIS的农业服务管理***中人脸识别模块的训练过程图。Fig. 2 is a diagram of the training process of the face recognition module in the GIS-based agricultural service management system provided by the embodiment of the invention.
图3是本发明实施例提供的一种电子设备的方框结构示意图。Fig. 3 is a schematic block diagram of an electronic device provided by an embodiment of the present invention.
图中标记:总线500;接收器501;处理器502;发送器503;存储器504;总线接口505。Labels in the figure: bus 500 ; receiver 501 ; processor 502 ; transmitter 503 ; memory 504 ; bus interface 505 .
具体实施方式Detailed ways
下面结合附图,对本发明作详细的说明。Below in conjunction with accompanying drawing, the present invention is described in detail.
实施例Example
如图1所示,本发明实施例提供了基于GIS的农业服务管理方法,所述方法包括:As shown in Figure 1, the embodiment of the present invention provides a GIS-based agricultural service management method, the method comprising:
S101:获得多源数据;所述多源数据包括三维场景模型、BMI数据、多媒体数据和统计数据。S101: Obtain multi-source data; the multi-source data includes a three-dimensional scene model, BMI data, multimedia data and statistical data.
S102:基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图。S102: Obtain a GIS global map through the GIS agricultural service management structure based on multi-source data.
S103:采集监控视频。所述监控视频为存在农场中工作人员人脸的视频。S103: Collect surveillance video. The surveillance video is a video of the faces of staff members in the farm.
S104:基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间。所述人脸存在时间表示工作的时间。S104: Based on the face detection model and the face recognition model, detect the surveillance video in the GIS global map to obtain the face existence time. The face existence time represents the working time.
S105:基于所述GIS全局地图,得到工作轨迹。S105: Obtain a work trajectory based on the GIS global map.
S106:将所述工作时间和所述工作轨迹存储在数据库中。S106: Store the working time and the working track in a database.
其中,所述阈值为30s。Wherein, the threshold is 30s.
所述主体特征提取网络的输入为监控视频中的其中一帧监控图像。所述一般特征提取网 络的输入为所述主体特征提取网络的输出。所述详细特征提取网络的输入为所述主体特征提取网络的输出;第一全连接层的输入为所述一般特征提取网络的输出。第二全连接层的输入为所述详细特征提取网络的输出。The input of the main body feature extraction network is one of the monitoring images in the monitoring video. The input of the general feature extraction network is the output of the subject feature extraction network. The input of the detailed feature extraction network is the output of the subject feature extraction network; the input of the first fully connected layer is the output of the general feature extraction network. The input of the second fully connected layer is the output of the detailed feature extraction network.
需要说明的是,地理信息***(Geographic Information System或Geo-Information system,GIS)有时又称为"地学信息***"。它是一种特定的十分重要的空间信息***。它是在计算机硬、软件***支持下,对整个或部分地球表层(包括大气层)空间中的有关地理分布数据进行采集、储存、管理、运算、分析、显示和描述的技术***。It should be noted that Geographic Information System (Geographic Information System or Geo-Information system, GIS) is sometimes called "geographic information system". It is a specific and very important spatial information system. It is a technical system that collects, stores, manages, calculates, analyzes, displays and describes the relevant geographical distribution data in the entire or part of the earth's surface (including the atmosphere) space with the support of computer hardware and software systems.
其中,如图2所示本实施例中主体特征提取网络为部分Resnet50残差网络,所述详细特征提取网络包括5层卷积网络层。所述一般特征提取网络包括3层卷积网络层,所述网络卷积层残差模块,池化模块和激活函数。本实施例中其中一个卷积网络层如下表1所示:Wherein, as shown in FIG. 2, the subject feature extraction network in this embodiment is a partial Resnet50 residual network, and the detailed feature extraction network includes 5 layers of convolutional network layers. The general feature extraction network includes a 3-layer convolutional network layer, a residual module of the network convolutional layer, a pooling module and an activation function. One of the convolutional network layers in this embodiment is shown in Table 1 below:
表1Table 1
Figure PCTCN2022100110-appb-000003
Figure PCTCN2022100110-appb-000003
通过上述方法,在农业中工作人员需要对作物进行播种收取的等操作,目前大多采用半自动化进行工作。工作人员坐在工具车上发送指令,工具车则能完成播种收取的等操作。而本发明则是为了判断是否工作的是工作人员,同时记录下工作人员工作的时间和工作轨迹,以满足之后的工资评定所设计的方法和***。对农场中的工作人员进行人脸检测和人脸识别的方法,判别并计算工作人员是否早退、迟到、终于离开和替人工作等情况。使用地理信息***(GIS)得到工作的轨迹。本发明的人脸检测采用MTCNN的方法,能够精确的检测到人脸位置和得到人脸框。但是为了进行更精确的人脸识别,通过设置两个不同卷积层来识别不同的特征,如利用一般特征提取网络能提取面部纹理等一般特征,详细特征提取网络能提取眼部等复杂特征,并且通过损失函数,更加精确的训练详细特征提取网络。使得能够通过一般特征提取网络和详细特征提取网络两者结合的方式提取出更加准确的特征并进行识别。Through the above method, in agriculture, workers need to perform operations such as sowing and collecting crops, and most of them currently use semi-automated work. The staff sit on the tool cart to send instructions, and the tool cart can complete operations such as sowing and collecting. And the present invention is then in order to judge whether it is a staff member who works, and records the time and work track of the staff member's work simultaneously, so as to satisfy the method and system designed for the salary evaluation afterwards. The method of face detection and face recognition for the staff in the farm, to determine and calculate whether the staff leave early, arrive late, leave and work for others. Use Geographic Information System (GIS) to get track of work. The face detection of the present invention adopts the method of MTCNN, which can accurately detect the position of the face and obtain the frame of the face. However, in order to perform more accurate face recognition, two different convolutional layers are set to identify different features. For example, the general feature extraction network can extract general features such as facial texture, and the detailed feature extraction network can extract complex features such as eyes. And through the loss function, the detailed feature extraction network is trained more accurately. It makes it possible to extract more accurate features and identify them through the combination of general feature extraction network and detailed feature extraction network.
可选的,所述基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图,包括:Optionally, the GIS global map is obtained through the GIS agricultural service management structure based on multi-source data, including:
所述GIS农业服务管理结构包括数据层和应用层;所述数据层包括数据存储服务器和数据分析服务器;所述应用层包括数据统计分析模块、GIS全局地图展示模块和多媒体展示模块。The GIS agricultural service management structure includes a data layer and an application layer; the data layer includes a data storage server and a data analysis server; the application layer includes a data statistical analysis module, a GIS global map display module and a multimedia display module.
将多源数据输入数据层,进行数据存储和数据分析,得到农业数据;所述输入层包括数 据存储服务器和数据分析服务器。Multi-source data is input into the data layer for data storage and data analysis to obtain agricultural data; the input layer includes a data storage server and a data analysis server.
其中,依据数据层中的数据存储服务器将多源数据存储在数据库中,再通过数据层中的数据分析服务器分析数据库中的数据,对影像数据、地形数据、三维空间数据模型同各类业务数据相互融合,得到能够满足GIS农业服务管理结构中应用层的数据。Among them, according to the data storage server in the data layer, the multi-source data is stored in the database, and then the data in the database is analyzed by the data analysis server in the data layer, and image data, terrain data, 3D spatial data models and various business data are analyzed. Integrate with each other to obtain data that can satisfy the application layer in the GIS agricultural service management structure.
将所述农业数据通过公网输入应用层中的GIS全局地图展示模块,得到GIS全局地图。The agricultural data is input into the GIS global map display module in the application layer through the public network to obtain the GIS global map.
其中,还可以而外通过GIS农业服务管理结构应用层中的数据统计分析模块进行数据分析展示,通过多媒体展示模块多尺度地可视化展示地理信息。Among them, data analysis and display can also be performed through the data statistical analysis module in the application layer of the GIS agricultural service management structure, and the multi-scale visual display of geographical information can be performed through the multimedia display module.
通过上述方法,所述GIS农业服务管理结构将影像数据、地形数据、三维空间数据模型同各类业务数据相互融合,实现多场景多尺度地可视化表达功能,同时结合供销合作社***特色,实现一个指挥作战室大屏显示***。实现省一级管理核心的实时动态数据监控、定制化场景漫游、突发事件预警等功能。通过该***,能够全局掌握属地各项数据情况,让省级供销合作社更为直观的对县级单位进行态规划与管理,为决策部门提供决策依据和技术参考,提高决策部门的管理效率,为供销合作社助力乡村振兴战略提供技术保障。Through the above method, the GIS agricultural service management structure integrates image data, terrain data, three-dimensional spatial data models with various business data, realizes multi-scenario and multi-scale visual expression functions, and combines the characteristics of the supply and marketing cooperative system to realize a command Large-screen display system in the war room. Realize the functions of real-time dynamic data monitoring, customized scene roaming, emergency warning and other functions of the provincial management core. Through this system, it is possible to grasp the overall data of the territory, so that the provincial supply and marketing cooperatives can more intuitively plan and manage the county-level units, provide decision-making basis and technical reference for the decision-making department, and improve the management efficiency of the decision-making department. The supply and marketing cooperatives provide technical support for the rural revitalization strategy.
可选的,所述基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间,包括:Optionally, based on the face detection model and face recognition model, in the GIS global map, the monitoring video is detected to obtain the face existence time, including:
将所述监控视频输入人脸检测模型,进行人脸检测。The monitoring video is input into the face detection model for face detection.
其中,通过MTCNN算法获得人脸检测框。Among them, the face detection frame is obtained through the MTCNN algorithm.
若检测出人脸,得到人脸检测框,并记录下人脸存在开始时间;所述人脸存在开始时间为监控视频的当前帧检测到人脸而前一帧未检测到人脸的时间。If a human face is detected, a human face detection frame is obtained, and the human face existence start time is recorded; the human face existence start time is the time when the current frame of the surveillance video detects a human face and the previous frame does not detect a human face.
将所述人脸检测框内的人脸图像输入人脸识别模型,基于工作人员信息,得到工作人员正确值;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像;所述工作人员正确值为1时表示识别人脸正确;所述工作人员正确值为0时表示识别人脸错误。The face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained; the information of the staff includes the name, number and corresponding face image of the staff; the work When the correct value of the person is 1, it means that the recognized face is correct; when the correct value of the staff member is 0, it means that the recognized face is wrong.
其中,所述对应人脸图像可以为工作人员身份证上的人脸图像。Wherein, the corresponding face image may be the face image on the staff member's ID card.
将所述检测视频的下一帧继续输入人脸检测模型,进行人脸检测。Continue to input the next frame of the detection video into the face detection model for face detection.
若未检测到人脸,记下人脸存在结束时间。所述人脸存在结束时间为监控视频的当前帧未检测到人脸而前一帧检测到人脸的时间。If no face is detected, write down the face existence end time. The human face existence end time is the time when no human face is detected in the current frame of the surveillance video and the human face is detected in the previous frame.
基于所述工作人员正确值,在GIS全局地图中,得到人脸存在时间。Based on the correct value of the worker, in the GIS global map, the face existence time is obtained.
其中,所述人脸存在时间具体通过下述公式计算方式获得:Wherein, the existence time of the human face is specifically calculated by the following formula:
C=A×(a-b)C=A×(a-b)
其中,C为所述人脸存在时间;A为所述工作人员正确值;a为所述人脸存在结束时间;b为所述人脸存在开始时间。Wherein, C is the existence time of the human face; A is the correct value of the staff; a is the end time of the existence of the human face; b is the beginning time of the existence of the human face.
其中,当工作人员正确值为0时,人脸存在时间也为0。当工作人员正确值为1时,人脸存在时间由人脸检测模型记录下来的时间计算而得。Among them, when the correct value of the staff is 0, the existence time of the face is also 0. When the correct value of the worker is 1, the face existence time is calculated from the time recorded by the face detection model.
其中,还判断工作人员是否在GIS全局地图中,若不存在,则这段时间为0。Among them, it is also judged whether the staff member is in the GIS global map, if not, the period of time is 0.
通过检测监控图像中每一帧的人脸,得到多个人脸存在时间,直到工作结束时间;将多个人脸存在时间相加,得到人脸检测存在时间。By detecting the faces of each frame in the surveillance image, the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
通过上述方法,当检测到人脸时,记录时间。因为如果有人代替操作,则需要进行人脸的出入,在人脸出入过程中,无法检测到人脸,记录时间。所以不需要在识别到不同人脸时记录时间,只需要记录下是否检测框出画的时间。本发明采用检测人脸并记录时间-识别人脸(识别是否为正确人脸)-检测人脸(人脸出画,未检测到人脸)并记录时间-检测人脸(人脸入画,检测到人脸)-识别人脸的过程,能够实时的检测出后面检测到的存在的人脸都不是本人。还有一种检测人脸(人脸入画,检测到人脸)并记录时间-检测人脸(人脸出画,未检测到人脸)并记录时间-人脸识别(取一帧识别是否为正确人脸)。就只能在整个检测人脸过程检测完之后在使用,所以不采用。With the above method, when a human face is detected, the time is recorded. Because if someone replaces the operation, it is necessary to enter and exit the face. During the process of entering and exiting the face, the face cannot be detected and the time is recorded. Therefore, there is no need to record the time when different faces are recognized, but only need to record the time when the detection frame is drawn. The present invention adopts to detect human face and record time-recognize human face (recognize whether it is a correct human face)-detect human face (face is drawn, no human face is detected) and record time-detect human face (human face is drawn, detect human face) To the face) - the process of face recognition, it can be detected in real time that none of the faces detected later are the real faces. There is also a face detection (face into the picture, face detected) and record time - face detection (face out of the picture, no face detected) and record time - face recognition (take a frame to identify whether it is correct human face). It can only be used after the entire face detection process is completed, so it is not used.
可选的,人脸识别模型的训练方法:Optional, the training method of the face recognition model:
获得训练集,所述训练集包括训练图片和标注数据,所述训练图片包括多个训练组;所述训练组包括基本图像和对比图像;所述标注数据为相等值;所述相等值为1时表示所述基本图像和对比图像为同一个人,所述相等值为0时表示所述基本图像和对比图像不为同一个人;所述对比图像为所述工作人员信息中的对应人脸图像。Obtain a training set, the training set includes a training picture and label data, the training picture includes a plurality of training groups; the training group includes a basic image and a comparison image; the label data is an equal value; the equal value is 1 When the equal value is 0, it means that the basic image and the comparison image are not the same person; the comparison image is the corresponding face image in the staff information.
其中,工作人员信息中的对应人脸图像可以为工作人员身份证上的人脸图像。Wherein, the corresponding face image in the staff information may be the face image on the staff ID card.
将所述基本图像输入人脸识别模型,得到第一基本特征向量;所述第一基本特征向量表示基本图像中的特征值。Inputting the basic image into a face recognition model to obtain a first basic feature vector; the first basic feature vector represents a feature value in the basic image.
将所述对比图像输入人脸识别模型,得到第一对比特征向量;所述第一对比特征向量表示对比图像中的特征值。Inputting the comparison image into a face recognition model to obtain a first comparison feature vector; the first comparison feature vector represents a feature value in the comparison image.
获得损失值,所述损失值为预测得到的所述第一基本特征向量和所述第一对比特征向量为同一人的概率与标注数据中的相等值之间的损失。A loss value is obtained, and the loss value is a loss between a predicted probability that the first basic feature vector and the first comparison feature vector are the same person and an equal value in the labeled data.
获得人脸识别模型当前的训练迭代次数以及预先设定的所述人脸识别模型训练的最大迭代次数。The current number of training iterations of the face recognition model and the preset maximum number of iterations of training the face recognition model are obtained.
当所述损失值小于或等于阈值或训练迭代次数达到所述最大迭代次数时停止训练,得到训练好的人脸识别模型。When the loss value is less than or equal to the threshold or the number of training iterations reaches the maximum number of iterations, the training is stopped to obtain a trained face recognition model.
其中,本实施例中,所述第一基本特征向量中的元素个数为128,表示128个人脸特征。所述第一对比特征向量中的元素个数同样为128。Wherein, in this embodiment, the number of elements in the first basic feature vector is 128, representing 128 facial features. The number of elements in the first comparison feature vector is also 128.
通过上述方法,输入标注数据对应人脸图像和其他训练人脸图像进行训练神经网络,通过得到训练人脸图像与标注数据对应人脸图像的相等程度与标注数据中标注的相等度进行损失值的计算。能够训练出一个精确识别出人脸的人脸识别模型。Through the above method, the input label data corresponds to the face image and other training face images to train the neural network, and the loss value is calculated by obtaining the degree of equality between the training face image and the label data corresponding to the face image and the equality of the labels in the label data. calculate. A face recognition model that can accurately recognize faces can be trained.
可选的,所述将所述基本图像输入人脸识别模型,得到第一基本特征向量;所述第一基本特征向量包括基本详细特征向量和基本一般特征向量,包括:Optionally, the basic image is input into the face recognition model to obtain a first basic feature vector; the first basic feature vector includes a basic detailed feature vector and a basic general feature vector, including:
将所述基本图像输入所述主体特征提取网络,进行特征提取,得到基本主体卷积特征图;Inputting the basic image into the main body feature extraction network, performing feature extraction, and obtaining the basic main body convolution feature map;
将所述基本主体卷积特征图输入详细特征提取网络,进行特征提取,得到基本详细特征图;Inputting the basic main body convolution feature map into the detailed feature extraction network, performing feature extraction, and obtaining the basic detailed feature map;
将所属将所述基本主体卷积特征图输入一般特征提取网络,进行特征提取,得到基本一般特征图;Input the basic subject convolution feature map into the general feature extraction network, perform feature extraction, and obtain the basic general feature map;
将所述基本详细特征图输入第一全连接层,得到基本详细特征向量;Input the basic detailed feature map into the first fully connected layer to obtain the basic detailed feature vector;
将所述基本一般特征图输入第二全连接层,得到基本一般特征向量;Inputting the basic general feature map into the second fully connected layer to obtain the basic general feature vector;
将所述基本详细特征向量和所述基本一般特征向量合并为第一基本特征向量。The basic detailed feature vector and the basic general feature vector are combined into a first basic feature vector.
其中,如本实施例中,所述基本详细特征向量为[1,0.3,0.2],所述基本详细特征向量为[0.9,0.5,0.2],合并后的第一基本特征向量的[1,0.3,0.2,0.9,0.5,0.2]。Wherein, as in this embodiment, the basic detailed feature vector is [1,0.3,0.2], the basic detailed feature vector is [0.9,0.5,0.2], and the combined first basic feature vector is [1, 0.3,0.2,0.9,0.5,0.2].
通过上述方法,分别通过不同的特征提取网络和全连接层,获得人脸中一般特征和详细特征,所述一般特征是人脸中容易提取的特征,如面部纹理、肤色、五官位置等特征。所述详细特征是人脸中不易提取的特征,如眼睛周围的特征等。所以通过对易提取特征和不易提取特征分别用不同的卷积进行提取,能够更好的提取特征不丢失特征信息。Through the above method, different feature extraction networks and fully connected layers are used to obtain the general features and detailed features of the face. The general features are features that are easy to extract from the face, such as facial texture, skin color, and facial features. The detailed features are features that are not easy to extract from the human face, such as features around the eyes. Therefore, by using different convolutions to extract the features that are easy to extract and the features that are not easy to extract, the features can be better extracted without losing feature information.
可选的,所述获得损失值,所述损失值为人脸相似度与相等值之间的损失;所述人脸相似度表示所述第一基本特征向量和所述第一对比特征向量为同一人的概率,包括:Optionally, the obtaining a loss value, the loss value is a loss between the face similarity and an equal value; the face similarity indicates that the first basic feature vector and the first comparison feature vector are the same Human probabilities, including:
获得为人脸相似度;Obtained as face similarity;
所述人脸相似度具体通过下述公式计算方式获得:Described human face similarity is specifically obtained by the calculation method of the following formula:
Figure PCTCN2022100110-appb-000004
Figure PCTCN2022100110-appb-000004
其中,R为所述人脸相似度;x i为所述第一基本特征向量中的元素,x i表示预测人脸的特征值;y i为所述第一对比特征向量中的元素,y i表示工作人员信息对应人脸的特征值;n表示第一基本特征向量中的基本详细特征向量的元素个数;m表示所述第一基本特征向量中的元素个数;i表示第一基本特征向量中第i元素; Wherein, R is the similarity of the human face; x i is an element in the first basic feature vector, and x i represents the feature value of the predicted human face; y i is an element in the first comparison feature vector, y i represents the feature value of the staff information corresponding to the face; n represents the number of elements of the basic detailed feature vector in the first basic feature vector; m represents the number of elements in the first basic feature vector; i represents the first basic The i-th element in the feature vector;
其中,第一基本特征向量中元素从下标0到下标n-1都表示第一基本特征向量中的基本详细特征向量的元素,从下标n到下标m都表示第一基本特征向量中的基本一般特征向量的元素。第一对比特征向量中元素从下标0到下标n-1都表示第一对比特征向量中的对比详细特征向量的元素,从下标n到下标m都表示第一对比特征向量中的对比一般特征向量的元素。Among them, the elements in the first basic feature vector from subscript 0 to subscript n-1 represent the elements of the basic detailed feature vector in the first basic feature vector, and all represent the first basic feature vector from subscript n to subscript m Elements of the base general eigenvector in . The elements in the first comparison feature vector from subscript 0 to subscript n-1 represent the elements of the comparison detailed feature vector in the first comparison feature vector, and from subscript n to subscript m represent elements in the first comparison feature vector Contrasting elements of general eigenvectors.
所述损失值具体通过下述公式计算方式获得:The loss value is specifically calculated by the following formula:
Figure PCTCN2022100110-appb-000005
Figure PCTCN2022100110-appb-000005
其中,Loss为所述损失值;R j为所述监控视频其中一帧图像的人脸相似度;r j为所述监控视频其中一帧图像的相等值;K为训练过程中一次性输入识别的图像帧数量;j表示第j张图像帧。 Wherein, Loss is the loss value; R j is the face similarity of one frame image of the surveillance video; r j is the equal value of one frame image of the surveillance video; K is a one-time input recognition in the training process The number of image frames; j represents the jth image frame.
其中,本实施例中训练过程中一次性输入识别的图像帧数量设置为24。Wherein, in the training process in this embodiment, the number of image frames for one-time input recognition is set to 24.
通过上述方法,先计算相似度,同时将相似度的范围控制在[0,1]便于之后和标注数据的相等度计算损失。在计算相似度时,详细特征占比重较大的部分,使得训练损失函数时对于小部分的不易辨别的特征更加敏感,增加了人脸识别的准确性。Through the above method, the similarity is calculated first, and the range of the similarity is controlled at [0,1] to facilitate the calculation of the loss with the equality of the labeled data. When calculating the similarity, the detailed features account for a large part, which makes the training loss function more sensitive to a small part of the features that are not easy to distinguish, and increases the accuracy of face recognition.
可选的,所述将所述人脸检测框内的人脸图像放入人脸识别模型,基于工作人员信息,判断是否为正确工作人员;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像,包括:Optionally, putting the face image in the face detection frame into the face recognition model, and judging whether it is a correct staff member based on the staff information; the staff information includes the staff name, serial number and Corresponding to face images, including:
所述人脸检测框内的人脸图像输入人脸识别模型,得到第一特征向量;The face image in the face detection frame is input into the face recognition model to obtain the first feature vector;
获得对比特征向量;所述对比特征向量为存储在数据库中的工作人员信息中的对应人脸图像输入人脸识别模型得到的特征向量;Obtain a comparison feature vector; the comparison feature vector is the feature vector obtained by inputting the face recognition model of the corresponding face image in the staff information stored in the database;
获得差值向量;所述差值向量为第一特征向量减去所述对比特征向量得到的向量;Obtaining a difference vector; the difference vector is a vector obtained by subtracting the comparison feature vector from the first feature vector;
若所述差值向量中所有元素的绝对值小于阈值,则说明为正确工作人员。If the absolute values of all the elements in the difference vector are smaller than the threshold, it means that the worker is correct.
通过上述方法,将所述对比特征向量为存储在数据库中,不用在识别过程中输入人脸识别模型,方便计算,减轻计算负担,从而减少计算时间。Through the above method, the comparison feature vectors are stored in the database, without inputting the face recognition model in the recognition process, which facilitates calculation, reduces the calculation burden, and thus reduces the calculation time.
可选的,所述基于地理信息***,得到工作轨迹,包括:Optionally, the obtaining of the work trajectory based on the geographic information system includes:
获得农场地图。Get a farm map.
获得工作人员坐标点。所述工作人员坐标点为工作人员当前所在位置的坐标点。Get worker coordinates. The worker coordinate point is the coordinate point of the worker's current location.
其中,所述工作人员坐标点为GPS传回的坐标点。Wherein, the worker's coordinate point is the coordinate point returned by GPS.
根据所述工作人员坐标点在农场地图上绘制相应曲线。Draw corresponding curves on the farm map according to the coordinate points of the staff.
其中,使用制图软件如arcgis,qgis等画好一些农场地图的图层,保存为特定格式的文件,也可以以表的形式存入数据库。工作人员经过的轨迹的坐标,在图层上画线连接各个点绘制相应曲线。Among them, use drawing software such as arcgis, qgis, etc. to draw some farm map layers, save them as files in a specific format, or store them in the database in the form of tables. The coordinates of the track that the staff passed by, draw a line on the layer to connect each point to draw the corresponding curve.
通过上述方法,基于地理信息***,得到农场的内的地图,精确的获得工作人员的轨迹。Through the above method, based on the geographic information system, the map of the farm is obtained, and the trajectory of the staff is accurately obtained.
通过上述方法,通过人脸识别常常有通过设置两个不同的提取卷积网络,准确提取出人脸特征中的容易提取的特征和不易提取的特征。通过先算得训练图像与对比图像的相似度,再来计算相似度和标注数据中相等度的损失,更加准确的训练出和能够识别出和对比图像为同一人脸的人脸图像。从而获得准确的人脸存在时间,判断出工作人员是否离开。Through the above method, through face recognition, it is often necessary to set up two different extraction convolutional networks to accurately extract the features that are easy to extract and the features that are not easy to extract from the face features. By first calculating the similarity between the training image and the comparison image, and then calculating the similarity and the loss of equality in the labeled data, it is more accurate to train and recognize the same face image as the comparison image. In this way, the accurate face existence time can be obtained, and it can be judged whether the staff has left.
基于上述的基于GIS的农业服务管理方法,本发明实施例还提供了基于GIS的农业服务管理***,所述***包括采集模块、人脸存在时间检测模块和判断发送模块Based on the above-mentioned GIS-based agricultural service management method, the embodiment of the present invention also provides a GIS-based agricultural service management system, the system includes a collection module, a face existence time detection module and a judgment sending module
采集模块用于采集监控视频。所述监控视频为存在农场中工作人员人脸的视频。The collection module is used for collecting surveillance video. The surveillance video is a video of the faces of staff members in the farm.
采集了监控视频之后,将监控视频放入人脸存在时间检测模块。人脸存在时间检测模块用于基于人脸检测模型和人脸识别模型,对所述监控视频进行检测,得到人脸存在时间。所述人脸存在时间表示工作的时间。After collecting the surveillance video, put the surveillance video into the human face existence time detection module. The face existence time detection module is used to detect the surveillance video based on the face detection model and the face recognition model to obtain the face existence time. The face existence time represents the working time.
将监控视频放入轨迹获取模块,轨迹获取模块用于基于地理信息***,得到工作轨迹。Put the monitoring video into the trajectory acquisition module, and the trajectory acquisition module is used to obtain the work trajectory based on the geographic information system.
将人脸存在时间和工作轨迹放入存储模块,存储模块用于将所述人脸存在时间和所述工作轨迹存储在数据库中。The face existence time and the work track are put into the storage module, and the storage module is used to store the face existence time and the work track in the database.
在此关于上述实施例中的***,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the system in the above embodiment, the specific manner in which each module executes operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本发明实施例还提供了一种电子设备,如图3所示,包括存储器504、处理器502及存储在存储器504上并可在处理器502上运行的计算机程序,所述处理器502执行所述程序时 实现前文所述基于GIS的农业服务管理方法的任一方法的步骤。An embodiment of the present invention also provides an electronic device, as shown in FIG. 3 , including a memory 504, a processor 502, and a computer program stored in the memory 504 and operable on the processor 502. The processor 502 executes the The above procedure is to realize the steps of any method of the above-mentioned GIS-based agricultural service management method.
其中,在图3中,总线架构(用总线500来代表),总线500可以包括任意数量的互联的总线和桥,总线500将包括由处理器502代表的一个或多个处理器和存储器504代表的存储器的各种电路链接在一起。总线500还可以将诸如***设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进进一步描述。总线接口505在总线500和接收器501和发送器503之间提供接口。接收器501和发送器503可以是同一个元件,即收发机,提供用于在传输介质上与各种其他装置通信的单元。处理器502负责管理总线500和通常的处理,而存储器504可以被用于存储处理器502在执行操作时所使用的数据。Wherein, in FIG. 3, the bus architecture (represented by bus 500), bus 500 may include any number of interconnected buses and bridges, and bus 500 will include one or more processors represented by processor 502 and memory 504. The various circuits of the memory are linked together. The bus 500 may also link together various other circuits, such as peripherals, voltage regulators, and power management circuits, etc., which are well known in the art and thus will not be further described herein. The bus interface 505 provides an interface between the bus 500 and the receiver 501 and the transmitter 503 . Receiver 501 and transmitter 503 may be the same element, a transceiver, providing means for communicating with various other devices over a transmission medium. Processor 502 is responsible for managing bus 500 and general processing, while memory 504 may be used to store data used by processor 502 in performing operations.
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现前文所述基于GIS的农业服务管理方法的任一方法的步骤以及上述的所涉及的数据。The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of any method of the above-mentioned GIS-based agricultural service management method and all the above-mentioned the data involved.
在此提供的算法和显示不与任何特定计算机、虚拟***或者其它设备固有相关。各种通用***也可以与基于在此的示教一起使用。根据上面的描述,构造这类***所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件 组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

Claims (10)

  1. 一种基于GIS的农业服务管理方法,其特征在于,包括:A GIS-based agricultural service management method, characterized in that it includes:
    获得多源数据;所述多源数据包括三维场景模型、BMI数据、多媒体数据和统计数据;Obtain multi-source data; the multi-source data includes three-dimensional scene model, BMI data, multimedia data and statistical data;
    基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图;Based on multi-source data, through the GIS agricultural service management structure, get the GIS global map;
    采集监控视频;所述监控视频为存在农场中工作人员人脸的视频;Gathering surveillance video; the surveillance video is a video of the face of staff in the farm;
    基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间;所述人脸存在时间表示工作的时间;Based on the human face detection model and the human face recognition model, in the GIS global map, the monitoring video is detected to obtain the human face existence time; the human face existence time represents the time of work;
    基于所述GIS全局地图,得到工作轨迹;Based on the GIS global map, the work trajectory is obtained;
    将所述工作时间和所述工作轨迹存储在数据库中;storing the working time and the working track in a database;
    人脸识别模型包括一个主体特征提取网络、一个详细特征提取网络、一个一般特征提取网络和两个全连接层:The face recognition model includes a subject feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers:
    所述主体特征提取网络的输入为监控视频中的其中一帧监控图像;所述一般特征提取网络的输入为所述主体特征提取网络的输出;所述详细特征提取网络的输入为所述主体特征提取网络的输出;第一全连接层的输入为所述一般特征提取网络的输出;第二全连接层的输入为所述详细特征提取网络的输出。The input of the subject feature extraction network is one of the frame surveillance images in the surveillance video; the input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the subject feature The output of the extraction network; the input of the first fully connected layer is the output of the general feature extraction network; the input of the second fully connected layer is the output of the detailed feature extraction network.
  2. 根据权利要求1所述的基于GIS的农业服务管理方法,其特征在于,所述基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图,包括:The GIS-based agricultural service management method according to claim 1, wherein said multi-source data is used to obtain a GIS global map through the GIS agricultural service management structure, including:
    所述GIS农业服务管理结构包括数据层和应用层;所述数据层包括数据存储服务器和数据分析服务器;所述应用层包括数据统计分析模块、GIS全局地图展示模块和多媒体展示模块;The GIS agricultural service management structure includes a data layer and an application layer; the data layer includes a data storage server and a data analysis server; the application layer includes a data statistical analysis module, a GIS global map display module and a multimedia display module;
    将多源数据输入数据层,进行数据存储和数据分析,得到农业数据;所述输入层包括数据存储服务器和数据分析服务器;Input multi-source data into the data layer, perform data storage and data analysis, and obtain agricultural data; the input layer includes a data storage server and a data analysis server;
    将所述农业数据通过公网输入应用层中的GIS全局地图展示模块,得到GIS全局地图;The agricultural data is input into the GIS global map display module in the application layer through the public network to obtain the GIS global map;
  3. 根据权利要求1所述的基于GIS的农业服务管理方法,其特征在于,所述基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间,包括:The GIS-based agricultural service management method according to claim 1, wherein, based on the face detection model and the face recognition model, in the GIS global map, the monitoring video is detected to obtain the face presence time, including:
    将所述监控视频输入人脸检测模型,进行人脸检测;The monitoring video is input into the human face detection model, and the human face detection is carried out;
    若检测出人脸,得到人脸检测框,并记录下人脸存在开始时间;所述人脸存在开始时间为监控视频的当前帧检测到人脸而前一帧未检测到人脸的时间;If detect people's face, obtain people's face detection frame, and record people's face existence start time; Described people's face existence start time is the time when the current frame of surveillance video detects people's face and the previous frame does not detect people's face;
    将所述人脸检测框内的人脸图像输入人脸识别模型,基于工作人员信息,得到工作人员 正确值;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像;所述工作人员正确值为1时表示识别人脸正确;所述工作人员正确值为0时表示识别人脸错误;The face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained; the information of the staff includes the name, number and corresponding face image of the staff; the work When the correct value of the person is 1, it means that the face recognition is correct; when the correct value of the staff member is 0, it means that the face recognition is wrong;
    将所述检测视频的下一帧继续输入人脸检测模型,进行人脸检测;Continue to input the next frame of the detection video into the face detection model to perform face detection;
    若未检测到人脸,记下人脸存在结束时间;所述人脸存在结束时间为监控视频的当前帧未检测到人脸而前一帧检测到人脸的时间;If no face is detected, write down the end time of the existence of the face; the end time of the existence of the face is the time when the current frame of the surveillance video does not detect the face and the previous frame detects the face;
    基于所述工作人员正确值和在GIS全局地图,得到人脸存在时间;Based on the correct value of the staff member and the GIS global map, the face existence time is obtained;
    通过检测监控图像中每一帧的人脸,得到多个人脸存在时间,直到工作结束时间;将多个人脸存在时间相加,得到人脸检测存在时间。By detecting the faces of each frame in the surveillance image, the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
  4. 根据权利要求1所述的基于GIS的农业服务管理方法,其特征在于,人脸识别模型的训练方法:The GIS-based agricultural service management method according to claim 1, wherein the training method of the face recognition model:
    获得训练集,所述训练集包括训练图片和标注数据,所述训练图片包括多个训练组;所述训练组包括基本图像和对比图像;所述标注数据为相等值;所述相等值为1时表示所述基本图像和对比图像为同一个人,所述相等值为0时表示所述基本图像和对比图像不为同一个人;所述对比图像为所述工作人员信息中的对应人脸图像;Obtain a training set, the training set includes a training picture and label data, the training picture includes a plurality of training groups; the training group includes a basic image and a comparison image; the label data is an equal value; the equal value is 1 means that the basic image and the comparison image are the same person, and when the equal value is 0, it means that the basic image and the comparison image are not the same person; the comparison image is the corresponding face image in the staff information;
    将所述基本图像输入人脸识别模型,得到第一基本特征向量;所述第一基本特征向量表示基本图像中的特征值;The basic image is input into the face recognition model to obtain the first basic feature vector; the first basic feature vector represents the eigenvalue in the basic image;
    将所述对比图像输入人脸识别模型,得到第一对比特征向量;所述第一对比特征向量表示对比图像中的特征值;The comparison image is input into the face recognition model to obtain a first comparison feature vector; the first comparison feature vector represents a feature value in the comparison image;
    获得损失值,所述损失值为人脸相似度与相等值之间的损失;所述人脸相似度表示所述第一基本特征向量和所述第一对比特征向量为同一人的概率;Obtain a loss value, the loss value is the loss between the similarity of the face and the equal value; the similarity of the face represents the probability that the first basic feature vector and the first comparison feature vector are the same person;
    获得人脸识别模型当前的训练迭代次数以及预先设定的所述人脸识别模型训练的最大迭代次数;Obtain the current number of training iterations of the face recognition model and the preset maximum number of iterations of the training of the face recognition model;
    当所述损失值小于或等于阈值或训练迭代次数达到所述最大迭代次数时停止训练,得到训练好的人脸识别模型。When the loss value is less than or equal to the threshold or the number of training iterations reaches the maximum number of iterations, the training is stopped to obtain a trained face recognition model.
  5. 根据权利要求4所述的基于GIS的农业服务管理方法,其特征在于,所述将所述基本图像输入人脸识别模型,得到第一基本特征向量,包括:The GIS-based agricultural service management method according to claim 4, wherein said inputting said basic image into a face recognition model to obtain a first basic feature vector comprises:
    将所述基本图像输入所述主体特征提取网络,进行特征提取,得到基本主体卷积特征图;Inputting the basic image into the main body feature extraction network, performing feature extraction, and obtaining the basic main body convolution feature map;
    将所述基本主体卷积特征图输入详细特征提取网络,进行特征提取,得到基本详细特征图;Inputting the basic main body convolution feature map into the detailed feature extraction network, performing feature extraction, and obtaining the basic detailed feature map;
    将所属将所述基本主体卷积特征图输入一般特征提取网络,进行特征提取,得到基本一般特征图;Input the basic subject convolution feature map into the general feature extraction network, perform feature extraction, and obtain the basic general feature map;
    将所述基本详细特征图输入第一全连接层,得到基本详细特征向量;Input the basic detailed feature map into the first fully connected layer to obtain the basic detailed feature vector;
    将所述基本一般特征图输入第二全连接层,得到基本一般特征向量;Inputting the basic general feature map into the second fully connected layer to obtain the basic general feature vector;
    将所述基本详细特征向量和所述基本一般特征向量合并为第一基本特征向量。The basic detailed feature vector and the basic general feature vector are combined into a first basic feature vector.
  6. 根据权利要求4所述的基于GIS的农业服务管理方法,其特征在于,所述获得损失值,所述损失值为人脸相似度与相等值之间的损失;所述人脸相似度表示所述第一基本特征向量和所述第一对比特征向量为同一人的概率,包括:The agricultural service management method based on GIS according to claim 4, characterized in that, said obtaining a loss value, said loss value is a loss between the face similarity and an equal value; said face similarity represents said The probability that the first basic feature vector and the first comparison feature vector are the same person includes:
    获得为人脸相似度;Obtained as face similarity;
    所述人脸相似度具体通过下述公式计算方式获得:Described human face similarity is specifically obtained by the calculation method of the following formula:
    Figure PCTCN2022100110-appb-100001
    Figure PCTCN2022100110-appb-100001
    其中,R为所述人脸相似度;x i为所述第一基本特征向量中的元素,x i表示预测人脸的特征值;y i为所述第一对比特征向量中的元素,y i表示工作人员信息对应人脸的特征值;n表示第一基本特征向量中的基本详细特征向量的元素个数;m表示所述第一基本特征向量中的元素个数;i表示第一基本特征向量中第i元素; Wherein, R is the similarity of the human face; x i is an element in the first basic feature vector, and x i represents the feature value of the predicted human face; y i is an element in the first comparison feature vector, y i represents the feature value of the staff information corresponding to the face; n represents the number of elements of the basic detailed feature vector in the first basic feature vector; m represents the number of elements in the first basic feature vector; i represents the first basic The i-th element in the feature vector;
    所述损失值具体通过下述公式计算方式获得:The loss value is specifically calculated by the following formula:
    Figure PCTCN2022100110-appb-100002
    Figure PCTCN2022100110-appb-100002
    其中,Loss为所述损失值;R j为所述监控视频其中一帧图像的人脸相似度;r j为所述监控视频其中一帧图像的相等值;K为训练过程中一次性输入识别的图像帧数量;j表示第j张图像帧。 Wherein, Loss is the loss value; R j is the face similarity of one frame image of the surveillance video; r j is the equal value of one frame image of the surveillance video; K is a one-time input recognition in the training process The number of image frames; j represents the jth image frame.
  7. 根据权利要求3所述的基于GIS的农业服务管理方法,其特征在于,所述将所述人脸检测框内的人脸图像放入人脸识别模型,基于工作人员信息,判断是否为正确工作人员;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像,包括:The GIS-based agricultural service management method according to claim 3, characterized in that, putting the face image in the face detection frame into the face recognition model, and judging whether it is a correct job based on staff information Personnel; the staff information includes the staff's name, number and corresponding face image, including:
    所述人脸检测框内的人脸图像输入人脸识别模型,得到第一特征向量;The face image in the face detection frame is input into the face recognition model to obtain the first feature vector;
    获得对比特征向量;所述对比特征向量为存储在数据库中的工作人员信息中的对应人脸 图像输入人脸识别模型得到的特征向量;Obtain a comparison feature vector; The comparison feature vector is the feature vector that the corresponding face image input face recognition model in the staff information stored in the database obtains;
    获得差值向量;所述差值向量为第一特征向量减去所述对比特征向量得到的向量;Obtaining a difference vector; the difference vector is a vector obtained by subtracting the comparison feature vector from the first feature vector;
    若所述差值向量中所有元素的绝对值小于阈值,则说明为正确工作人员。If the absolute values of all the elements in the difference vector are smaller than the threshold, it means that the worker is correct.
  8. 根据权利要求1所述的基于GIS的农业服务管理方法,其特征在于,所述基于所述GIS全局地图,得到工作轨迹,包括:The GIS-based agricultural service management method according to claim 1, wherein said obtaining a work track based on said GIS global map includes:
    基于所述GIS全局地图,得到工作人员坐标点;所述工作人员坐标点为工作人员当前所在位置的坐标点;Based on the GIS global map, the coordinate points of the staff are obtained; the coordinate points of the staff are the coordinate points of the current location of the staff;
    根据所述工作人员坐标点在农场地图上绘制相应曲线;所述曲线表示工作人员行动轨迹。A corresponding curve is drawn on the farm map according to the coordinate points of the staff; the curve represents the movement track of the staff.
  9. 基于GIS的农业服务管理***,其特征在于,包括:The GIS-based agricultural service management system is characterized in that it includes:
    采集模块:获得多源数据;所述多源数据包括三维场景模型、BMI数据、多媒体数据和统计数据;采集监控视频;所述监控视频为存在农场中工作人员人脸的视频;Acquisition module: obtain multi-source data; the multi-source data includes three-dimensional scene model, BMI data, multimedia data and statistical data; collect monitoring video; the monitoring video is the video of the staff faces in the farm;
    GIS全局地图获取模块:基于多源数据,通过GIS农业服务管理结构,得到GIS全局地图;GIS global map acquisition module: based on multi-source data, through the GIS agricultural service management structure, to obtain the GIS global map;
    人脸存在时间检测模块:基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间;所述人脸存在时间表示工作的时间。Human face existence time detection module: based on the human face detection model and the human face recognition model, in the GIS global map, the monitoring video is detected to obtain the human face existence time; the human face existence time represents the working time.
    轨迹获取模块:基于所述GIS全局地图,得到工作轨迹;Trajectory acquisition module: based on the GIS global map, obtain the working trajectory;
    存储模块:将所述人脸存在时间和所述工作轨迹存储在数据库中;Storage module: store the face existence time and the work track in the database;
    人脸识别模型包括一个主体特征提取网络、一个详细特征提取网络、一个一般特征提取网络和两个全连接层:The face recognition model includes a subject feature extraction network, a detailed feature extraction network, a general feature extraction network and two fully connected layers:
    所述主体特征提取网络的输入为监控视频中的其中一帧监控图像;所述一般特征提取网络的输入为所述主体特征提取网络的输出;所述详细特征提取网络的输入为所述主体特征提取网络的输出;第一全连接层的输入为所述一般特征提取网络的输出;第二全连接层的输入为所述详细特征提取网络的输出。The input of the subject feature extraction network is one of the frame surveillance images in the surveillance video; the input of the general feature extraction network is the output of the subject feature extraction network; the input of the detailed feature extraction network is the subject feature The output of the extraction network; the input of the first fully connected layer is the output of the general feature extraction network; the input of the second fully connected layer is the output of the detailed feature extraction network.
  10. 根据权利要求9所述的基于GIS的农业服务管理***,其特征在于,所述基于人脸检测模型和人脸识别模型,在GIS全局地图中,对所述监控视频进行检测,得到人脸存在时间,包括:The GIS-based agricultural service management system according to claim 9, wherein, based on the face detection model and the face recognition model, in the GIS global map, the monitoring video is detected to obtain the face presence time, including:
    将所述监控视频输入人脸检测模型,进行人脸检测;The monitoring video is input into the human face detection model, and the human face detection is carried out;
    若检测出人脸,得到人脸检测框,并记录下人脸存在开始时间;所述人脸存在开始时间为监控视频的当前帧检测到人脸而前一帧未检测到人脸的时间;If detect people's face, obtain people's face detection frame, and record people's face existence start time; Described people's face existence start time is the time when the current frame of surveillance video detects people's face and the previous frame does not detect people's face;
    将所述人脸检测框内的人脸图像输入人脸识别模型,基于工作人员信息,得到工作人员正确值;所述工作人员信息包括工作人员的姓名、编号和对应人脸图像;所述工作人员正确值为1时表示识别人脸正确;所述工作人员正确值为0时表示识别人脸错误;The face image in the described face detection frame is input into the face recognition model, and based on the information of the staff, the correct value of the staff is obtained; the information of the staff includes the name, number and corresponding face image of the staff; the work When the correct value of the person is 1, it means that the face recognition is correct; when the correct value of the staff is 0, it means that the face recognition is wrong;
    将所述检测视频的下一帧继续输入人脸检测模型,进行人脸检测;Continue to input the next frame of the detection video into the face detection model to perform face detection;
    若未检测到人脸,记下人脸存在结束时间;所述人脸存在结束时间为监控视频的当前帧未检测到人脸而前一帧检测到人脸的时间;If no face is detected, write down the end time of the existence of the face; the end time of the existence of the face is the time when the current frame of the surveillance video does not detect the face and the previous frame detects the face;
    基于所述工作人员正确值,在GIS全局地图中,得到人脸存在时间;Based on the correct value of the staff member, in the GIS global map, the face existence time is obtained;
    通过检测监控图像中每一帧的人脸,得到多个人脸存在时间,直到工作结束时间;将多个人脸存在时间相加,得到人脸检测存在时间。By detecting the faces of each frame in the surveillance image, the existence time of multiple faces is obtained until the end of the work; the existence time of multiple faces is added to obtain the existence time of face detection.
PCT/CN2022/100110 2022-04-06 2022-06-21 Gis-based agricultural service management method and system WO2023029678A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210354610.6 2022-04-06
CN202210354610.6A CN114937293B (en) 2022-04-06 2022-04-06 GIS-based agricultural service management method and system

Publications (1)

Publication Number Publication Date
WO2023029678A1 true WO2023029678A1 (en) 2023-03-09

Family

ID=82862417

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100110 WO2023029678A1 (en) 2022-04-06 2022-06-21 Gis-based agricultural service management method and system

Country Status (2)

Country Link
CN (1) CN114937293B (en)
WO (1) WO2023029678A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117115923A (en) * 2023-10-16 2023-11-24 罗普特科技集团股份有限公司 Intelligent agriculture personnel behavior recognition system based on image recognition algorithm

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117132883B (en) * 2023-05-08 2024-03-19 江苏商贸职业学院 GIS-based intelligent agricultural disaster discrimination method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100092045A1 (en) * 2008-10-15 2010-04-15 The Boeing Company System and method for airport mapping database automatic change detection
CN109886196A (en) * 2019-02-21 2019-06-14 中水北方勘测设计研究有限责任公司 Personnel track traceability system and method based on BIM plus GIS video monitoring
CN110580461A (en) * 2019-08-29 2019-12-17 桂林电子科技大学 Facial expression recognition algorithm combined with multilevel convolution characteristic pyramid
CN111008574A (en) * 2019-11-22 2020-04-14 智慧视通(杭州)科技发展有限公司 Key person track analysis method based on body shape recognition technology
CN112100305A (en) * 2020-09-15 2020-12-18 重庆中科云从科技有限公司 Trajectory determination method, device, equipment and medium based on multi-source data
CN112949511A (en) * 2021-03-08 2021-06-11 中国建筑一局(集团)有限公司 Construction site personnel management method based on machine learning and image recognition
CN113963399A (en) * 2021-09-09 2022-01-21 武汉众智数字技术有限公司 Personnel trajectory retrieval method and device based on multi-algorithm fusion application
CN114241556A (en) * 2021-12-13 2022-03-25 浪潮云信息技术股份公司 Non-perception face recognition attendance checking method and device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100860989B1 (en) * 2006-12-18 2008-09-30 삼성전자주식회사 Method and apparatus for calculating similarity of face image, method and apparatus for retrieving face image, and method for synthesizing face image
CN104463441A (en) * 2014-11-25 2015-03-25 国网河南省电力公司平顶山供电公司 Electric power GIS three-dimensional system model and application method thereof
CN106874347B (en) * 2016-12-26 2020-12-01 深圳市深网视界科技有限公司 Method and system for matching human body characteristics with MAC (media access control) addresses
CN111372036B (en) * 2018-12-25 2021-05-25 中国科学院深圳先进技术研究院 Video monitoring method and system
CN110069590B (en) * 2019-04-08 2023-11-24 速度科技股份有限公司 GIS-based multi-source data front end three-dimensional display method and system
CN110321958B (en) * 2019-07-08 2022-03-08 北京字节跳动网络技术有限公司 Training method of neural network model and video similarity determination method
CN111177469A (en) * 2019-12-20 2020-05-19 国久大数据有限公司 Face retrieval method and face retrieval device
CN111612820B (en) * 2020-05-15 2023-10-13 北京百度网讯科技有限公司 Multi-target tracking method, training method and device of feature extraction model
CN113064889A (en) * 2021-03-25 2021-07-02 慧图信息科技有限公司 BIM + GIS multi-source data fusion processing method and system
CN113435315A (en) * 2021-06-25 2021-09-24 哈尔滨理工大学 Expression recognition method based on double-path neural network feature aggregation
CN113688793A (en) * 2021-09-22 2021-11-23 万章敏 Training method of face model and face recognition system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100092045A1 (en) * 2008-10-15 2010-04-15 The Boeing Company System and method for airport mapping database automatic change detection
CN109886196A (en) * 2019-02-21 2019-06-14 中水北方勘测设计研究有限责任公司 Personnel track traceability system and method based on BIM plus GIS video monitoring
CN110580461A (en) * 2019-08-29 2019-12-17 桂林电子科技大学 Facial expression recognition algorithm combined with multilevel convolution characteristic pyramid
CN111008574A (en) * 2019-11-22 2020-04-14 智慧视通(杭州)科技发展有限公司 Key person track analysis method based on body shape recognition technology
CN112100305A (en) * 2020-09-15 2020-12-18 重庆中科云从科技有限公司 Trajectory determination method, device, equipment and medium based on multi-source data
CN112949511A (en) * 2021-03-08 2021-06-11 中国建筑一局(集团)有限公司 Construction site personnel management method based on machine learning and image recognition
CN113963399A (en) * 2021-09-09 2022-01-21 武汉众智数字技术有限公司 Personnel trajectory retrieval method and device based on multi-algorithm fusion application
CN114241556A (en) * 2021-12-13 2022-03-25 浪潮云信息技术股份公司 Non-perception face recognition attendance checking method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117115923A (en) * 2023-10-16 2023-11-24 罗普特科技集团股份有限公司 Intelligent agriculture personnel behavior recognition system based on image recognition algorithm
CN117115923B (en) * 2023-10-16 2023-12-22 罗普特科技集团股份有限公司 Intelligent agriculture personnel behavior recognition system based on image recognition algorithm

Also Published As

Publication number Publication date
CN114937293B (en) 2023-07-04
CN114937293A (en) 2022-08-23

Similar Documents

Publication Publication Date Title
WO2023029678A1 (en) Gis-based agricultural service management method and system
WO2020151528A1 (en) Urban land automatic identification system integrating industrial big data and building forms
Tang et al. Measuring visual quality of street space and its temporal variation: Methodology and its application in the Hutong area in Beijing
CN108596974B (en) Dynamic scene robot positioning and mapping system and method
CN108875600A (en) A kind of information of vehicles detection and tracking method, apparatus and computer storage medium based on YOLO
CN107832672A (en) A kind of pedestrian's recognition methods again that more loss functions are designed using attitude information
CN109241871A (en) A kind of public domain stream of people's tracking based on video data
CN109117745B (en) Cloud face recognition and positioning method based on building information model
CN112256815B (en) Three-dimensional planning auxiliary examination and approval system and method
CN108182218A (en) A kind of video character recognition method, system and electronic equipment based on GIS-Geographic Information System
Wang et al. Construction and application of artificial intelligence crowdsourcing map based on multi-track GPS data
CN115375857A (en) Three-dimensional scene reconstruction method, device, equipment and storage medium
CN111626971B (en) Smart city CIM real-time imaging method with image semantic perception
KR101063827B1 (en) Semi-automated Conjugated Point Pair Extraction Method for Transformation of Geometric Maps between Continuous and Digital Topographic Maps
CN111726535A (en) Smart city CIM video big data image quality control method based on vehicle perception
KR102416714B1 (en) System and method for city-scale tree mapping using 3-channel images and multiple deep learning
CN113916244A (en) Method and device for setting inspection position, electronic equipment and readable storage medium
CN108629521A (en) A kind of mapping Planning preparation system for building system suitable for rustic home
CN107436945A (en) A kind of information collecting method and system based on electronic map
He et al. Body condition scoring network based on improved YOLOX
Wang et al. [Retracted] Application of Computer Vision and Sensor Technology in Multivariate Assessment of Ecological Environment Carrying Capacity
CN111784822A (en) Smart city CIM real-time imaging method with image semantic perception
CN116152503B (en) Urban sky visible field online extraction method and system facing streetscape
Maithil et al. Semantic Segmentation of Urban Area Satellite Imagery Using DensePlusU-Net
CN115761516B (en) Method, server and storage medium for analyzing landing zone of air emergency delivery

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22862819

Country of ref document: EP

Kind code of ref document: A1