A zero-code system for object detection and its construction method

By designing a zero-code system, the problem of high technical thresholds for small and medium-sized enterprises and scientific researchers in the implementation of AI has been solved, and the AI ​​development and application of zero-code in the whole process has been realized, and the cost has been reduced. It is suitable for target detection, image content retrieval, security monitoring and industrial quality inspection and other scenarios.

CN116048489BActive Publication Date: 2025-07-04SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310032337.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2025-07-04
Estimated Expiration
2043-01-10

AI Technical Summary

Technical Problem

In the process of AI implementation, small and medium-sized enterprises and scientific researchers face problems such as expensive and scarce computing facilities, lack of large-scale available data resources, not yet modularized technical services, and insufficient technical talents, resulting in high threshold for AI application and difficulty in achieving efficient development and application.

Method used

A zero-code system for object detection is designed, including presentation layer, service layer and infrastructure layer, providing web visual interface, user login, camera management, data management, tag management, online labeling, model training and real-time monitoring and other modules, supporting a one-stop process for data management, labeling, model training and deployment, and using built-in algorithms and hyper-parameter search to optimize model training.

Benefits of technology

It has realized the full-process zero-code AI development, reduced the threshold for artificial intelligence innovation and entrepreneurship and model procurement costs, and is suitable for scenarios such as image content retrieval, security monitoring and industrial quality inspection, and directly puts the trained AI model into use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048489B_ABST
    Figure CN116048489B_ABST
Patent Text Reader

Abstract

The present invention discloses a zero-code system for object detection and a construction method. The system includes a presentation layer, a service layer, and an infrastructure layer. The presentation layer is a web visualization interface; the service layer includes a user login module, a camera management module, a data management module, a label management module, an online annotation module, a model creation module, a model management module, a model training module, a model verification module, a model application module, and a real-time monitoring module; the infrastructure layer includes cameras, databases, file storage servers, and algorithm deployment servers. The zero-code system supports a one-stop zero-code AI development process including data management, data annotation, model training, result display, and model deployment, directly putting the trained AI model into use with cameras, with zero code throughout the process, applicable to scenarios such as picture content retrieval, security monitoring, and industrial quality inspection, greatly reducing the threshold of artificial intelligence innovation and entrepreneurship and the procurement and customization costs of models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automated software development, and in particular to a zero-code system for object detection and a construction method thereof. Background Art

[0002] Artificial Intelligence (abbreviated as AI) has had a wide-ranging and profound impact on fields such as production and life, public services, social governance, and even the global competition pattern. AI has become the most active innovation field and has a profound impact on economic and social development. Driven by both technological progress and market demand, AI applications have begun to comprehensively cover key areas of the economic and society such as daily life scientific research, social governance, business innovation, and national security, promoting social development with unprecedented breadth and depth, and providing new impetus for helping the digital transformation of industries and promoting economic growth. It is estimated that AI can significantly improve the overall economic productivity, will become a new production factor in the digital intelligence era, and accelerate the transformation and upgrading of the entire industry.

[0003] However, the implementation threshold of AI is relatively high. To develop AI, the three elements of "big data, large-scale computing facilities, and intelligent technology" are indispensable. However, except for a few enterprises that have these resources and capabilities, most traditional industries and small and medium-sized enterprises are faced with the actual pain points of AI implementation: (1) Computing facilities are expensive and scarce, and are often monopolized by large companies; (2) There are more and more data resources, but there is a lack of large-scale professional and available data resources; (3) Although there have been obvious improvements in several aspects of AI, the technical services have not been modularized and are far from true intelligence. At the same time, in the process of AI development, there are also problems such as insufficient reserve of technical talents and unmet expectations of input-output ratio. Therefore, for small, medium and micro enterprises and scientific researchers, there are many restrictions on the development of AI, the threshold of AI application is still very high, and the road to intelligent upgrading is difficult. There is an urgent need for efficient AI development and application tools that can help enterprises solve this problem. Summary of the Invention

[0004] In order to overcome the above problems existing in the prior art, the present invention proposes a zero-code system for object detection and a construction method thereof.

[0005] The technical solution adopted by the present invention to solve its technical problems is: a zero-code system for object detection, including a presentation layer, a service layer, and an infrastructure layer. The presentation layer is a web visualization interface for parameter setting and operation;

[0006] The service layer includes a user login module, a camera management module, a data management module, a label management module, an online annotation module, a model creation module, a model management module, a model training module, a model verification module, a model application module, and a real-time monitoring module;

[0007] The infrastructure layer includes cameras, databases, file storage servers, and algorithm deployment servers.

[0008] The above method for constructing a zero-code system for object detection includes the following steps:

[0009] Step 1: Log in to the system using a unique username and password in the user login module, and the database automatically assigns a unique user ID incrementally.

[0010] Step 2: Configure the connection to the camera in the camera management module.

[0011] Step 3: Collect data locally or from the camera based on Step 2.

[0012] Step 4: Upload data in the data management module. The uploaded data includes unlabeled information data and labeled information data.

[0013] Step 5: Create a tag group in the tag management module, add several tags to each tag group, and each tag corresponds to a unique tag ID.

[0014] Step 6: In the online annotation module, select the tag group created in Step 5 to annotate the unlabeled information data uploaded in Step 4, which is divided into single-person annotation and multi-person annotation. For multi-person annotation, data distribution is divided into two methods: equal distribution and more pay for more work.

[0015] Step 7: Create a model in the model creation module and fill in the basic initial information of the model.

[0016] Step 8: Select the labeled data in the model training module, configure the algorithm, relevant parameters, and training environment, and start the training.

[0017] Step 9: Use local image or video data to verify the trained model in the model verification module.

[0018] Step 10: Connect the trained model to the camera in the model application module.

[0019] Step 11: Display the real-time video of the trained model in use with the monitoring camera in the real-time monitoring module.

[0020] In the above method for constructing a zero-code system for object detection, a disconnection reconnection mechanism is added to the camera connection in Step 2, which specifically includes: setting the error reconnection interval during connection to be 10, the maximum reconnection interval to be 600, and the delay to be 4 times each time an error occurs; setting the failure reconnection interval during opening to be 1, the maximum failure reconnection interval to be 60, and the delay to be 2 times each time a failure occurs.

[0021] The above-mentioned method for constructing a zero-code system for object detection, the specific method for collecting data based on the camera in step three includes: setting the camera range for collecting images, the collection time range, and the collection frequency on the web visualization interface; when collecting images, the camera is equipped with a motion detection function, and only adjacent images with changes are collected to avoid collecting redundant and repeated images.

[0022] The above-mentioned method for constructing a zero-code system for object detection, the implementation process of the motion detection function includes:

[0023] (1) Denote the (n + 1)-th, n-th, and (n - 1)-th frame images in the video sequence as f n+1 , f n and f n-1 respectively, and denote the gray values of the pixel points corresponding to the three frames as f n+1 (x, y), f n (x, y) and f n-1 (x, y), where (x, y) is the pixel coordinate. Take the absolute value of the difference between the gray values of the corresponding pixel points of two adjacent frames of the three frames of images, and then take the intersection to obtain the difference image D n :

[0024] D n (x, y) = |f n+1 (x, y) - f n (x, y)| ∩ |f n (x, y) - f n-1 (x, y)|;

[0025] (2) Set a threshold T, and perform binary processing on each pixel point according to the difference image formula to obtain the binary image R n , where the points with a gray value of 255 are foreground (moving object) points, and the points with a gray value of 0 are background points; perform connectivity analysis on the image R n , and finally an image R n containing complete moving objects can be obtained:

[0026]

[0027] The above-mentioned method for constructing a zero-code system for object detection, the upload method for uploading data in step four is slice transmission based on the hash value of the data file, which specifically includes:

[0028] (1) The web visualization interface checks the file format through the binary data at the file header, slices the file, and uses spark-md5 to obtain the hash value;

[0029] (2) The web visualization interface sends a check request to the data management module, sends the hash of the current file to the data management module to check if there is a file with the same hash, and notifies the web visualization interface whether there is an unfinished upload for the current hash.

[0030] (3) If there already exists a file with the same hash and the file has been successfully uploaded, directly return to the presentation layer that the upload is successful, thus achieving "instant upload"; if there already exists a file with the same hash and a part of the slices have failed to upload, return the names of the slices that have been successfully uploaded to the web visualization interface. After receiving them, the web visualization interface calculates the remaining slices that have not been successfully uploaded based on the returned slices, and then continues to upload the remaining slices, thus achieving "resumable upload"; if there is no file with the same hash, start the upload.

[0031] (4) The data management module receives the slices, and the web visualization interface notifies the data management module to merge the slices, and the data management module merges the slices.

[0032] In the above method for constructing a zero-code system for object detection, when uploading annotation information data in step four, use the picture file name as the label file name. The data management module reads the content of the label file and the storage address of the picture and stores them in the database. Then, rename the picture file in the way of timestamp + random number, and change the corresponding label file name to the same name as the picture file; the renaming operation is also applicable to data without annotation information, and the label format of the label file is the YOLO dataset format.

[0033] In the above method for constructing a zero-code system for object detection, when training the model in step eight, the configured algorithm refers to the algorithm models commonly used for object detection built into the zero-code system. Select relevant algorithms according to the size of the dataset, the types of objects, and other specific scenarios, save the built-in algorithms to the algorithm server, listen for requests from the presentation layer, and after identifying the specific algorithm of the recognition request, start the executable startup file of the relevant algorithm to start the algorithm;

[0034] The relevant parameters refer to manually setting the maximum training duration, number of training rounds, learning rate, learning momentum, and training batch size on the web visualization interface. The dataset is split into a training set, a test set, and a validation set according to a preset ratio. The relevant parameters will be assigned to the algorithm model through the parameter interface of the algorithm deployment server, and the hyperparameter search algorithm is used to perform hyperparameter search actions, and the optimal model is obtained by comparing main indicators such as accuracy, recall rate, and precision rate.

[0035] The construction method of a zero-code system for object detection mentioned above. After obtaining the optimal model in step eight, it can be stored locally or in the public cloud. Local storage means storing the model on a local server, and public cloud storage means containerizing the model using Docker and storing it in the cloud to provide API call services.

[0036] The construction method of a zero-code system for object detection mentioned above. The training model module and the algorithm deployment server for training are inserted into the message middleware. After receiving a training request from the web visualization interface, the training model module, as a producer, sends training information to the message middleware. The message is sent in JSON format, and the content includes the storage locations of the dataset and labels, the called algorithm, and related parameters. A header key-value pair is used to distinguish the tasks to which the message belongs. The algorithm deployment server receives the message and starts a new process for training. For the data generated during training, the algorithm deployment server sends the data as a producer once per epoch, and the training model module receives and saves the data.

[0037] The beneficial effects of the present invention are as follows. The zero-code system of the present invention supports a one-stop zero-code AI development process including data management, data annotation, model training, result display, and model deployment. The original image is annotated, learned, and deployed through the zero-code system, and can be connected to a monitoring camera to directly put the trained AI model into monitoring use. The whole process is zero-code, realizing object detection and positioning in pictures or videos, etc., and is applicable to scenarios such as picture content retrieval, security monitoring, and industrial quality inspection, greatly reducing the threshold of artificial intelligence innovation and entrepreneurship and the procurement and customization costs of models. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The present invention will be further described below with reference to the drawings and embodiments.

[0039] Figure 1 It is a schematic diagram of the system architecture of the present invention;

[0040] Figure 2 It is a flowchart of the system architecture of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be described in detail below with reference to the drawings and specific embodiments.

[0042] As Figure 1 shown, according to a zero-code system architecture for object detection that can be immediately put into monitoring use provided by the present invention, it includes:

[0043] A presentation layer, a service layer, and an infrastructure layer;

[0044] The presentation layer is a web visualization interface;

[0045] The service layer includes a user login module, a camera management module, a data management module, a label management module, an online annotation module, a model creation module, a model management module, a model training module, a model verification module, a model application module, and a real-time monitoring module; the functions of each module are as follows.

[0046] User login module: Users log in to this module with a unique username and password. If the username is incorrect or does not match the password, "Username or password error" will be prompted; users can also apply for a registered account in this module, filling in personal information such as username, password, personal email, and contact information. If the username, personal email, or contact information has been registered in this system, "Username / personal email / contact information has been registered" will be prompted.

[0047] Camera management module: Click "Add Camera" in this module, configure and select the camera manufacturer name, and fill in the camera name, camera-related remarks, username, password, IP, port number, video encoding mode, channel number, and bitstream type to add a monitoring camera; the configured cameras can also be viewed in this module. Selecting a configured camera allows you to modify and reconfigure the filled-in information, and you can also delete the configured camera.

[0048] Data management module: In this module, a new data set is created by entering the data set name, remarks information, etc., to establish a new empty data set, and data can be uploaded to this data set. There are two ways to upload data: local upload and camera capture. Local upload is divided into two methods: uploading data with annotation information and uploading data without annotation information. Camera upload can select the cameras configured in the camera management module for data capture;

[0049] Upload of data without annotation information: Supports batch uploading of files or uploading them as compressed files;

[0050] Camera capture: Select the cameras configured in the camera management module for data capture, and the capture time range and capture frequency can be set.

[0051] Label management module: In this module, a label group can be added by filling in the label group name and remarks information, and custom labels can be added to the label group.

[0052] Online annotation module: Select the data set to be annotated and the label group to be used, and then select the annotation method. The annotation methods are divided into single-person annotation and multi-person annotation:

[0053] Single-person annotation: Select single-person annotation in the annotation method, and the data owner annotates by himself.

[0054] Multiple-person annotation: Select multiple-person annotation in the annotation method, then choose one of the two methods of equal distribution and more pay for more work, and then add annotation personnel. Add them by adding the usernames of the annotators. The added users can see the tasks assigned to them in their own online annotation module and can perform annotations.

[0055] Specific annotation operation: Perform rectangular annotation on the web client interface. After drawing the rectangular box, select the relevant tags. If there are multiple targets, perform multiple annotations. After the annotation is completed, click Save to complete the annotation of the picture.

[0056] Model creation module: A simple model can be created by filling in the model name and remarks information.

[0057] Model training module: Select the model created by the model creation module and the dataset annotated by the online annotation module, customize the ratio of the validation set and the test set, select the deployment method (local deployment or cloud deployment), configure relevant parameters such as the learning rate and epoch, select the training environment, and click Start Training to start training.

[0058] Model verification module: Select the model that has been trained in the model training module, upload local pictures or data to perform model inference, and display the results after the inference is completed.

[0059] Model management module: In this module, operations such as deleting and modifying basic information can be performed on the models that have been trained, are being trained, and have not been trained. For the models that have been trained and are being trained, their accuracy, F1-score and other index parameters can be viewed, and their change curve graphs can also be viewed. Basic information such as the training data volume and training time can be viewed.

[0060] Model application module: Select the camera configured by the camera management module and the trained model for connection configuration, and the model can be applied based on the real-time camera image.

[0061] Real-time monitoring module: Display the real-time image of the trained model used in the monitoring camera, which is the real-time output image for application.

[0062] The infrastructure layer includes cameras, databases, file storage servers and algorithm deployment servers.

[0063] As Figure 2 shown, a method for constructing a zero-code system for object detection provided in this embodiment includes:

[0064] Step 1: Log in to the system using a unique username and password in the user login module, and the database automatically increments and assigns a unique user ID;

[0065] Step 2: Configure and connect the camera in the camera management module;

[0066] In the camera management module, fill in the camera manufacturer name, username, password, IP, port number, video encoding mode, channel number, and bitstream type to add a surveillance camera, and obtain the surveillance camera video stream based on the RTSP protocol.

[0067] The camera connection adds a disconnection and reconnection mechanism, specifically including: setting the error reconnection interval error_waiting = 10 during the connection process, the maximum reconnection interval max_error_waiting = 600, and delaying 4 times each time an error occurs:

[0068] error_waiting = min(max_error_waiting, error_waiting * 4); setting the failure reconnection interval failure_waiting = 1 during the opening process, the maximum failure reconnection interval max_failure_waiting = 60, and delaying 2 times each time a failure occurs:

[0069] failure_waiting = min(max_failure_waiting, failure_waiting * 2)

[0070] Step 3: Collect data locally or based on the camera in Step 2;

[0071] The specific method for collecting data based on the camera includes: setting the camera range for collecting images, the collection time range, and the collection frequency in the web visualization interface; when collecting images, the camera is equipped with a motion detection function, and only adjacent images with changes are collected to avoid collecting redundant and repeated images.

[0072] The motion detection function detects whether the camera screen is moving through the three-frame difference method. If there is no moving target in the scene, the change between consecutive frames is very weak. If there is a moving target, there will be an obvious change between consecutive frames. The implementation process includes:

[0073] (1) Denote the (n + 1)-th, n-th, and (n - 1)-th frames in the video sequence as f n+1 、f n and f n-1 , and denote the gray values of the corresponding pixel points of the three frames as f n+1 (x, y), f n (x, y), and f n-1 (x, y), where (x, y) is the pixel coordinate. Subtract the absolute values of the gray values of the corresponding pixel points of two adjacent frames of the three frames and then take the intersection to obtain the difference image D n :

[0074] D n (x, y) = |f n+1 (x, y) - f n (x, y)| ∩ |f n (x, y) - f n-1 (x, y)|;

[0075] (2) Set the threshold T, and perform binary processing on each pixel point according to the differential image formula to obtain the binary image R n , where the points with a gray value of 255 are the foreground (moving object) points, and the points with a gray value of 0 are the background points; perform connectivity analysis on the image R n to finally obtain the image R containing the complete moving object n :

[0076]

[0077] Step Four: Upload data in the data management module. The uploaded data includes data without annotation information and data with annotation information;

[0078] When uploading the data with annotation information, use the picture file name as the label file name. The backend reads the content of the label file and the picture storage address and stores them in the database. Then, rename the picture file in the way of timestamp + random number, such as "16693627211658964.txt", where the first 10 digits are the timestamp and the last 7 digits are the random number. Change the corresponding label file name to the same name to prevent SQL injection attacks, and change the corresponding label file name to the same name as the picture file; the renaming operation also applies to the data without annotation information, and the label file label format is the yolo dataset format.

[0079] yolo dataset annotation format:

[0080] <object_class><x_center><y_center> <width> <height>

[0081] For example: 0 0.498500 0.318581 0.356633 0.894525

[0083] Each image corresponds to a .txt file. Each line represents a label box of the image. There are as many lines of data as there are label boxes of the image. Each line has five columns, which are respectively represented as follows:

[0084] W, H: The width and height of the image in pixels;

[0085] x, y: the center coordinates of the annotation box;

[0086] box_width, box_height: the pixel value of the width and height of the annotation box;

[0087] ·<object_class> : The label index of the object;

[0088] x_center, y_center: relative center coordinates of the annotation box, normalized to the H and W of the image, i.e. x / W, y / H;

[0089] width, height: The relative width and height of the annotation box, normalized to the H and W of the image, i.e. box_width / W, y_center / H.

[0090] The upload method of the uploaded data is slice transmission based on the hash value of the data file, which specifically includes: (1) the web visualization interface verifies the file format through the binary data in the file header, slices the file, and uses spark-md5 to obtain the hash value;

[0091] (2) The web visualization interface initiates a check request to the data management module, sends the hash of the current file to the data management module, checks whether there is a file with the same hash, and notifies the web visualization interface whether there is an unfinished upload of the current hash;

[0092] (3) If the same hash already exists and the file has been successfully uploaded, it will directly return to the presentation layer to indicate that the upload is successful, thus achieving "instant upload"; if the same hash already exists and some slices fail to upload, the names of the slices that have been successfully uploaded will be returned to the web visualization interface. After the web visualization interface receives the slices, it will calculate the remaining slices that have not been successfully uploaded based on the returned slices, and then continue to upload the remaining slices, thus achieving "breakpoint resume"; if the same hash does not exist, it will start uploading;

[0093] (4) The data management module receives slices, and the web visualization interface notifies the data management module to merge the slices, and the data management module merges the slices. Step Five: Create tag groups in the tag management module, add several tags to each tag group, each tag corresponds to a unique tag ID, belongs to the corresponding tag group, and record this information in the data table storing tag information;

[0094] Step Six: In the online annotation module, select the tag groups created in Step Five to annotate the unannotated data uploaded in Step Four, which is divided into single-person annotation and multi-person annotation. The data distribution for multi-person annotation is divided into two methods: equal distribution and more work more pay;

[0095] Online annotation means selecting unannotated data and the set tag groups for single-person annotation. The web visualization interface displays a batch of data randomly sent by the online annotation module, and the data volume can be set, with a default of 20. After saving the annotation, the tag ID and tag name will be added to the relevant fields in the data table of the image data information in the database, and the actual path of the image will be bound to its tag.

[0096] Multi-person annotation means that the user who issues the task sends the unannotated data set and the tag groups to be used to multiple people for collaborative annotation. Specifically, the task is sent to the users registered in the zero-code system, and the unique email registered in the zero-code system is used as the identifier for sending the data;

[0097] The data distribution methods for multi-person collaborative annotation are divided into two methods: equal distribution and more work more pay:

[0098] (1) Equal distribution means dividing the data set into N equal parts, where N is the number of annotators, and distributing it to N annotation members;

[0099] (2) More work more pay means distributing the data as a whole to the annotators, and the image permissions will be open to all annotators. The image distribution is carried out in the way of pessimistic lock. When an annotator occupies a certain piece of data, other annotators cannot access it, to avoid Figure 1 a piece of data being distributed to multiple annotators. After the annotation is completed, the annotator ID will be filled in the annotator field of the data table of the image data information in the database, and the system background can count the workload of each annotator.

[0100] Step Seven: Create a model in the model creation module, and fill in the basic initial information such as the model name and description;

[0101] Step Eight: In the model training module, select the annotated data, the adapted algorithm, appropriate parameters, storage method and training environment for training;

[0102] The configuration algorithm refers to the algorithm models for common object detection built into the zero-code system. Relevant algorithms are selected according to the size of the dataset, the types of objects, and other specific scenarios. The built-in algorithms are saved to the algorithm server, which listens for client requests. After identifying the specific algorithm in the request, it starts the executable startup file of the relevant algorithm to start the algorithm;

[0103] The relevant parameters refer to manually setting the maximum training duration, number of training rounds, learning rate, learning momentum, and training batch size in the web visualization interface. The dataset is split into a training set, a test set, and a validation set according to a preset ratio. The relevant parameters are assigned to the algorithm model through the parameter interface on the algorithm side, and a hyperparameter search algorithm is used to perform hyperparameter search actions. The optimal model is obtained by comparing the main indicators such as accuracy, recall, and precision.

[0104] After obtaining the optimal model, it can be stored locally or in the public cloud. Local storage means storing the model on a local server, and public cloud storage means containerizing the model using Docker and storing it in the cloud, providing API call services.

[0105] The training model module and the algorithm deployment server for executing training are inserted into the message middleware. After receiving the training request from the web visualization interface, the training model module, as the producer, sends training information to the message middleware. The message is sent in JSON format, and the content includes the storage locations of the dataset and labels, the called algorithm, and relevant parameters. A header key-value pair is used to distinguish the task to which the message belongs. The algorithm deployment server receives the message and starts a new process for training. For the data generated during training, the algorithm deployment server sends the data once per epoch as the producer, and the training model module receives and saves the data.

[0106] The training model module and the algorithm deployment server for executing training are inserted into the message middleware. Each end has both a producer and a consumer. The producer sends messages or requests, and the consumer receives, identifies, and processes them. When providing feedback after processing, it acts as a producer and sends messages again. The specific implementation is as follows:

[0107] The training model module, as the producer, sends training information to the message middleware. The message is sent in JSON format, and the content includes the storage locations of the dataset and labels, the called algorithm, relevant parameters, etc. A header key-value pair is used to distinguish the task to which the message belongs for differentiating different tasks. The algorithm deployment server receives the message and starts a new process for training. For the data generated during training, the algorithm deployment server sends the data once per epoch as the producer, and the training model module receives and saves the data.

[0108] Step Nine: Select the trained model in the verification model module, and use local image or video data for verification testing to output the result image or result video. For videos, convert the video stream into an image stream as the input parameter for model inference, and then pack the result images after inference into a video stream for output. Implementation method: Call the target model inference startup service API to start the model, upload the image or video to the storage folder specified for storing verification data, and use it as a parameter for model inference; if it is a video, extract images at the set frame rate for training, and pack the training results into a video stream for output at the extraction frame rate.

[0109] Step Ten: Connect the trained model to the monitoring in the model application module and output in real time;

[0110] Step Eleven: Display the real-time picture of the trained model being used in the monitoring camera in the real-time monitoring module.

[0111] The above embodiments are only exemplary embodiments of the present invention and are not used to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art can make various modifications or equivalent replacements to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent replacements should also be regarded as falling within the protection scope of the present invention.< / height> < / width>

Claims

1. A construction method for a zero-code system for object detection, characterized in that, The system includes a presentation layer, a service layer, and an infrastructure layer. The presentation layer is a web visualization interface for parameter setting and operation; The service layer includes a user login module, a camera management module, a data management module, a label management module, an online annotation module, a model creation module, a model management module, a model training module, a model verification module, a model application module, and a real-time monitoring module; The infrastructure layer includes cameras, a database, a file storage server, and an algorithm deployment server; The method includes the following steps: Step 1: Log in to the system using a unique username and password in the user login module, and the database automatically increments and assigns a unique user ID; Step 2: Configure the connection to the camera in the camera management module; Step 3: Collect data locally or from the camera based on Step 2; Step 4: Upload data in the data management module. The uploaded data includes unannotated information data and annotated information data; Step 5: Create a label group in the label management module, add several labels to each label group, and each label corresponds to a unique label ID; Step 6: In the online annotation module, select the label group created in Step 5 to annotate the unannotated information data uploaded in Step 4, which is divided into single-person annotation and multi-person annotation. For multi-person annotation, data distribution is divided into two methods: equal distribution and more work more pay; Step 7: Create a model in the model creation module and fill in the basic initial information of the model; Step 8: Select the annotated data in the model training module, configure the algorithm, related parameters, and training environment, and start training; Step 9: Use local image or video data to verify the trained model in the model verification module; Step 10: Connect the trained model to the camera in the model application module; Step 11: Display the real-time image of the trained model being used in the monitoring camera in the real-time monitoring module.

2. The construction method of a zero-code system for object detection according to claim 1, characterized in that, In Step 2, the camera connection adds a disconnection reconnection mechanism, which specifically includes: setting the error reconnection interval during the connection process to 10, the maximum reconnection interval to 600, and delaying 4 times each time an error occurs; setting the failure reconnection interval during the opening process to 1, the maximum failure reconnection interval to 60, and delaying 2 times each time a failure occurs.

3. The construction method of a zero-code system for object detection according to claim 1, characterized in that, The specific method for collecting data based on the camera in Step 3 includes: setting the camera range, collection time range, and collection frequency for the collected images in the web visualization interface; when collecting images, the camera is equipped with a motion detection function, and only adjacent images with changes are collected to avoid collecting redundant and repeated images.

4. The construction method of a zero-code system for object detection according to claim 3, characterized in that, The implementation process of the motion detection function includes: (1) Denote the th, th, and th frame images in the video sequence as , , and respectively. Denote the gray values of the pixel points corresponding to the three frames as , , and respectively, where is the pixel coordinate. Take the absolute value of the difference between the gray values of the corresponding pixel points of two adjacent frames of the three frames of images, and then take the intersection to obtain the difference image : ; (2)Set the threshold , perform binary processing on each pixel point according to the differential image formula to obtain a binary image , where the points with a gray value of 255 are the foreground points of the moving target, and the points with a gray value of 0 are the background points; analyze the connectivity of the image , and finally an image containing the complete moving target can be obtained : 。 5. The construction method of a zero-code system for object detection according to claim 1, characterized in that, The upload method for uploading data in Step 4 is slice transmission based on the hash value of the data file, which specifically includes: (1) The web visualization interface verifies the file format through the binary data at the file header, slices the file, and uses spark-md5 to obtain the hash value; (2) The web visualization interface sends a check request to the data management module, sends the hash of the current file to the data management module, checks whether there is a file with the same hash, and notifies the web visualization interface whether there is an unfinished upload for the current hash; (3) If the same hash already exists and the file has been successfully uploaded, directly return that the upload on the presentation layer is successful, and "instant upload" can be achieved; if the same hash already exists and some slices have failed to be uploaded, return the names of the slices that have been successfully uploaded to the web visualization interface. After receiving them, the web visualization interface calculates the remaining slices that have not been successfully uploaded based on the returned slices, and then continues to upload the remaining slices, and "resumable upload" can be achieved; if the same hash does not exist, start uploading. (4) The data management module receives the slices, and the web visualization interface notifies the data management module to merge the slices, and the data management module merges the slices.

6. The construction method of a zero-code system for object detection according to claim 1, characterized in that, When uploading the labeled information data in Step 4, the picture file name is used as the label file name. The data management module reads the content of the label file and the picture storage address and stores them in the database. Then, the picture file is renamed in the way of timestamp + random number, and the corresponding label file name is changed to the same name as the picture file; the renaming operation also applies to the data without labeled information, and the label file label format is the YOLO dataset format.

7. The construction method of a zero-code system for object detection according to claim 1, characterized in that When training the model in Step 8, the configured algorithm refers to the algorithm models of common object detection built into the zero-code system. Relevant algorithms are selected according to the size of the dataset, the types of objects, and other specific scenarios. The built-in algorithms are saved to the algorithm deployment server, listening for requests from the presentation layer. After identifying the specific algorithm of the request, start the executable startup file of the relevant algorithm to start the algorithm. The relevant parameters refer to manually setting the maximum training duration, number of training rounds, learning rate, learning momentum, and training batch on the web visualization interface. The dataset is split into a training set, a test set, and a validation set according to a preset ratio. The relevant parameters will be given to the algorithm model through the parameter interface of the algorithm deployment server, and the hyperparameter search algorithm is used to perform the hyperparameter search action, and the optimal model is obtained by comparing the main indicators such as accuracy, recall rate, and precision rate.

8. The construction method of a zero-code system for object detection according to claim 7, characterized in that After obtaining the optimal model in Step 8, it can be stored locally or in the public cloud. The local storage means storing the model on the local server, and the public cloud storage means containerizing the model using Docker and storing it in the cloud, providing API call services.

9. A construction method of a zero-code system for object detection according to claim 7, characterized in that The training model module and the algorithm deployment server for executing training are inserted into the message middleware. After receiving the training request from the web visualization interface, the training model module, as the producer, sends the training information to the message middleware. The message is sent in JSON format, and the content includes the storage locations of the dataset and the label, the called algorithm, and the relevant parameters. A header key-value pair is used to distinguish the tasks to which the message belongs. The algorithm deployment server receives the message and starts a new process for training. For the data generated during training, the algorithm deployment server sends the data once as the producer for each epoch, and the training model module receives and saves the data.

Citation Information

Patent Citations

  • Road surface abandoned object detection method based on deep convolutional network

    CN106845424A

  • Zero code modeling method and system based on automatic machine learning

    CN115080021A