CN110334763B - Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium - Google Patents

Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium Download PDF

Info

Publication number
CN110334763B
CN110334763B CN201910599358.3A CN201910599358A CN110334763B CN 110334763 B CN110334763 B CN 110334763B CN 201910599358 A CN201910599358 A CN 201910599358A CN 110334763 B CN110334763 B CN 110334763B
Authority
CN
China
Prior art keywords
model data
data file
image
training
model
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
CN201910599358.3A
Other languages
Chinese (zh)
Other versions
CN110334763A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910599358.3A priority Critical patent/CN110334763B/en
Publication of CN110334763A publication Critical patent/CN110334763A/en
Application granted granted Critical
Publication of CN110334763B publication Critical patent/CN110334763B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • G06V10/464Salient features, e.g. scale invariant feature transforms [SIFT] using a plurality of salient features, e.g. bag-of-words [BoW] representations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure discloses model data file generation and image recognition methods, devices, equipment and media. The method comprises the following steps: training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object; and sending the trained model data file matched with the target object to a client so that the client identifies the target object based on the model data file. The embodiment of the disclosure can accelerate the generation speed of the model and shorten the training period of the model.

Description

Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium
Technical Field
The embodiment of the disclosure relates to a data processing technology, and in particular, to a method, an apparatus, a device, and a medium for generating a model data file and recognizing an image.
Background
With the development of machine learning technology, machine learning models have become common and accurate image recognition methods.
For example, in the field of image recognition, the captured image may be input into a machine learning model trained in advance to obtain an image labeled with a target object. If the model is expected to recognize the target object, a plurality of images including the target object and a plurality of images not including the target object need to be collected and respectively used as training samples, and even the training samples need to be labeled manually. Therefore, the marked training samples are input into the model for model training, and the trained model is used as an image recognition model.
In the method for generating the model, the training process is complex, and the training time is long.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a medium for generating a model data file and identifying an image, which can accelerate the generation speed of a model and shorten the training period of the model.
In a first aspect, an embodiment of the present disclosure provides a method for generating a model data file, where the method includes:
training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object;
and sending the trained model data file matched with the target object to a client so that the client identifies the target object based on the model data file.
In a second aspect, an embodiment of the present disclosure further provides an image recognition method, applied in a client, including:
loading at least one model data file into a memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image;
and respectively carrying out image recognition on the image to be detected based on each model data file to obtain an image recognition result of the image to be detected.
In a third aspect, an embodiment of the present disclosure further provides a model data file generating apparatus, where the apparatus includes:
the single sample training module is used for training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object;
and the model data file generation module is used for sending the trained model data file matched with the target object to the client so as to enable the client to identify the target object based on the model data file.
In a fourth aspect, an embodiment of the present disclosure further provides an image recognition apparatus, including:
the model data file loading module is used for loading at least one model data file into the memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image;
and the image identification module is used for respectively carrying out image identification on the image to be detected based on each model data file to obtain an image identification result of the image to be detected.
In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a model data file generation method as in any of the embodiments of the present disclosure or an image recognition method as in any of the embodiments of the present disclosure.
In a sixth aspect, the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the model data file generating method according to any one of the embodiments of the present disclosure or the image recognition method according to any one of the embodiments of the present disclosure.
According to the method and the device, the machine learning model is trained on a single training image to obtain the matched model data file, the number of training samples of the machine learning model is reduced, the data volume related to the training process is reduced, the training speed is improved, the model training period is shortened, the generation efficiency of the model data file is improved, meanwhile, the operation is only performed on a single image, the training process is simplified, the complexity of model generation is reduced, the model data file is issued to the client, the client has the function of identifying a target object, the updating efficiency of the client model is improved, the problems that the generation process of the model is long and complex in the prior art are solved, the generation efficiency of the model data file is improved, the model training period is shortened, the model generation speed is increased, and meanwhile, the model updating efficiency of the client is improved.
Drawings
FIG. 1a is a flowchart of a method for generating a model data file according to a first embodiment of the disclosure;
FIG. 1b is a schematic diagram of a single training image in accordance with one embodiment of the present disclosure;
fig. 2 is a flowchart of an image recognition method in the second embodiment of the disclosure;
fig. 3 is a flowchart of an image recognition method in a third embodiment of the disclosure;
fig. 4 is a schematic structural diagram of a model data file generation apparatus in a fourth embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an image recognition apparatus in a fifth embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device in a sixth embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Example one
Fig. 1a is a flowchart of a method for generating a model data file according to a first embodiment of the present disclosure, where the method is applicable to a case where a model data file is generated and issued in real time, the method may be executed by a model data file generating apparatus, the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be configured in an electronic device, such as a server or a terminal device, where a typical terminal device includes a desktop computer or a notebook computer. As shown in fig. 1a, the method specifically includes the following steps:
s110, training an initial machine learning model according to a single training image, wherein the single training image is a blank area except the target object.
A single training image is used to train the machine learning model. The single training image only contains the target object and is used for extracting the feature points of the target object only and reducing the interference of the feature points of other non-target objects, so that the identification accuracy of the machine learning model formed based on the training of the single training image is ensured.
The target object may refer to an object to be recognized. Optionally, the target object comprises a planar pattern. Illustratively, the planar pattern includes a poster or a trademark. Illustratively, as shown in fig. 1b, the training image 131 only includes the target object 132, and the other areas are blank areas, wherein the target object 132 is a picture including a lightning pattern.
The machine learning model may refer to a model for performing image recognition technology based on image features to realize recognition, and may be, for example, a Bag of words model (Bag of word).
And S120, sending the trained model data file matched with the target object to the client so that the client can identify the target object based on the model data file.
The model data file is used for storing feature data associated with the target object, and for example, the model data file includes a codebook of a single training image, feature points of a single training image, and the like.
Optionally, the model data file stores feature data of the single training image, and the number of feature points included in the feature data exceeds a set number threshold.
It can be understood that if the characteristic points extractable by the target object are too few, that is, the characteristics of the target object are not significant, it is difficult to distinguish the target object from other objects, thereby resulting in low recognition accuracy of the model.
A threshold number is set for defining the number of extractable feature points in the target object, and for example, the threshold number is set to 200.
The quantity of the characteristic points which can be extracted from the target object is limited by configuring the number threshold, so that a large number of characteristic points different from other objects can be extracted from the target object, the target object can be accurately identified based on the model data file in which a large number of characteristic data of the target object are stored, and the identification accuracy of the target object is improved.
In one specific example, the machine learning model training process: extracting feature points of the target image, wherein the number of the feature points exceeds a set number threshold; clustering all the characteristic points to form a plurality of classes, and determining the clustering center of each class; and determining the distance between each characteristic point of the target image and the clustering center of each class, and coding the target image based on each distance to obtain a codebook of the target image.
In particular, the machine learning model includes a bag of words model. Features are extracted from a single training image using the orb (organized FAST and organized brief) algorithm, which is a combination of simplified (BREIF) feature descriptors for FAST (FAST) feature point detection methods. The features actually refer to key information that can represent the single training image. All feature points extracted from each training image are clustered, and the center of each class is determined, wherein all feature points form a bag of words. Determining the codebook may specifically be to obtain a histogram of the training image, that is, the number of the feature points of the training image falling into each class, so as to obtain the features of the training image under the bag-of-words model, that is, the codebook of the training image.
Optionally, the sending to the client includes: and sending the model data file to a client through a predefined model data transmission interface.
The model data transmission interface is used for transmitting model data files. Before the main program is released, a model data transmission interface needs to be defined, the model data transmission interface cannot be changed after the main program is released, and the model data transmission interface is updated until the next release period and the main program is released again.
By predefining the model data transmission interface, the model data file is accurately transmitted in real time, the updating efficiency of the model data file is improved, and the recognizable object range of the client model is increased.
Optionally, the model data file is generated by a server and is issued in real time. Specifically, the server provides a visualization page for the user, and a control for adding a single training image is displayed in the visualization page. Specifically, after a single training image is added by a user, the server automatically generates a model data file and issues the model data file to each client in real time. Further, the visualization page includes at least one of: the method comprises the steps of previewing areas of thumbnails of single training images, addresses of the single training images, model training controls, controls for issuing generated model data files and the like. The visualization page may also include other content, to which embodiments of the present disclosure are not particularly limited.
According to the method and the device, the machine learning model is trained on a single training image to obtain the matched model data file, the number of training samples of the machine learning model is reduced, the data volume related to the training process is reduced, the training speed is improved, the model training period is shortened, the generation efficiency of the model data file is improved, meanwhile, the operation is only performed on a single image, the training process is simplified, the complexity of model generation is reduced, the model data file is issued to the client, the client has the function of identifying a target object, the updating efficiency of the client model is improved, the problems that the generation process of the model is long and complex in the prior art are solved, the generation efficiency of the model data file is improved, the model training period is shortened, the model generation speed is increased, and meanwhile, the model updating efficiency of the client is improved.
Example two
Fig. 2 is a flowchart of an image recognition method in a second embodiment of the present disclosure, where the present embodiment is applicable to image recognition of an image to be detected, the method may be executed by an image recognition device, the device may be implemented in a software and/or hardware manner, and the device may be configured in an electronic device, for example, a mobile terminal, where a typical mobile terminal includes a mobile phone, a vehicle-mounted terminal, or a notebook computer. The method specifically comprises the following steps:
s210, when an image identification instruction aiming at an image to be detected is received, loading at least one model data file into a memory; wherein the model data file is formed by training an initial machine learning model from a single training image.
The image to be detected can be a pre-stored image or a video frame in a real-time recorded video. The image recognition instructions are used to load the model data file and to invoke the image recognition model function program. The image recognition instruction may refer to an instruction input by a user through a trigger operation.
In a specific example, a user can call a camera to shoot a video in real time by touching a scanning control or other image recognition controls, collect an image to be detected, and detect the image to be detected in real time.
Specifically, the image recognition model function program may be a main program; or may be a program that runs with the main program as the running environment.
The model data file may refer to the description of the above embodiments.
After the model data file is loaded into the memory, the image recognition model function program can acquire the data in the model data file loaded in the memory and realize the image recognition function.
S220, respectively carrying out image recognition on the image to be detected based on each model data file to obtain an image recognition result of the image to be detected.
In fact, different model data files respectively and correspondingly store feature data of different known objects, the image recognition model function program can match the feature data in the model data files with the images to be detected one by one, and the image recognition result is obtained by taking the high matching degree.
Specifically, as in the previous example, the machine learning model is a bag-of-words model, and the image recognition model function program extracts feature points of the image to be detected, and performs cluster analysis based on the existing classes of the bag-of-words model to obtain target feature points of the image to be detected under the bag-of-words model. And acquiring the characteristic points of the known objects, respectively calculating the distance between each target characteristic point and the characteristic point of each known object, determining the distance between the image to be detected and each known object, and taking the known object with the minimum distance as the image identification result of the image to be detected.
Optionally, before receiving the image recognition instruction for the target image, the method further includes: and receiving the model data file sent by the server through the model data transmission interface.
The model data transmission interface is used for transmitting model data files. Specifically, the model data transmission interface is used for providing a model data transmission service. By predefining a model data transmission interface, the model data file is accurately received in real time, the updating efficiency of the model data file is improved, image recognition is carried out according to the updated model data file, and the recognizable object range of the client model is increased, so that objects which can not be recognized historically can be recognized, and the accuracy of object recognition is improved.
According to the method and the device, the training samples of the machine learning model are reduced, the training data volume is reduced, the training process is simplified, the obtaining speed of the model data file is increased, the updating efficiency of the model data file is improved, image recognition is performed according to the updated model data file, the recognizable object range of the client model is increased, objects which can not be recognized historically can be recognized, and the accuracy of object recognition is improved.
EXAMPLE III
Fig. 3 is a flowchart of an image recognition method in the third embodiment of the present disclosure, and this embodiment provides an interaction situation between a server and a client, which is suitable for the above embodiments.
The method specifically comprises the following steps:
s310, training an initial machine learning model by a server according to a single training image, wherein the single training image is a blank area except a target object;
in the embodiments of the present disclosure, reference may be made to the description of the above embodiments for a single training image, a machine learning model, a model data transmission interface, a model data file, an image to be detected, and the like.
And S320, the server sends the trained model data file matched with the target object to a client through a predefined model data transmission interface.
S330, the client receives the model data file through the model data transmission interface.
S340, when receiving an image identification instruction aiming at the image to be detected, the client loads at least one model data file into a memory.
And S350, the client side respectively carries out image recognition on the image to be detected based on each model data file to obtain an image recognition result of the image to be detected.
According to the method and the device, the matched model data file is obtained by training the machine learning model through a single training image, the training samples of the machine learning model are reduced, the training data volume is reduced, the training process is simplified, the generation speed of the model data file is increased, meanwhile, the model data file is issued to the client in real time, the updating efficiency of the client model is improved, the client can perform image recognition according to the updated model data file, the recognizable object range of the client model is increased, objects which can not be recognized historically can be recognized, and the accuracy of object recognition is improved.
Example four
Fig. 4 is a schematic structural diagram of a model data file generation apparatus according to a fourth embodiment of the present disclosure, which is applicable to a case where a model data file is generated and delivered in real time. The apparatus may be implemented in software and/or hardware, and may be configured in an electronic device, such as a server or a terminal device, where a typical terminal device includes a desktop computer or a notebook computer. As shown in fig. 4, the apparatus may include: a single sample training module 410 and a model data file generation module 420.
A single sample training module 410, configured to train an initial machine learning model according to a single training image, where the single training image is a blank area except for a target object;
and the model data file generating module 420 is configured to send the trained model data file matched with the target object to the client, so that the client identifies the target object based on the model data file.
According to the method and the device, the machine learning model is trained on a single training image to obtain the matched model data file, the number of training samples of the machine learning model is reduced, the data volume related to the training process is reduced, the training speed is improved, the model training period is shortened, the generation efficiency of the model data file is improved, meanwhile, the operation is only performed on a single image, the training process is simplified, the complexity of model generation is reduced, the model data file is issued to the client, the client has the function of identifying a target object, the updating efficiency of the client model is improved, the problems that the generation process of the model is long and complex in the prior art are solved, the generation efficiency of the model data file is improved, the model training period is shortened, the model generation speed is increased, and meanwhile, the model updating efficiency of the client is improved.
Further, the model data file stores feature data of the single training image, and the number of feature points included in the feature data exceeds a set number threshold.
Further, the model data file generating module 420 includes: and the model data transmission interface transmission unit is used for transmitting the model data file to the client through a predefined model data transmission interface.
Further, the target object includes a planar pattern.
The model data file generation device provided by the embodiment of the present disclosure is the same as the model data file generation method provided by the foregoing embodiment, and the technical details that are not described in detail in the embodiment of the present disclosure can be referred to the foregoing embodiment.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an image recognition apparatus provided in the fifth embodiment of the present disclosure, which is applicable to the case of performing image recognition on an image to be detected. The apparatus may be implemented in software and/or hardware, and may be configured in an electronic device, such as a mobile terminal, where a typical mobile terminal includes a mobile phone, a vehicle-mounted terminal, or a notebook computer. As shown in fig. 5, the apparatus may include: a model data file loading module 510 and an image recognition module 520.
A model data file loading module 510, configured to load at least one model data file into a memory when receiving an image recognition instruction for an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image;
and the image identification module 520 is configured to perform image identification on the image to be detected based on each model data file, so as to obtain an image identification result of the image to be detected.
According to the method and the device, the training samples of the machine learning model are reduced, the training data volume is reduced, the training process is simplified, the obtaining speed of the model data file is increased, the updating efficiency of the model data file is improved, image recognition is performed according to the updated model data file, the recognizable object range of the client model is increased, objects which can not be recognized historically can be recognized, and the accuracy of object recognition is improved.
Further, the image recognition apparatus further includes: and the model data transmission interface transmission module is used for receiving the model data file sent by the server through the model data transmission interface before receiving the image identification instruction aiming at the target image.
The image recognition device provided by the embodiment of the present disclosure is the same as the image recognition method provided by the foregoing embodiment, and the technical details that are not described in detail in the embodiment of the present disclosure can be referred to the foregoing embodiment, and the image recognition device provided by the embodiment of the present disclosure has the same beneficial effects as the image recognition method provided by the foregoing embodiment.
EXAMPLE six
Referring now to fig. 6, a block diagram of an electronic device (e.g., a server or terminal device) 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
EXAMPLE seven
The computer readable medium described above in this disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object; and sending the trained model data file matched with the target object to a client so that the client identifies the target object based on the model data file.
Or when the one or more programs are executed by the electronic device, cause the electronic device to: loading at least one model data file into a memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image; and respectively carrying out image recognition on the image to be detected based on each model data file to obtain an image recognition result of the image to be detected.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module does not constitute a limitation on the module itself under certain circumstances, for example, a single sample training module may also be described as "a module that trains an initial machine learning model from a single training image in which there are blank regions other than the target object".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a model data file generation method including:
training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object;
and sending the trained model data file matched with the target object to a client so that the client identifies the target object based on the model data file.
According to one or more embodiments of the present disclosure, in the model data file generation method provided by the present disclosure, the model data file stores feature data of the single training image, and the number of feature points included in the feature data exceeds a set number threshold.
According to one or more embodiments of the present disclosure, in the model data file generation method provided by the present disclosure, the sending to the client includes: and sending the model data file to a client through a predefined model data transmission interface.
According to one or more embodiments of the present disclosure, there is provided a model data file generating method in which the target object includes a planar pattern.
According to one or more embodiments of the present disclosure, there is provided an image recognition method including:
loading at least one model data file into a memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image;
and respectively carrying out image recognition on the image to be detected based on each model data file to obtain an image recognition result of the image to be detected.
According to one or more embodiments of the present disclosure, before receiving an image recognition instruction for a target image, the image recognition method further includes: and receiving the model data file sent by the server through the model data transmission interface.
According to one or more embodiments of the present disclosure, there is provided a model data file generating apparatus including:
the single sample training module is used for training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object;
and the model data file generation module is used for sending the trained model data file matched with the target object to the client so as to enable the client to identify the target object based on the model data file.
According to one or more embodiments of the present disclosure, in a model data file generation apparatus provided by the present disclosure, the model data file stores feature data of the single training image, where the number of feature points included in the feature data exceeds a set number threshold.
According to one or more embodiments of the present disclosure, in a model data file generation apparatus provided by the present disclosure, the model data file generation module includes: and the model data transmission interface transmission unit is used for transmitting the model data file to the client through a predefined model data transmission interface.
According to one or more embodiments of the present disclosure, there is provided a model data file generating apparatus, the target object including a planar pattern.
According to one or more embodiments of the present disclosure, there is provided an image recognition apparatus configured in a client, including:
the model data file loading module is used for loading at least one model data file into the memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image;
and the image identification module is used for respectively carrying out image identification on the image to be detected based on each model data file to obtain an image identification result of the image to be detected.
According to one or more embodiments of the present disclosure, the present disclosure provides an image recognition apparatus, further comprising: and the model data transmission interface transmission module is used for receiving the model data file sent by the server through the model data transmission interface before receiving the image identification instruction aiming at the target image.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the model data file generation method as any one of the model data file generation methods provided by the present disclosure or the image recognition method as any one of the embodiments of the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the model data file generating method according to any one of the embodiments of the present disclosure or the image recognition method according to any one of the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for generating a model data file, comprising:
training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object;
sending the trained model data file matched with the target object to a client so that the client can identify the target object based on the model data file; and sending the model data file matched with the target object obtained by training to a client, wherein the model data file is automatically generated by a server and is issued in real time.
2. The method of claim 1, wherein the model data file stores feature data for the single training image, the number of feature points included in the feature data exceeding a set number threshold.
3. The method of claim 1, wherein sending to the client comprises:
and sending the model data file to a client through a predefined model data transmission interface.
4. The method of claim 1, wherein the target object comprises a planar pattern.
5. An image recognition method is applied to a client and comprises the following steps:
loading at least one model data file into a memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image; the different model data files respectively and correspondingly store the characteristic data of different known objects, and the characteristic data are automatically generated by the server and are issued to the client in real time;
and respectively carrying out image recognition on the image to be detected based on each model data file to obtain an image recognition result of the image to be detected.
6. The method of claim 5, further comprising, prior to receiving the image recognition instruction for the target image:
and receiving the model data file sent by the server through the model data transmission interface.
7. A model data file generation apparatus, comprising:
the single sample training module is used for training an initial machine learning model according to a single training image, wherein the single training image is a blank area except a target object;
the model data file generation module is used for sending a model data file which is obtained by training and matched with the target object to a client so that the client can identify the target object based on the model data file; and sending the model data file matched with the target object obtained by training to a client, wherein the model data file is automatically generated by a server and is issued in real time.
8. An image recognition apparatus, which is provided in a client, includes:
the model data file loading module is used for loading at least one model data file into the memory when receiving an image identification instruction aiming at an image to be detected; the model data file is formed by training an initial machine learning model according to a single training image; the different model data files respectively and correspondingly store the characteristic data of different known objects, and the characteristic data are automatically generated by the server and are issued to the client in real time;
and the image identification module is used for respectively carrying out image identification on the image to be detected based on each model data file to obtain an image identification result of the image to be detected.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the model data file generation method of any one of claims 1-4 or the image recognition method of any one of claims 5-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a model data file generation method according to any one of claims 1 to 4 or an image recognition method according to any one of claims 5 to 6.
CN201910599358.3A 2019-07-04 2019-07-04 Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium Active CN110334763B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910599358.3A CN110334763B (en) 2019-07-04 2019-07-04 Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910599358.3A CN110334763B (en) 2019-07-04 2019-07-04 Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium

Publications (2)

Publication Number Publication Date
CN110334763A CN110334763A (en) 2019-10-15
CN110334763B true CN110334763B (en) 2021-07-23

Family

ID=68144175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910599358.3A Active CN110334763B (en) 2019-07-04 2019-07-04 Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium

Country Status (1)

Country Link
CN (1) CN110334763B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113536023A (en) * 2021-08-06 2021-10-22 广东电网有限责任公司 Drawing file management method and system based on BIM and Internet of things

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637251A (en) * 2012-03-20 2012-08-15 华中科技大学 Face recognition method based on reference features
CN103294813A (en) * 2013-06-07 2013-09-11 北京捷成世纪科技股份有限公司 Sensitive image search method and device
CN106777350A (en) * 2017-01-16 2017-05-31 青岛海信网络科技股份有限公司 It is a kind of based on bayonet socket data scheming to search drawing method and device
CN107122375A (en) * 2016-12-12 2017-09-01 南京理工大学 The recognition methods of image subject based on characteristics of image
CN107527058A (en) * 2017-07-25 2017-12-29 北京理工大学 A kind of image search method based on weighting local feature Aggregation Descriptor
CN108491543A (en) * 2018-03-30 2018-09-04 广州汇智通信技术有限公司 Image search method, image storage method and image indexing system
CN108664921A (en) * 2018-05-10 2018-10-16 江苏大学 Image-recognizing method and system based on bag of words under a kind of Android platform
CN109614508A (en) * 2018-12-12 2019-04-12 杭州知衣科技有限公司 A kind of image of clothing searching method based on deep learning

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022317A (en) * 2016-06-27 2016-10-12 北京小米移动软件有限公司 Face identification method and apparatus
CN106529583A (en) * 2016-11-01 2017-03-22 哈尔滨工程大学 Bag-of-visual-word-model-based indoor scene cognitive method
CN108304936B (en) * 2017-07-12 2021-11-16 腾讯科技(深圳)有限公司 Machine learning model training method and device, and expression image classification method and device
CN108416326B (en) * 2018-03-27 2021-07-16 百度在线网络技术(北京)有限公司 Face recognition method and device
CN108921929A (en) * 2018-06-26 2018-11-30 开放智能机器(上海)有限公司 A kind of recognition methods of identifying system and training method and individual monocular image
CN109117879B (en) * 2018-08-03 2021-06-22 南京旷云科技有限公司 Image classification method, device and system
CN109948707B (en) * 2019-03-20 2023-04-18 腾讯科技(深圳)有限公司 Model training method, device, terminal and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637251A (en) * 2012-03-20 2012-08-15 华中科技大学 Face recognition method based on reference features
CN103294813A (en) * 2013-06-07 2013-09-11 北京捷成世纪科技股份有限公司 Sensitive image search method and device
CN107122375A (en) * 2016-12-12 2017-09-01 南京理工大学 The recognition methods of image subject based on characteristics of image
CN106777350A (en) * 2017-01-16 2017-05-31 青岛海信网络科技股份有限公司 It is a kind of based on bayonet socket data scheming to search drawing method and device
CN107527058A (en) * 2017-07-25 2017-12-29 北京理工大学 A kind of image search method based on weighting local feature Aggregation Descriptor
CN108491543A (en) * 2018-03-30 2018-09-04 广州汇智通信技术有限公司 Image search method, image storage method and image indexing system
CN108664921A (en) * 2018-05-10 2018-10-16 江苏大学 Image-recognizing method and system based on bag of words under a kind of Android platform
CN109614508A (en) * 2018-12-12 2019-04-12 杭州知衣科技有限公司 A kind of image of clothing searching method based on deep learning

Also Published As

Publication number Publication date
CN110334763A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN109947989B (en) Method and apparatus for processing video
CN110059623B (en) Method and apparatus for generating information
CN111784712B (en) Image processing method, device, equipment and computer readable medium
CN110084317B (en) Method and device for recognizing images
CN113313064A (en) Character recognition method and device, readable medium and electronic equipment
CN109934142B (en) Method and apparatus for generating feature vectors of video
CN111126159A (en) Method, apparatus, electronic device, and medium for tracking pedestrian in real time
CN113033707B (en) Video classification method and device, readable medium and electronic equipment
CN111597107B (en) Information output method and device and electronic equipment
CN110334763B (en) Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium
CN111311358B (en) Information processing method and device and electronic equipment
CN110414625B (en) Method and device for determining similar data, electronic equipment and storage medium
CN111708680A (en) Error reporting information analysis method and device, electronic equipment and storage medium
CN110765304A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN113033552B (en) Text recognition method and device and electronic equipment
CN114140723B (en) Multimedia data identification method and device, readable medium and electronic equipment
CN113222050B (en) Image classification method and device, readable medium and electronic equipment
CN111832354A (en) Target object age identification method and device and electronic equipment
CN111586295B (en) Image generation method and device and electronic equipment
CN111310858B (en) Method and device for generating information
CN111401182B (en) Image detection method and device for feeding rail
CN110781066B (en) User behavior analysis method, device, equipment and storage medium
CN113705386A (en) Video classification method and device, readable medium and electronic equipment
CN113191257A (en) Order of strokes detection method and device and electronic equipment
CN112418233A (en) Image processing method, image processing device, readable medium and electronic equipment

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