An open set classification method and system for network structure optimization
Patent Information
- Application Number
- CN202410535983.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2044-04-30
AI Technical Summary
但此方法存在一定局限性,当输入混淆程度较高的图像时,还是会输出较高的置信度,因此该方法仅消除了预测过程中的不确定性,没有真正对未知类别进行拒绝
[0031] In summary, the advantages of this application and the user experience it brings are as follows: the open set classification method with optimized network structure in this application realizes the recognition of known and unknown object classes, and significantly improves the accuracy of object recognition.
Smart Images

Figure CN118314405B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of object recognition technology, and in particular to an open set classification method and system with optimized network structure. Background Technology
[0002] In object recognition tasks, all object types are known classes, and the model classifier can only classify these known classes. For example, when using a prototype object recognition system for digit classification, if the camera is placed in a non-digital image environment, all the unknown classes formed by the non-digital images will be identified as one of the digit categories. If the system is deployed in constantly changing environments, the recognition results will differ from the actual results.
[0003] Strictly speaking, image classification includes two types: closed-set classification and open-set classification. If set C contains X known classes, and each known class has its own corresponding label, then the process of classifying the X known classes is closed-set classification. If set C contains Y or an infinite number of unknown classes in addition to the X known classes, then the process of classifying the X known classes and rejecting the unknown classes is open-set classification.
[0004] Most existing deep learning classification algorithms are designed for closed worlds and have the property of closed set classification. The reason for this is that the types of unknown classes are inexhaustible, so it is impossible to use an "other class" to replace the unknown class for training. The output layer can only give the probability that the image sample to be predicted belongs to a certain known class.
[0005] To address the problem of identifying unknown objects in open-set environments, existing techniques initially set a classification threshold to perform a secondary evaluation of the Softmax output. When all outputs are less than this threshold, the currently identified object is classified as None. However, this method has limitations. When the input image has a high degree of confusion, it still outputs a high confidence score. Therefore, this method only eliminates the uncertainty in the prediction process and does not truly reject unknown categories. Summary of the Invention
[0006] In view of this, the purpose of this application is to propose an open set classification method and system for network structure optimization, which can specifically solve the existing problems.
[0007] Based on the above objectives, this application proposes an open set classification method for network structure optimization, including:
[0008] Acquire object images, which include known class objects and unknown class objects;
[0009] The object image is input into the trained, structure-optimized MobileNet V2 model;
[0010] Softmax outputs the probability distribution of known classes in closed-set classification, while Openmax outputs the probability distribution of unknown classes in open-set classification.
[0011] Furthermore, the structure-optimized MobileNet V2 model is implemented based on the original MobileNet V2 model. The network structure of the structure-optimized MobileNet V2 model consists of two lines, which are used for closed-set classification and open-set classification processes, respectively. The two lines share the backbone network.
[0012] The backbone network retains the convolutional and global pooling layers at the top and bottom of the original MobileNet V2 model, and reduces the Bottleneck layer of the original MobileNet V2 model, replacing some of the Bottleneck layers with convolutional operations.
[0013] Furthermore, the number of neurons in the last convolutional layer of the backbone network represents the number of known class categories.
[0014] Furthermore, the training process of the trained, structure-optimized MobileNet V2 model is as follows:
[0015] The training and validation sets are obtained by calling the functions in the data preprocessing file;
[0016] Receive configuration information, including hyperparameters, to train the model and obtain the model parameter file;
[0017] The average activation vector and distance parameters are obtained by calling the function in the open set classification file.
[0018] Furthermore, the training process of the structure-optimized MobileNet V2 model includes four types of files: data preprocessing files, model parameter files, open set classification files, and main program files.
[0019] Furthermore, the data preprocessing file provides functions for reading, parsing, and partitioning the dataset into training and validation sets, encapsulating three functions: read_data(), set_data(), and splite_data(); among which,
[0020] The read_data() function is responsible for parsing the dataset for a single category, filtering the start and end markers of each frame of the image, and storing the valid parts of the image together.
[0021] The set_data() function is responsible for concatenating the image data and label data of all categories separately to form the total image data and label data;
[0022] The `splite_data()` function is used to divide a dataset into a training set and a validation set according to a certain ratio.
[0023] Furthermore, the open-set classification file is used to encapsulate the activation vector acquisition function, the average activation vector calculation function, the distance calculation function, and the probability value calculation function; wherein,
[0024] The activation vector retrieval function is used to obtain the activation vector values of the penultimate layer of the trained, structure-optimized MobileNet V2 model.
[0025] The average activation vector calculation function and the distance calculation function are used to calculate the average activation vector and the distance value based on the activation vector values, respectively.
[0026] The probability calculation function includes the process of fitting the Weibull model and modifying the activation vector values of the test samples, ultimately obtaining the probability value of the class.
[0027] Based on the above objectives, this application also proposes an open set classification system with optimized network structure, comprising:
[0028] Image acquisition module, used to acquire object images, the object images including known class objects and unknown class objects;
[0029] The model training module is used to input the object image into a trained, structure-optimized MobileNet V2 model.
[0030] The classification module is used to output the probability distribution of known classes when using Softmax for closed-set classification, and the probability distribution of unknown classes when using Openmax for open-set classification.
[0031] In summary, the advantages of this application and the user experience it brings are as follows: the open set classification method with optimized network structure in this application realizes the recognition of known and unknown object classes, and significantly improves the accuracy of object recognition. Attached Figure Description
[0032] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this application and should not be construed as limiting the scope of this application.
[0033] Figure 1 This diagram illustrates the modified network architecture of MobileNet V2 according to this application.
[0034] Figure 2A flowchart illustrating an open set classification method for network structure optimization according to an embodiment of this application is shown.
[0035] Figure 3 This diagram illustrates the relationship between the number of known classes and the accuracy of unknown class identification according to an embodiment of this application.
[0036] Figure 4 A diagram illustrating the structure of an open set classification system with network structure optimization according to an embodiment of this application is shown.
[0037] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of this application is shown.
[0038] Figure 6 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation
[0039] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0041] Since this application ultimately aims to implement open set classification in embedded terminals and needs to be applicable to existing built-in network models, this application introduces the Openmax method, which has lower algorithm complexity and better compatibility, into the field of embedded artificial intelligence, and explores an open set classification scheme for embedded terminals based on Openmax.
[0042] 1. Implementation process of the Openmax method
[0043] The Openmax layer replaces the Softmax layer as the last layer of the network structure. It abandons the calculation method of Softmax, which obtains the sum of the probabilities of known classes as 1 through normalization. Instead, it applies the concept of meta-recognition to deep neural networks and uses extreme value theory to estimate the probability that an input comes from an unknown class. The specific implementation process is as follows.
[0044] According to the definition of Openmax, the output of the second layer of the neural network (the layer before Softmax) is called the activation vector AV. Taking the i-th known class as an example, AV... i ={AV1,AV2,AV3,…,AV N} where N represents the number of input samples identified as class i in the known class, and the average center vector of class i can be calculated as MAV. i , representing the centroid of the i-th class. If there are M known classes, the average activation vector of each of the M known classes can be obtained by calculating M times. The formula for calculating the average activation vector is shown in formula (1).
[0045]
[0046] Given the activation vectors of each class and the average activation vector, the distance D from each input sample to the center vector can be calculated. i ={D1,D2,D3,…,D N After sorting the distances, select the tail largest distances to fit the Weibull probability model of each known class, and obtain the position parameter τ, shape parameter κ and scale parameter λ. This calculation process can be completed by calling the FitHight() function in the LibMR library, as shown in formula (2).
[0047] (τ i ,κ i ,λ i = FitHight(sort(D) i ),tail)(2)
[0048] Input the image test data into the current network structure and record the output value of the second-to-last layer of the model, AV(t) = {AV1(t), AV2(t), AV3(t), ..., AV...}. M The activation vector (t) is sorted and its corresponding index is returned, where S j This represents the j-th largest value. The α AV values with relatively high values will be further adjusted, and different modification coefficients will be assigned to the AV values according to the sorting. The calculation method of the adjustment coefficient is shown in formula (3).
[0049]
[0050] In the formula, j takes values from 1 to α. By adjusting the coefficients, the corresponding elements of the first α AV values are multiplied together, while the remaining M-α AV values remain unchanged, resulting in the modified activation vector modAV(t). The activation vector value of the unknown category is calculated as shown in formula (4).
[0051]
[0052] Finally, the modAV containing M+1 elements is mapped to the probability domain to obtain the probability of all categories, including the unknown category. The calculation method is shown in formula (5).
[0053]
[0054] Where t takes values from 1 to M+1, P M+1 This is the probability of classifying the input object as an unknown class.
[0055] 2. Model Network Structure
[0056] This application uses MobileNet V2 as the base network and, through model building methods, reduces the number of layers and adjusts its structure to better adapt to object recognition tasks based on embedded artificial intelligence. The overall structure of the optimized model is as follows: Figure 1 As shown.
[0057] The network structure consists of two lines, one for closed-set classification and the other for open-set classification, but both lines share the backbone network. The backbone network retains the design pattern of the MobileNet V2 model, which uses a small number of convolutional layers and global pooling layers at the top and bottom. However, the numerous Bottleneck layers in the original network structure have been reduced and replaced with convolutional operations to lower computational complexity and the number of parameters. For different object recognition tasks, only the number of neurons in the last convolutional layer, SortNum, needs to be modified. SortNum represents the number of known class categories and can be used for binary or multi-class classification. After matching, the target number of categories is output. Finally, Softmax is used to output the probability distribution of known classes in the closed-set classification case, while Openmax is used to output the probability distribution of unknown classes in the open-set classification case.
[0058] 3. Training process implementation
[0059] In the implementation of the model training program, this application encapsulates the code required for model training according to the functional task division, so that it can be called by secondary development.
[0060] 3.1 Code Encapsulation
[0061] The model training process is divided into four types of files: the data preprocessing file data_prepare.py, the model parameter file model.py, the open set classification file openmax.py, and the main program file train.py. The following sections will use data_prepare.py and openmax.py as examples to explain in detail the functions contained in these files.
[0062] (1) Data Preprocessing File. This file mainly provides functions for reading, parsing, and dividing the dataset into training and validation sets. It encapsulates three functions: read_data(), set_data(), and splite_data(). The read_data() function is responsible for parsing the dataset for a single category, filtering the start and end markers of each frame, and storing the valid parts of the image. The set_data() function is responsible for concatenating the image data and label data of all categories to form the total image data and label data. The splite_data() function divides the dataset into training and validation sets according to a certain ratio. The interface descriptions of the above functions are shown in Table 1.
[0063] Table 1. Description of Data Preprocessing File Functions
[0064]
[0065]
[0066] (2) Open-set classification file. This file encapsulates functions for obtaining activation vectors, calculating average activation vectors, calculating distance, and calculating probability values. Table 2 describes the function interfaces of this file. The `compute_feature()` function obtains the activation vector values of the penultimate layer of the model; the `compute_mean()` and `compute_distance()` functions calculate the average activation vector and distance value based on the activation vector values; `create_openmax()` internally calls the above three functions to generate the parameters for the average activation vector and distance value and saves them to a file. The `compute_openmax()` function includes the process of fitting the Weibull model and modifying the activation vector values of the test samples, ultimately obtaining the probability value of the class.
[0067] Table 2. Function Descriptions for Open Set Classification Files
[0068]
[0069]
[0070] 3.2 Execution Process
[0071] The execution flow of the model training project is as follows: Figure 2 As shown, the process first calls functions in the data preprocessing file to obtain the training and validation sets. Then, it receives configuration information such as hyperparameters to train the model, thereby obtaining the model parameter file. Finally, it calls functions in the open set classification file to obtain the average activation vector and distance parameters.
[0072] It is worth noting that the model execution flow does not call all functions in the open set classification. This is because the ultimate goal of this application is to achieve unknown object recognition on the terminal. However, the terminal cannot obtain training sample data to calculate the average activation vector and distance value, and therefore cannot complete the calculation of the distance value D(t) in formula (3), resulting in the inability to implement the Openmax algorithm during the terminal inference process. Therefore, the PC training program needs to provide the terminal inference program with parameters such as the average activation vector in the form of model parameters. With the support of these parameters, the terminal inference program can complete the remaining Openmax algorithm parts, and finally achieve the recognition of unknown objects on the terminal.
[0073] 3. Model Performance Testing
[0074] This application collected images of ten numbers (0-9), three letters (A-C), and three types of plastic boxes (H1 cylindrical, H2 square, and H3 irregular shape) as a dataset on the terminal. During testing, 300 images of each known class were extracted as the training set, and the remaining image data were used as the test set. Unknown classes did not participate in the training process.
[0075] (1) Experimental tests were conducted when all categories were known, and recognition accuracy was used as the evaluation index, which is the probability that the number of correctly identified samples in a category is equal to the total number of samples in that category. The test results are shown in Table 3.
[0076] Table 3. Accuracy of Known Class Recognition
[0077]
[0078]
[0079] The test results in Table 3 show that all four categories of objects can be recognized. Except for the number "8", the letter "B" and the irregular plastic box "H3", which have relatively low recognition accuracy, the recognition accuracy of the other categories is relatively high.
[0080] (2) To investigate the impact of increasing the number of known class categories on the recognition performance of unknown classes, this application designs a test scheme that gradually increases the number of known class categories. This scheme uses overall detection accuracy as the evaluation index, i.e., the proportion of correctly identified samples out of all samples, statistically forming a... Figure 3 The diagram shown is a relational diagram.
[0081] Depend on Figure 3 It can be seen that as the number of known classes increases from 0 to 16, the recognition accuracy of unknown classes generally shows a trend of first increasing and then decreasing, while the recognition accuracy of known classes also gradually decreases slightly. This phenomenon can be theoretically explained as follows: Let the feature region after mapping through the network structure be R, and the regions obtained by mapping M known classes be R1 to R2. MThe known class feature regions, after training, are more densely distributed, while the untrained unknown class features are more diffused and occupy a larger space. With a fixed total number of sample classes, when the number of known classes is small, the difference between the unknown and known classes is large, and the intersection between them is small, resulting in an overall increasing accuracy. However, as the number of known classes increases, the intersection between them gradually increases, leading to a sharp decrease in the detection accuracy of the unknown classes.
[0082] The application provides an open set classification system for network structure optimization. This system is used to execute the open set classification method for network structure optimization described in the above embodiments, such as... Figure 4 As shown, the system includes:
[0083] Image acquisition module 401 is used to acquire object images, the object images including known class objects and unknown class objects;
[0084] Model training module 402 is used to input the object image into a trained structure-optimized MobileNet V2 model;
[0085] The classification module 403 is used to output the probability distribution of known classes when using Softmax to output closed-set classification, and the probability distribution of unknown classes when using Openmax to output open-set classification.
[0086] The open set classification system for network structure optimization provided in the above embodiments of this application and the open set classification method for network structure optimization provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.
[0087] This application also provides an electronic device corresponding to the open set classification method for network structure optimization provided in the foregoing embodiments, for executing the open set classification method for network structure optimization. This application does not limit the scope of the embodiments.
[0088] Please refer to Figure 5 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 5 As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the open set classification method for network structure optimization provided in any of the foregoing embodiments of this application.
[0089] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.
[0090] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. Memory 201 is used to store programs. After receiving an execution instruction, processor 200 executes the program. The open set classification method for network structure optimization disclosed in any of the foregoing embodiments of this application can be applied to processor 200, or implemented by processor 200.
[0091] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.
[0092] The electronic device provided in this application embodiment and the open set classification method for network structure optimization provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0093] This application also provides a computer-readable storage medium corresponding to the open set classification method for network structure optimization provided in the foregoing embodiments. Please refer to... Figure 6 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the open set classification method for network structure optimization provided in any of the foregoing embodiments.
[0094] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.
[0095] The computer-readable storage medium provided in the above embodiments of this application and the open set classification method for network structure optimization provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.
[0096] It should be noted that:
[0097] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of this application.
[0098] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0099] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.
[0100] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0101] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0102] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the virtual machine creation system according to the embodiments of this application. This application can also be implemented as a device or system program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0103] It should be noted that the above embodiments are illustrative of this application and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several systems, several of these systems may be embodied by 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.
[0104] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An open set classification method for network structure optimization, characterized in that, include: Acquire object images, which include known class objects and unknown class objects; The object image is input into the trained, structure-optimized MobileNet V2 model; Softmax outputs the probability distribution of known classes in closed-set classification, while Openmax outputs the probability distribution of unknown classes in open-set classification. The optimized MobileNet V2 model is implemented based on the original MobileNet V2 model. The network structure of the optimized MobileNet V2 model consists of two lines, which are used for closed-set classification and open-set classification respectively. The two lines share the backbone network. The backbone network retains the convolutional layers and global pooling layers at the top and bottom of the original MobileNet V2 model, and reduces the Bottleneck layer of the original MobileNet V2 model, replacing some of the Bottleneck layers with convolutional operations. The number of neurons in the last convolutional layer of the backbone network represents the number of known class categories; The training process of the trained, structure-optimized MobileNet V2 model is as follows: The training and validation sets are obtained by calling the functions in the data preprocessing file; Receive configuration information, including hyperparameters, to train the model and obtain the model parameter file; The average activation vector and distance parameters are obtained by calling the functions in the open set classification file; The open-set classification file is used to encapsulate the activation vector acquisition function, the average activation vector calculation function, the distance calculation function, and the probability value calculation function; wherein... The activation vector retrieval function is used to obtain the activation vector values of the penultimate layer of the trained, structure-optimized MobileNet V2 model. The average activation vector calculation function and the distance calculation function are used to calculate the average activation vector and the distance value based on the activation vector values, respectively; The probability calculation function includes the process of fitting the Weibull model and modifying the activation vector values of the test samples, ultimately obtaining the probability value of the class.
2. The method according to claim 1, characterized in that, The training process of the structure-optimized MobileNet V2 model includes four types of files: data preprocessing files, model parameter files, open set classification files, and main program files.
3. The method according to claim 2, characterized in that, The data preprocessing file provides functions for reading, parsing, and dividing the dataset into training and validation sets, and encapsulates three functions: read_data(), set_data(), and splite_data(); among which... The read_data() function is responsible for parsing the dataset for a single category, filtering the start and end markers of each frame of the image, and storing the valid parts of the image together. The set_data() function is responsible for concatenating the image data and label data of all categories separately to form the total image data and label data; The `splite_data()` function is used to divide a dataset into a training set and a validation set according to a certain ratio.
4. An open-set classification system with optimized network structure, using the method described in any one of claims 1-3, characterized in that, include: The image acquisition module is used to acquire object images, which include known object types and unknown object types; The model training module is used to input the object image into a pre-trained, structure-optimized MobileNet V2 model. The classification module is used to output the probability distribution of known classes when using Softmax for closed-set classification, and the probability distribution of unknown classes when using Openmax for open-set classification.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-3.