Model effect verification method based on Django framework

The model validation method based on the Django framework supports single-graph and multi-graph modes, enabling rapid validation of deep learning models. This reduces operational difficulty and development costs, making it suitable for non-professionals. The results are presented intuitively, and it has good scalability and flexibility.

CN118570592APending Publication Date: 2024-08-30FREESENSE IMAGE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410712106.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In existing technologies, verifying the effectiveness of deep learning models requires professional skills, which cannot be completed independently by non-professionals. Furthermore, traditional development methods suffer from problems such as long development cycles and high optimization difficulty.

Method used

A model performance verification method based on the Django framework is adopted. By deploying multiple models within the framework and supporting single-image and multi-image modes, users can perform verification operations through a web-based URL interface, and the results are returned in web page format.

Benefits of technology

It reduces the operational difficulty and development cost of model validation, provides a validation method that is friendly to non-professionals, presents results intuitively, and has good scalability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570592A
    Figure CN118570592A
Patent Text Reader

Abstract

The invention discloses a model effect verification method based on a Django framework. The method comprises the following steps of S1, deploying a plurality of models needing to be called in the Django framework; s2, a user selects different url interfaces to execute corresponding operations, the interior of the Django framework selects a corresponding view module according to a url controller module, the view module corresponds to a model module, a result is returned to the user through a template module, and the result is returned to the user through a display module; according to the method, the development cost is reduced to a great extent, and the convenience of model effect verification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the intersection of deep learning and web services, and specifically to a model effect verification method based on a Django framework. Background Art

[0002] With the development of AI deep learning technology, all walks of life have adopted the assistance of AI technology to a greater or lesser extent, and gradually replaced manual or traditional algorithms to complete related tasks. Verification of the effectiveness of AI models has become a crucial link, and it is also the fundamental condition for evaluating the quality of technology.

[0003] Currently, the effectiveness of deep learning models is usually verified by professional technicians through code analysis or development of related clients. However, both methods have their own problems. The former has extremely strong requirements for professional skills, and non-professionals or customers cannot independently verify the model effect. The latter has problems such as long development cycle and difficulty in optimization. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a model effect verification method based on the Django framework, which greatly reduces the development cost and increases the convenience for model effect verification.

[0005] To achieve the above object, the present invention provides the following technical solutions: The model effect verification method based on the Django framework includes the following steps: Step S1: deploy multiple models that need to be called in the Django framework; Step S2: The user selects different URL interfaces to perform corresponding operations. The Django framework selects the corresponding view module based on the URL controller module. The view module corresponds to the model module and returns the result to the user through the template module.

[0006] As a further solution of the present invention, in step S1, the model to be called supports single-image mode and multi-image mode. The single-image mode refers to only transmitting a specific image on the web page, while the multi-image mode requires transmitting the path of the local image.

[0007] As a further solution of the present invention, in step S1, the models that need to be called include a classification model, a detection model, and a segmentation model.

[0008] As a further solution of the present invention, the result is returned to the web page through a preset interface within the Django framework.

[0009] As a further solution of the present invention, the single image mode is set as follows: The user opens the browser and enters the URL, selects the model to be verified, enters a single image, and waits for the web page to return the result; Classification model: will return the classification result, confidence level and corresponding result display graph of the current input graph; Detection model: returns all target categories detected by the current input image, the confidence levels of all target categories, the coordinates of the minimum bounding rectangles of all target categories, and the result display image; Segmentation model: returns all target categories segmented by the current input image, the confidence scores of all target categories, the coordinates of the minimum bounding rectangles of all target categories, the result mask image corresponding to the original image, and the result display image.

[0010] As a further solution of the present invention, the multi-image mode is set as follows: The user opens the browser and enters the URL, selects the model to be verified, enters the path of the graph to be inferred, and waits for the web page to return the result; Classification model: returns the precision and recall of the current input data, a pie chart of all current data, and the corresponding result display chart; Detection model: returns the precision and recall of the current input data, the confusion matrix of all current data, the pie chart of all current data, and the corresponding result display chart; Segmentation model: returns the precision and recall of the current input data, the confusion matrix of all current data, the pie chart of all current data, the mask chart of all current data, and the corresponding result display chart.

[0011] The present invention has the following beneficial effects: The present invention realizes fast model verification and reduces the difficulty of operation by designing a model verification method based on the Django framework. In the pre-processing stage, multiple model schemes that need to be verified are deployed inside the framework for easy calling, and specific URLs and corresponding view functions are set for them. The present invention supports two modes, namely single-image mode and multi-image mode, and different results are returned according to different modes. The user selects the corresponding URL to perform different verification operations on the web page, such as performing the verification of the classification model, and the URL of the classification model and the corresponding view function and model module will be called inside the framework. Finally, the result of the model verification is returned to the client in the form of a web page.

[0012] The present invention can provide more friendly support to non-professional personnel. The model verification effect performed by developers through the Web will be more intuitive than the traditional method, while reducing the difficulty of development and optimization. It has good scalability, and developers can expand existing Web applications by writing new modules or plug-ins. This deployment method reduces deployment costs and reduces the rigid requirements for device hardware. It supports single-graph and multi-graph methods, making the model verification method more flexible. It allows developers to customize and adjust according to the needs of the project, which allows developers to develop Web applications more flexibly. The code structure is clear and highly modularized, which makes the code easy to maintain and modify.

[0013] In order to more clearly illustrate the structural features and effects of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is an overview diagram of user calls mentioned in the embodiment of the present invention.

[0015] Figure 2 It is a flow chart of internal calls in the Django framework mentioned in an embodiment of the present invention.

[0016] Figure 3 It is a call diagram of different models corresponding to the view module mentioned in the embodiment of the present invention.

[0017] Figure 4 It is the model module return interface diagram in the single-graph mode mentioned in the embodiment of the present invention.

[0018] Figure 5 It is the model module return interface diagram in the multi-graph mode mentioned in the embodiment of the present invention. DETAILED DESCRIPTION

[0019] The present invention will be further explained below in conjunction with the accompanying drawings and related knowledge, and described clearly and completely. Obviously, the described application is only a part of the embodiments of the present invention, rather than all the embodiments.

[0020] Aiming at the problems of weak support for non-technical personnel, long development cycle and high optimization difficulty in the prior art, the invention realizes fast model verification and reduces the difficulty of operation by designing a model verification method based on the Django framework. First, in the pre-processing stage, multiple model schemes that need to be verified are deployed inside the framework for easy calling, and specific urls and corresponding view functions are set for them. Secondly, this scheme supports two modes, namely single-image and multi-image modes, and different results are returned according to different modes. Thirdly, the user selects the corresponding url on the web page to perform different verification operations, such as performing the verification of the classification model, and the url of the classification model and the corresponding view function and model module will be called inside the framework. Finally, the result of the model verification is returned to the customer in the form of a web page.

[0021] Reference Figure 1-Figure 5 As shown, the present invention provides a model effect verification method based on the Django framework, comprising the following steps: Step S1: deploy multiple models that need to be called in the Django framework, including classification, detection, segmentation and other models; and the verification method supports single-image and multi-image modes. The single-image mode refers to only passing in a specific image on the web page, while the multi-image mode requires passing the path of the local image; Step S2: The user selects different URL interfaces to perform corresponding operations. The Django framework selects the corresponding view module based on the URL controller module. The view module corresponds to the model module and returns the result to the user through the template module. Figure 2 , Figure 3 As shown, the present invention provides a url controller module, a view module, a model module, and a template module to enable users to select different url interfaces to perform corresponding operations. The Django framework selects the corresponding view module based on the url controller module. The view module corresponds to the model module (the inference function of different models). After fetching the data, it returns to the view module, and then returns the result to the customer through the template module (in the form of an html page). Furthermore, the Django framework returns the result to the web page through a preset interface, wherein confusion matrix diagrams, mask diagrams, result diagrams, etc. support local download.

[0022] In the preferred embodiment of the present invention, the model to be called supports single-image mode and multi-image mode. The single-image mode refers to only passing a specific image on the web page, while the multi-image mode requires passing the path of the local image. Figure 4 , Figure 5 As shown, specifically including: The settings for single image mode are as follows: The user opens the browser and enters the URL, selects the model to be verified (classification, detection, segmentation), enters a single image, and waits for the web page to return the result.

[0023] Classification model: Since it is a single-image mode, the classification result, confidence level, and corresponding result display image of the current input image will be returned.

[0024] Detection model: Since it is a single-image mode, it will return all target categories detected by the current input image, the confidence levels of all target categories, the minimum bounding rectangle coordinates of all target categories, and the result display image.

[0025] Segmentation model: Since it is a single-image mode, it will return all target categories segmented by the current input image, the confidence corresponding to all target categories, the minimum bounding rectangle coordinates corresponding to all target categories, the result mask image corresponding to the original image, and the result display image.

[0026] The settings for multi-image mode are as follows: The user opens the browser and enters the URL, selects the model to be verified (classification, detection, segmentation), enters the path of the graph to be inferred, and waits for the web page to return the result.

[0027] Classification model: Since it is a multi-graph mode, it will return the precision and recall of the current input data, a pie chart of all current data (the number of statistical categories, etc.), and the corresponding result display chart.

[0028] Detection model: Since it is a multi-graph mode, it will return the precision and recall of the current input data, the confusion matrix of all current data, the pie chart of all current data (counting the number of single target categories, etc.) and the corresponding result display chart.

[0029] Segmentation model: Since it is a multi-image mode, it will return the precision and recall of the current input data, the confusion matrix of all current data, the pie chart of all current data (counting the number of single target categories, etc.), the mask chart of all current data, and the corresponding result display chart.

[0030] In summary, for the existing existing model effect verification method, the operation difficulty is high, the development is complex, the optimization difficulty is large, and the like, the present invention proposes a model effect verification method based on the Django framework to effectively solve the problem. The scheme verifies the model effect by pre-deploying the required model in the pre-processing stage, and then the user verifies the model effect in the way of transmitting data on the web page end, and also supports two modes of single map and multiple maps, and the results will be presented in the form of pages after statistics. The scheme presents the detection results through the Web end, which is more intuitive than the traditional effect detection, and also greatly reduces the difficulty of operation of the model for developers, making it easier to get started, and the scheme also has strong scalability and flexibility, and can flexibly add new model schemes.

[0031] The technical principle of the present invention is described above in combination with the specific embodiments, which are only preferred implementations of the present invention. The protection scope of the present invention is not limited to the above embodiments, and all technical solutions under the idea of ​​the present invention belong to the protection scope of the present invention. Those skilled in the art can think of other specific implementations of the present invention without creative work, and these methods will fall within the protection scope of the present invention.

Claims

1. A model effect verification method based on the Django framework, characterized in that: The following steps are involved: Step S1: deploy multiple models that need to be called in the Django framework; Step S2: The user selects different URL interfaces to perform corresponding operations. The Django framework selects the corresponding view module based on the URL controller module. The view module corresponds to the model module and returns the result to the user through the template module.

2. The model effect verification method based on the Django framework as claimed in claim 1, characterized in that: In step S1, the model to be called supports single-image mode and multi-image mode. The single-image mode refers to only passing in a specific image on the web page, while the multi-image mode requires passing the path of the local image.

3. The model effect verification method based on the Django framework as claimed in claim 2, characterized in that: In step S1, the models that need to be called include classification model, detection model, and segmentation model.

4. The model effect verification method based on the Django framework as claimed in claim 3, characterized in that: In step S2, the Django framework returns the result to the web page through a preset interface.

5. The model effect verification method based on the Django framework as claimed in claim 4, characterized in that: The single image mode is set as follows: The user opens the browser and enters the URL, selects the model to be verified, enters a single image, and waits for the web page to return the result; Classification model: will return the classification result, confidence level and corresponding result display graph of the current input graph; Detection model: returns all target categories detected by the current input image, the confidence levels of all target categories, the coordinates of the minimum bounding rectangles of all target categories, and the result display image; Segmentation model: returns all target categories segmented by the current input image, the confidence scores of all target categories, the coordinates of the minimum bounding rectangles of all target categories, the result mask image corresponding to the original image, and the result display image.

6. The model effect verification method based on the Django framework as claimed in claim 5, characterized in that: The multi-image mode is set as follows: The user opens the browser and enters the URL, selects the model to be verified, enters the path of the graph to be inferred, and waits for the web page to return the result; Classification model: returns the precision and recall of the current input data, a pie chart of all current data, and the corresponding result display chart; Detection model: returns the precision and recall of the current input data, the confusion matrix of all current data, the pie chart of all current data, and the corresponding result display chart; Segmentation model: returns the precision and recall of the current input data, the confusion matrix of all current data, the pie chart of all current data, the mask chart of all current data, and the corresponding result display chart.