CN112116060B - Network configuration implementation method and device - Google Patents

Network configuration implementation method and device Download PDF

Info

Publication number
CN112116060B
CN112116060B CN201910542665.8A CN201910542665A CN112116060B CN 112116060 B CN112116060 B CN 112116060B CN 201910542665 A CN201910542665 A CN 201910542665A CN 112116060 B CN112116060 B CN 112116060B
Authority
CN
China
Prior art keywords
resolution
parameter
network
parameters
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910542665.8A
Other languages
Chinese (zh)
Other versions
CN112116060A (en
Inventor
张朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910542665.8A priority Critical patent/CN112116060B/en
Publication of CN112116060A publication Critical patent/CN112116060A/en
Application granted granted Critical
Publication of CN112116060B publication Critical patent/CN112116060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application provides a network configuration implementation method and device, which are used for receiving externally input image data information, wherein the image data information at least comprises image resolution; checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter; if yes, configuring a neural network according to the target network operation parameters; if not, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network in an offline mode, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters.

Description

Network configuration implementation method and device
Technical Field
The present disclosure relates to the field of image processing and convolutional neural network technologies, and in particular, to a method and apparatus for implementing network configuration.
Background
Convolutional Neural Networks (CNNs) are used as typical networks of deep learning technologies, are increasingly widely applied in the fields of image recognition, target detection and the like, and the application scenes of related products are complex and changeable. In general, in the forward operation process on the platform, the CNN network executes and transmits intermediate results layer by layer according to network layer parameters in the model file based on the resolution of the image data input by the user until the last layer of the network outputs the final result of the current network, and in this transmission process, the parameters between each network layer are directly or indirectly affected by each other, i.e. when the resolution of the image input by the user changes, the parameters of each layer of the whole network may be affected to different degrees.
Considering the complexity and the variability of the CNN application scene, on one hand, the large probability of the resolution of the input image is different when different users use the CNN application scene, on the other hand, even if the resolution of the input image is the same, the actual interested Region (ROI) of the user is different in size, and more CNN is possibly calculated and processed aiming at the ROI in the actual application process, so that in the CNN application scene, the resolution of the input image is possibly changed, but the resolution parameters in the current network model are often fixed, and therefore, the network model cannot be well adapted to different application scenes.
Disclosure of Invention
In view of this, the present application provides a method and apparatus for implementing network configuration, so as to solve the problem that in the prior art, the network operation parameters in the convolutional neural network cannot be reconfigured according to the input resolution change.
Specifically, the application is realized by the following technical scheme:
according to a first aspect of embodiments of the present application, there is provided a network configuration implementation method, including:
receiving externally input image data information, wherein the image data information at least comprises image resolution;
checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter;
if yes, configuring a neural network according to the target network operation parameters;
if not, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network in an offline mode, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters.
As one embodiment, obtaining a first parameter which is extracted from the neural network when offline and is independent of resolution and used for representing structural characteristics of the neural network, comprises:
when the neural network is configured offline, parameters of the neural network are divided into structural feature parameters irrelevant to input resolution and configuration feature parameters relevant to the input resolution, and the structural feature parameters are extracted to serve as first parameters, wherein the first parameters comprise structural features of each network layer and topological structures of each network layer.
As one embodiment, calculating a second parameter for representing a resolution-related configuration feature in the neural network from the image resolution and the first parameter comprises:
and calculating configuration parameters corresponding to each network layer based on the structural features of each network layer and the topological structure of each network layer in the first parameters extracted from the neural network in an offline mode, wherein the configuration parameters at least comprise the memory size and the output resolution of each network layer.
As one embodiment, the stored correspondence between the specified resolution and the network operation parameter at least includes: a first network operating parameter; the method for generating the first network operation parameters comprises the following steps:
before receiving externally input image data information, acquiring first parameters which are independent of resolution and are used for representing structural characteristics of the neural network and are extracted from the neural network in an off-line mode, determining first network operation parameters according to the first parameters and second parameters corresponding to the specified resolution, and storing the corresponding relation between the specified resolution and the first network operation parameters.
As one embodiment, the specified resolution is a maximum resolution supported by the neural network.
According to a second aspect of embodiments of the present application, there is provided a network configuration implementation apparatus, the apparatus including:
a receiving unit configured to receive externally input image data information including at least an image resolution;
the checking unit is used for checking whether the stored corresponding relation between the designated resolution and the network operation parameters has the target network operation parameters corresponding to the image resolution;
a first configuration unit, configured to configure a neural network according to a target network operation parameter corresponding to the image resolution if the target network operation parameter exists;
and the second configuration unit is used for acquiring a first parameter which is independent of resolution and is extracted from the neural network when offline and used for representing the structural characteristics of the neural network if the target network operation parameter corresponding to the image resolution does not exist, calculating a second parameter which is used for representing the configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as the target network operation parameter, configuring the neural network according to the target network operation parameter, and storing the corresponding relation between the image resolution and the target network operation parameter.
As an embodiment, the second configuration unit comprises a first subunit,
the first subunit is configured to divide parameters of the neural network into structural feature parameters unrelated to the input resolution and configuration feature parameters related to the input resolution when the neural network is configured offline, and extract the structural feature parameters as first parameters, where the first parameters include structural features of each network layer and topology structures of each network layer.
As an embodiment, the second configuration unit comprises a second subunit,
the second subunit is configured to calculate a configuration parameter corresponding to each network layer based on the structural feature of each network layer in the first parameter and the topology structure of each network layer extracted from the neural network during offline, where the configuration parameter at least includes the memory size and the output resolution of each network layer.
As one embodiment, the stored correspondence between the specified resolution and the network operation parameter at least includes: a first network operating parameter; the apparatus further comprises:
and the generating unit is used for acquiring a first parameter which is independent of resolution and is used for representing the structural characteristics of the neural network and is extracted from the neural network when offline before receiving the externally input image data information, determining a first network operation parameter according to the first parameter and a second parameter corresponding to the specified resolution, and storing the corresponding relation between the specified resolution and the first network operation parameter.
As one embodiment, the specified resolution is a maximum resolution supported by the neural network.
According to a third aspect of embodiments of the present application, there is provided a computer device comprising a processor, a communication interface, a memory, and a communication bus;
the processor, the communication interface and the memory communicate with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the computer program stored in the memory, where the processor implements any step of the network configuration implementation method when executing the computer program.
According to a fourth aspect of embodiments of the present application, there is provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any network configuration implementation method.
As can be seen from the above embodiments, the present application may receive externally input image data information including at least an image resolution; checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter; if yes, configuring a neural network according to the target network operation parameters; if not, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network in an offline mode, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters. Compared with the prior art, the method and the device have the advantages that network operation parameters can be adjusted and updated according to the change of the input image resolution in the actual operation process, so that the same network model is adapted to different resolutions and application scenes, and the adaptability of the network model is enhanced; and the network operation parameters generated in advance can be saved, so that if the input image resolution is the same as the designated resolution, the saved network operation parameters can be acquired for network configuration without calculating the network operation parameters again, thereby simplifying the operation and improving the network execution efficiency.
Drawings
FIG. 1 is a flow chart of an embodiment of a method for implementing network configuration as an example of the present application;
fig. 2 is a schematic structural diagram of an exemplary network configuration device of the present application;
FIG. 3 is a schematic diagram of a processing scheme of an exemplary offline configuration module of the present application;
FIG. 4 is a schematic diagram of a processing scheme of an exemplary online configuration module of the present application;
FIG. 5 is a block diagram of one embodiment of a network configuration implementation device of the present application;
FIG. 6 is a block diagram of one embodiment of a computer device of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In order to cope with the problem, it is common practice to customize different network models according to the usage habits of users, each network model corresponds to the resolution of an image used by the user, but the actual operability of the method is not strong, when the user group is increased and the application scene changes are increased, the operation and maintenance cost of the method is too high, and the other practice is to perform scaling processing on the image input by the user and convert the image into the resolution corresponding to the original model for processing, so that the method is feasible in a scene with a small resolution change range, but in a scene with a large resolution change range, the method can cause the distortion of the original image to be large, thereby seriously reducing the precision of the network, and is also not preferable in a scene with a high requirement on the network precision.
In order to solve the problems in the prior art, the application provides a network configuration implementation method and device, which can receive externally input image data information, wherein the image data information at least comprises image resolution; checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter; if yes, configuring a neural network according to the target network operation parameters; if not, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network in an offline mode, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters. Compared with the prior art, the method and the device have the advantages that network operation parameters can be adjusted and updated according to the change of the input image resolution in the actual operation process, so that the same network model is adapted to different resolutions and application scenes, and the adaptability of the network model is enhanced; and the network operation parameters generated in advance can be saved, so that if the input image resolution is the same as the designated resolution, the saved network operation parameters can be acquired for network configuration without calculating the network operation parameters again, thereby simplifying the operation and improving the network execution efficiency.
Referring to fig. 1, a flowchart of an embodiment of a method for implementing network configuration is shown, which includes the following steps:
step 101, receiving externally input image data information, wherein the image data information at least comprises image resolution;
in this embodiment, when the neural network is operating on the platform, the user may input image data information including at least image resolution, and may further include information of an image format, an ROI, and the like in the neural network. The neural network may acquire image resolution from the input image data information when executing the neural network.
Step 102, checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter; if yes, go to step 103; if not, go to step 104;
in this embodiment, since the neural network of the present application may calculate the corresponding network operation parameters in advance according to a specified resolution, the specified resolution may include various resolutions, for example, a maximum resolution supported by the network, or a resolution of other size set based on experience or calculation requirements, or the like. After the network operation parameters are calculated, the corresponding relation between the specified resolution and the network operation parameters can be stored locally, so that after the input image resolution is obtained, whether the stored corresponding relation between the specified resolution and the network operation parameters has the target network operation parameters corresponding to the image resolution can be further checked. If there are target network operating parameters corresponding to the image resolution, step 103 may be performed; if there are no target network operating parameters corresponding to the image resolution, step 104 may be performed.
Step 103, configuring a neural network according to the target network operation parameters;
in this embodiment, if there is a target network operation parameter corresponding to the image resolution in the neural network, it is explained that the input image resolution is one of the specified resolutions, so that the current neural network can be configured according to the found target network operation parameter.
Therefore, the network operation parameters corresponding to the specified resolution can be calculated and stored in advance, so that when the input image resolution is the same as the specified resolution, the stored network operation parameters can be directly acquired to perform network configuration, the network operation parameters do not need to be calculated again, the operation can be simplified, and the network execution efficiency is improved.
104, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network when the neural network is offline, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters.
In the present embodiment, if there is no target network operation parameter corresponding to the image resolution in the neural network, it is explained that the input image resolution is not one of the specified resolutions, and therefore the network operation parameter matching the image resolution can be calculated from the image resolution.
In particular, a first parameter that is extracted from the neural network off-line and that is independent of resolution and that is used to characterize the structure of the neural network may be obtained.
As an embodiment, a developer may perform offline configuration on the neural network at the PC side in advance, specifically may analyze parameter information corresponding to each layer of the network when the neural network is configured offline, and then divide the parameters of the neural network into structural feature parameters unrelated to the input resolution and configuration feature parameters related to the input resolution, where the structural parameters may include parameters such as structural features of each layer of network, an interlayer topology structure, and the like, where the parameters have no relation with the input resolution and only represent structural features of the neural network; the configuration characteristic parameters can comprise parameters such as a memory, an output resolution and the like, the size of the parameters can be influenced by the input resolution, for example, if the input resolution is high, the memory occupied during calculation is large, and the output resolution of the picture is high; if the input resolution is low, the memory occupied during calculation is small, and the output resolution of the picture is low.
After the structural feature parameters and the configuration feature parameters are divided, the structural feature parameters may be extracted as first parameters including structural features of each network layer and topology structures of each network layer. Thereafter, a second parameter representing a resolution-related configuration feature in the neural network may be calculated from the image resolution and the first parameter.
As an embodiment, a second parameter representing a resolution-dependent configuration feature in the neural network may be calculated from the image resolution and the first parameter. Specifically, the structural features of each network layer and the topology structure of each network layer in the first parameters can be extracted from the neural network when offline, and the configuration features corresponding to each network layer can be calculated based on the input image resolution, so that the second parameters can be obtained. The second parameter at least comprises the memory size and the output resolution of each network layer.
And then taking the calculated first parameter and the second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters.
Based on the step 102, the present application may calculate the corresponding network operation parameter according to the specified resolution in advance, and as an embodiment, the stored correspondence between the specified resolution and the network operation parameter at least includes: a first network operating parameter; the specific method for generating the first network operation parameters is that before receiving externally input image data information, first parameters which are independent of resolution and are used for representing the structural characteristics of the neural network and are extracted from the neural network in an off-line mode are obtained, the first network operation parameters are determined according to the first parameters and second parameters corresponding to the specified resolution, and the corresponding relation between the specified resolution and the first network operation parameters is stored. The method for calculating the network operation parameters corresponding to the specified resolutions supported by the neural network and having different sizes is similar to the method for calculating the embodiment, and is not repeated here. By calculating and storing the network operation parameters corresponding to the plurality of different specified resolutions, when the input image resolution is obtained, matching can be performed in the corresponding relation between the recorded specified resolution and the network operation parameters, if the network operation parameters matched with the input image resolution exist, the network operation parameters can be directly used, so that the time for generating the network operation parameters is reduced, and the network execution efficiency is improved.
As an embodiment, the specified resolution may be a maximum resolution supported by the neural network. Each parameter in the first network operation parameters calculated based on the maximum resolution is the maximum configuration supported by the current neural network. Because the unstructured parameters influence the size of the memory required during the network operation, in the actual operation process, in order to ensure sufficient memory in the subsequent operation process, the memory configuration in the first network operation parameters can be made to be the maximum memory configuration supported by the current neural network by acquiring the maximum resolution supported by the current neural network as the designated resolution for calculating the first network operation parameters.
Compared with the prior art, the method and the device can utilize offline configuration and online configuration to distinguish the parameters of the neural network according to the correlation with the resolution, and acquire the first parameters which are irrelevant to the resolution and are used for representing the structural characteristics of the neural network in an offline manner, so that the first parameters can be suitable for the situation that the neural network corresponds to any image resolution; and then, the second parameter related to the resolution and used for representing the configuration characteristics of the neural network is configured in real time according to the resolution of the image input by the user in the network execution stage, so that the second parameter can be dynamically calculated according to the first parameter in a scene of changing the input resolution of the image, thereby realizing the dynamic configuration of the network operation parameters and improving the applicability of the neural network.
In order to make the above network configuration implementation method more clear, the network configuration implementation method of the present application will be described in detail with reference to fig. 2, 3 and 4.
Shown in fig. 2 is a block diagram of one embodiment of a network configuration system 20 for implementing network configuration in the present application, the network configuration system comprising: an offline configuration module 201 and an online configuration module 202, wherein:
the offline configuration module 201 is configured to adjust network configuration parameters based on an original network model file of the neural network, extract a first parameter that is independent of resolution and represents a network structural feature, and generate a platform model file that is adapted to the target platform in combination with characteristics of the target platform, where the offline configuration module 201 may be executed at a PC end.
The online configuration module 202 is configured to analyze the offline configured platform model file in a network execution stage, obtain the first parameter, calculate a second parameter for representing a network configuration feature based on an image resolution in image data information input by a user, set the first parameter and the second parameter as target network operation parameters, configure the neural network according to the target network operation parameters, and store a correspondence between the image resolution and the target network operation parameters, so that the neural network obtains a complete network configuration parameter, and further operate the neural network based on the network configuration parameter.
As an embodiment, the offline configuration module 201 performs the offline configuration process as shown in fig. 3, which includes:
step 301, analyzing the original model file to obtain parameter information of each network layer, and turning to step 302;
the parameter information of each network layer may include interlayer topology information of each network layer, where the interlayer topology information is used to facilitate subsequent operations such as network structure adjustment.
Step 302, extracting a first parameter irrelevant to resolution from the parameter information, and turning to step 303;
the parameter information is divided into a first parameter irrelevant to the resolution and a second parameter relevant to the resolution, wherein the first parameter irrelevant to the resolution is a structural parameter (including interlayer topology information) of the neural network, and needs to be reserved and transmitted to a platform end, the second parameter relevant to the resolution is a configuration parameter of the neural network, does not need to be reserved, and is then perfectly configured in the online configuration module 202 in combination with the resolution of the image input by the user.
And 303, packaging the first parameters, generating a platform model file, and ending.
The information of each network layer in the platform model file is packaged according to the parameters and the structural body when the platform end runs, so that the subsequent model analysis and configuration at the platform end are facilitated.
After generating the platform model file, the offline configuration module 201 may send the platform model file to the online configuration module 202, so that the online configuration module 202 dynamically configures network operation parameters according to the image resolution input by the user in the network execution stage.
As one embodiment, the online configuration module 202 performs the online configuration process as shown in FIG. 4, which includes:
step 401, obtaining the resolution of an image externally input to a neural network, and turning to step 402;
step 402, judging whether to locally store network operation parameters matched with the image resolution; if yes, go to step 403; if not, go to step 404;
step 403, configuring the neural network according to the network operation parameters, and ending;
step 404, acquiring a first parameter which is independent of resolution and is extracted from the neural network when offline and used for representing the structural characteristics of the neural network, and turning to step 405;
the first parameter specifically includes a composition structure of each network layer, for example, how many network layers are included, a name of each network layer, and interlayer topology information indicating a structural feature of each network layer, for example, parameters of a convolution layer, a core size of a pooling layer, a hop amount, and the like included in each network layer.
Step 405, calculating a second parameter for representing a configuration feature related to resolution in the neural network according to the image resolution and the first parameter, and turning to step 406;
specifically, the structural features of each network layer and the topology structure of each network layer in the first parameter may be extracted from the neural network when offline, the configuration features corresponding to each network layer may be calculated based on the input image resolution, for example, the memory required for processing the image with the image resolution and the output resolution corresponding to the output image may be calculated layer by layer according to the topology structure, and the memory and the output resolution of each layer and the topology structure of each layer may be associated, so as to obtain the second parameter.
Step 406, using the calculated first parameter and the second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, storing the corresponding relation between the image resolution and the target network operation parameters, and ending.
The neural network operating parameters configured therein include, but are not limited to: dimension information of the feature map, input data address information, and the like.
For example: for a convolutional layer, where the input information, including image resolution, image size, etc., is known, the output size can be calculated by the following formula:
wherein in_w, in_h, out_w and out_h are respectively input wide and high information and output wide and high information; pad_w and pad_h are pad values in the width direction and the height direction respectively; kernel width and height dimensions are shown as Kernel for Kernel; stride_w and Stride_h are the step sizes in the width and height directions respectively.
Therefore, the method and the device can distinguish the parameters of the convolutional neural network according to the correlation with the resolution by comprehensively utilizing the offline configuration and the online configuration, so that the dynamic configuration of the parameters of the configuration characteristics related to the resolution according to the change of the input image resolution can be realized, the scheme is suitable for the scene of the resolution change, and the network execution efficiency can be further improved by pre-configuring the network operation parameters corresponding to the designated resolution.
Corresponding to the embodiment of the network configuration implementation method, the application also provides an embodiment of the network configuration implementation device.
Referring to fig. 5, which is a block diagram of an embodiment of a network configuration implementation apparatus of the present application, the apparatus 50 may include:
a receiving unit 501 for receiving externally input image data information including at least an image resolution;
a checking unit 502, configured to check whether a target network operation parameter corresponding to the image resolution exists in the stored correspondence between the specified resolution and the network operation parameter;
a first configuration unit 503, configured to configure a neural network according to a target network operation parameter corresponding to the image resolution if the target network operation parameter exists;
and a second configuration unit 504, configured to obtain, if there is no target network operation parameter corresponding to the image resolution, a first parameter, which is extracted from the neural network and is independent of the resolution, for representing structural features of the neural network when offline, calculate, according to the image resolution and the first parameter, a second parameter, which is used for representing configuration features related to the resolution in the neural network, and use the calculated first parameter and second parameter as target network operation parameters, configure the neural network according to the target network operation parameters, and store a correspondence between the image resolution and the target network operation parameters.
As an example, the second configuration unit 504 comprises a first subunit 5041,
the first subunit 5041 is configured to divide, when configuring the neural network offline, parameters of the neural network into a structural feature parameter unrelated to an input resolution and a configuration feature parameter related to the input resolution, and extract the structural feature parameter as a first parameter, where the first parameter includes structural features of each network layer and a topology structure of each network layer.
As an example, the second configuration unit 504 includes a second sub-unit 5042,
the second subunit 5042 is configured to calculate a configuration parameter corresponding to each network layer based on the structural feature of each network layer in the first parameter and the topology structure of each network layer extracted from the neural network during offline, where the configuration parameter at least includes the memory size and the output resolution of each network layer.
As one embodiment, the stored correspondence between the specified resolution and the network operation parameter at least includes: a first network operating parameter; the apparatus further comprises:
the generating unit 505 is configured to obtain, before receiving externally input image data information, a first parameter, which is independent of resolution, and is extracted from the neural network during offline and is used to represent a structural feature of the neural network, determine a first network operation parameter according to the first parameter and a second parameter corresponding to a specified resolution, and store a correspondence between the specified resolution and the first network operation parameter.
As one embodiment, the specified resolution is a maximum resolution supported by the neural network.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Corresponding to the foregoing embodiments of the network configuration implementation method, the present application further provides embodiments of a computer device for executing the foregoing network configuration implementation method.
As an embodiment, please refer to fig. 6, a computer device includes a processor 61, a communication interface 62, a memory 63, and a communication bus 64;
wherein the processor 61, the communication interface 62 and the memory 63 communicate with each other through the communication bus 64;
the memory 63 is used for storing a computer program;
the processor 61 is configured to execute a computer program stored in the memory, where the processor 61 implements any step of a network configuration implementation method when executing the computer program.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the computer apparatus, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the description of the method embodiments in part.
Corresponding to the foregoing embodiments of the network configuration implementation method, the present application also provides embodiments of a computer-readable storage medium for performing the foregoing network configuration implementation method.
As an embodiment, the present application further includes a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of any network configuration implementation method.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments and computer-readable storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the partial description of method embodiments being relevant.
As can be seen from the above embodiments, the present application may receive externally input image data information including at least an image resolution; checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter; if yes, configuring a neural network according to the target network operation parameters; if not, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network in an offline mode, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters. Compared with the prior art, the method and the device have the advantages that network operation parameters can be adjusted and updated according to the change of the input image resolution in the actual operation process, so that the same network model is adapted to different resolutions and application scenes, and the adaptability of the network model is enhanced; and the network operation parameters generated in advance can be saved, so that if the input image resolution is the same as the designated resolution, the saved network operation parameters can be acquired for network configuration without calculating the network operation parameters again, thereby simplifying the operation and improving the network execution efficiency.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (12)

1. A method for implementing network configuration, the method comprising:
receiving externally input image data information, wherein the image data information at least comprises image resolution;
checking whether a target network operation parameter corresponding to the image resolution exists in the stored corresponding relation between the designated resolution and the network operation parameter;
if yes, configuring a neural network according to the target network operation parameters;
if not, acquiring a first parameter which is independent of resolution and is used for representing structural characteristics of the neural network and is extracted from the neural network in an offline mode, calculating a second parameter which is used for representing configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as target network operation parameters, configuring the neural network according to the target network operation parameters, and storing the corresponding relation between the image resolution and the target network operation parameters.
2. The method of claim 1, wherein obtaining a first resolution-independent parameter extracted from the neural network while offline for characterizing the neural network structure comprises:
when the neural network is configured offline, parameters of the neural network are divided into structural feature parameters irrelevant to input resolution and configuration feature parameters relevant to the input resolution, and the structural feature parameters are extracted to serve as first parameters, wherein the first parameters comprise structural features of each network layer and topological structures of each network layer.
3. The method of claim 2, wherein calculating a second parameter representing a resolution-related configuration feature in the neural network based on the image resolution and the first parameter comprises:
and calculating configuration parameters corresponding to each network layer based on the structural features of each network layer and the topological structure of each network layer in the first parameters extracted from the neural network in an offline mode, wherein the configuration parameters at least comprise the memory size and the output resolution of each network layer.
4. The method according to claim 1, wherein the stored correspondence between the specified resolution and the network operation parameter at least includes: a first network operating parameter; the method for generating the first network operation parameters comprises the following steps:
before receiving externally input image data information, acquiring first parameters which are independent of resolution and are used for representing structural characteristics of the neural network and are extracted from the neural network in an off-line mode, determining first network operation parameters according to the first parameters and second parameters corresponding to the specified resolution, and storing the corresponding relation between the specified resolution and the first network operation parameters.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
the specified resolution is a maximum resolution supported by the neural network.
6. A network configuration implementation apparatus, the apparatus comprising:
a receiving unit configured to receive externally input image data information including at least an image resolution;
the checking unit is used for checking whether the stored corresponding relation between the designated resolution and the network operation parameters has the target network operation parameters corresponding to the image resolution;
a first configuration unit, configured to configure a neural network according to a target network operation parameter corresponding to the image resolution if the target network operation parameter exists;
and the second configuration unit is used for acquiring a first parameter which is independent of resolution and is extracted from the neural network when offline and used for representing the structural characteristics of the neural network if the target network operation parameter corresponding to the image resolution does not exist, calculating a second parameter which is used for representing the configuration characteristics related to resolution in the neural network according to the image resolution and the first parameter, taking the calculated first parameter and second parameter as the target network operation parameter, configuring the neural network according to the target network operation parameter, and storing the corresponding relation between the image resolution and the target network operation parameter.
7. The apparatus of claim 6, wherein the second configuration unit comprises a first subunit,
the first subunit is configured to divide parameters of the neural network into structural feature parameters unrelated to the input resolution and configuration feature parameters related to the input resolution when the neural network is configured offline, and extract the structural feature parameters as first parameters, where the first parameters include structural features of each network layer and topology structures of each network layer.
8. The apparatus of claim 7, wherein the second configuration unit comprises a second subunit,
the second subunit is configured to calculate a configuration parameter corresponding to each network layer based on the structural feature of each network layer in the first parameter and the topology structure of each network layer extracted from the neural network during offline, where the configuration parameter at least includes the memory size and the output resolution of each network layer.
9. The apparatus of claim 6, wherein the stored correspondence between the specified resolution and the network operation parameter at least includes: a first network operating parameter; the apparatus further comprises:
and the generating unit is used for acquiring a first parameter which is independent of resolution and is used for representing the structural characteristics of the neural network and is extracted from the neural network when offline before receiving the externally input image data information, determining a first network operation parameter according to the first parameter and a second parameter corresponding to the specified resolution, and storing the corresponding relation between the specified resolution and the first network operation parameter.
10. The apparatus of claim 9, wherein the device comprises a plurality of sensors,
the specified resolution is a maximum resolution supported by the neural network.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-5.
12. A computer device comprising a memory, a processor, a communication interface, and a communication bus; the memory, the processor and the communication interface communicate with each other through the communication bus;
the memory is used for storing a computer program;
the processor being adapted to execute a computer program stored on the memory, the processor implementing the steps of the method according to any one of claims 1-5 when the computer program is executed.
CN201910542665.8A 2019-06-21 2019-06-21 Network configuration implementation method and device Active CN112116060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910542665.8A CN112116060B (en) 2019-06-21 2019-06-21 Network configuration implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910542665.8A CN112116060B (en) 2019-06-21 2019-06-21 Network configuration implementation method and device

Publications (2)

Publication Number Publication Date
CN112116060A CN112116060A (en) 2020-12-22
CN112116060B true CN112116060B (en) 2023-07-25

Family

ID=73796270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910542665.8A Active CN112116060B (en) 2019-06-21 2019-06-21 Network configuration implementation method and device

Country Status (1)

Country Link
CN (1) CN112116060B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217214A (en) * 2014-08-21 2014-12-17 广东顺德中山大学卡内基梅隆大学国际联合研究院 Configurable convolutional neural network based red green blue-distance (RGB-D) figure behavior identification method
CN104537393A (en) * 2015-01-04 2015-04-22 大连理工大学 Traffic sign recognizing method based on multi-resolution convolution neural networks
JP2016042359A (en) * 2014-08-18 2016-03-31 株式会社デンソーアイティーラボラトリ Recognition apparatus, real number matrix decomposition method, and recognition method
CN106127725A (en) * 2016-05-16 2016-11-16 北京工业大学 A kind of millimetre-wave radar cloud atlas dividing method based on multiresolution CNN
CN106886023A (en) * 2017-02-27 2017-06-23 中国人民解放军理工大学 A kind of Radar Echo Extrapolation method based on dynamic convolutional neural networks
WO2019020075A1 (en) * 2017-07-28 2019-01-31 北京市商汤科技开发有限公司 Image processing method, device, storage medium, computer program, and electronic device
CN109840889A (en) * 2019-01-24 2019-06-04 华东交通大学 High-precision vision measurement method, device and system based on bionic Algorithm

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016042359A (en) * 2014-08-18 2016-03-31 株式会社デンソーアイティーラボラトリ Recognition apparatus, real number matrix decomposition method, and recognition method
CN104217214A (en) * 2014-08-21 2014-12-17 广东顺德中山大学卡内基梅隆大学国际联合研究院 Configurable convolutional neural network based red green blue-distance (RGB-D) figure behavior identification method
CN104537393A (en) * 2015-01-04 2015-04-22 大连理工大学 Traffic sign recognizing method based on multi-resolution convolution neural networks
CN106127725A (en) * 2016-05-16 2016-11-16 北京工业大学 A kind of millimetre-wave radar cloud atlas dividing method based on multiresolution CNN
CN106886023A (en) * 2017-02-27 2017-06-23 中国人民解放军理工大学 A kind of Radar Echo Extrapolation method based on dynamic convolutional neural networks
WO2019020075A1 (en) * 2017-07-28 2019-01-31 北京市商汤科技开发有限公司 Image processing method, device, storage medium, computer program, and electronic device
CN109840889A (en) * 2019-01-24 2019-06-04 华东交通大学 High-precision vision measurement method, device and system based on bionic Algorithm

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《Speed/accuracy trade-offs for modern convolutional object detectors》;Jonathan Huang等;《2017 IEEE Conference on Computer Vision and Pattern Recognition》;全文 *
《基于双核嵌入式系统及ALN算法的智能气象站系统》;赖晓路 等;《计算机系统应用》;第22卷(第4期);全文 *

Also Published As

Publication number Publication date
CN112116060A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN109670474B (en) Human body posture estimation method, device and equipment based on video
CN107680589B (en) Voice information interaction method, device and equipment
CN107392842B (en) Image stylization processing method and device, computing equipment and computer storage medium
CN108875523B (en) Human body joint point detection method, device, system and storage medium
EP3380939B1 (en) Adaptive artificial neural network selection techniques
CN111179419B (en) Three-dimensional key point prediction and deep learning model training method, device and equipment
CN107277391B (en) Image conversion network processing method, server, computing device and storage medium
CN111476708A (en) Model generation method, model acquisition method, model generation device, model acquisition device, model generation equipment and storage medium
US20240203152A1 (en) Method for identifying human poses in an image, computer system, and non-transitory computer-readable medium
KR20230015430A (en) Method and apparatus for processing face information, electronic device and storage medium
CN107392316B (en) Network training method and device, computing equipment and computer storage medium
CN110569984A (en) configuration information generation method, device, equipment and storage medium
CN114612531B (en) Image processing method and device, electronic equipment and storage medium
CN113361567B (en) Image processing method, device, electronic equipment and storage medium
CN113327320A (en) Three-dimensional model reconstruction method, device, equipment and computer readable storage medium
US20220189151A1 (en) Processing system, estimation apparatus, processing method, and non-transitory storage medium
CN112116060B (en) Network configuration implementation method and device
CN105302715B (en) The acquisition methods and device of application program user interface
CN113409204A (en) Method and device for optimizing image to be processed, storage medium and electronic equipment
CN113095506A (en) Machine learning method, system and medium based on end, edge and cloud cooperation
CN110288668B (en) Image generation method, device, computer equipment and storage medium
CN110196630B (en) Instruction processing method, model training method, instruction processing device, model training device, computer equipment and storage medium
JP7113674B2 (en) Information processing device and information processing method
CN112801045B (en) Text region detection method, electronic equipment and computer storage medium
CN113052131B (en) Point cloud data processing and automatic driving vehicle control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant