Learning Device

The learning device addresses fragmented trajectory data issues by using a weighted loss function to learn a discriminative model, enhancing the accuracy and reliability of object classification in liquids.

JP7574944B2Active Publication Date: 2024-10-29NEC CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023549265
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2024-10-29
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

Existing identification models struggle with fragmented movement trajectory data of objects in liquids due to lens effects, lighting conditions, and tracking failures, leading to misidentification issues.

Method used

A learning device that calculates a discrimination score for data using a weighted loss function based on the relative height of the discrimination score within a group of data, learning a discriminative model to handle fragmented data effectively.

Benefits of technology

The solution results in an identification model resistant to fragmentation and reduces misidentification with high scores, ensuring accurate classification of objects in liquids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007574944000001
    Figure 0007574944000001
  • Figure 0007574944000002
    Figure 0007574944000002
  • Figure 0007574944000003
    Figure 0007574944000003
Patent Text Reader

Abstract

This learning device comprises a training means which trains an identification model that identifies a class, to which second data corresponding to an unknown target belongs, by using first training data including a group including a plurality of pieces of first data corresponding to an identical target, and a first data label for the group. The training means calculates an identification score for the first data by using the identification model, and trains the identification model by using losses weighted by means of weights dependent on relative heights of the identification scores within the group.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a learning device, a learning method, and a recording medium for machine learning a discriminative model that identifies a class to which data belongs. [Background technology]

[0002] 2. Description of the Related Art There have been proposed devices and methods for inspecting the presence or absence of foreign matter in a liquid enclosed in a transparent or translucent container.

[0003] For example, Patent Document 1 proposes a method and apparatus for inspecting whether or not a foreign object is present in a liquid by obtaining data representing the movement trajectory of an object in the liquid through observation and comparing this obtained movement trajectory data with previously learned movement trajectory data of a foreign object in the liquid. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2019-174346 A Summary of the Invention [Problem to be solved by the invention]

[0005] When the movement trajectory of an object in a liquid is obtained by observation, the movement trajectory of the same object may be observed in fragments. That is, when an object moves from a starting point S to an end point E during an observation period, it is ideal that the entire movement trajectory from the starting point S to the end point E is observed as the movement trajectory of the object. However, due to factors such as the lens effect of the container, disappearance of the object's shadow due to lighting conditions, obscuration by shadows or other objects, and tracking failure due to changes in the appearance of the object's shadow, a part of the movement trajectory may be observed as the movement trajectory data of the object. For example, a partial movement trajectory from the starting point S to a midpoint, a partial movement trajectory from a midpoint to another midpoint, or a partial movement trajectory from a midpoint to the end point E may be observed as the movement trajectory data of the object. The phenomenon in which a part of the entire movement trajectory is observed as if it were the entire movement trajectory is called fragmentation of the movement trajectory data.

[0006] However, learning a discrimination model assuming such fragmentation has not been done in the past. Therefore, there was a problem that it was difficult to discriminate fragmented data. This problem is not limited to discrimination models that discriminate object classes from the movement trajectories of objects in liquid, but occurs in all discrimination models that input data and discriminate the data classes.

[0007] The present invention provides a learning device that solves the above-mentioned problems. [Means for solving the problem]

[0008] A learning device according to one aspect of the present invention includes: a learning means for learning a discrimination model for identifying a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; The learning means calculates a classification score for the first data using the classification model, and learns the classification model using a loss weighted by a weight that depends on a relative level of the classification score within the group. It is structured as follows.

[0009] In addition, a learning method according to another aspect of the present invention includes: A discrimination model is trained to identify a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; In the learning, a classification score for the first data is calculated using the classification model; Calculating a weight that depends on the relative rank of the discrimination score within the group; Calculating a weighted loss using the calculated weights; training the discriminative model using the weighted loss; It is structured as follows.

[0010] In addition, a computer-readable recording medium according to another aspect of the present invention includes: On the computer, a process of learning a discrimination model for identifying a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; In the above learning, calculating a classification score for the first data using the classification model; Calculating a weight depending on the relative height of the classification score within the group; calculating a weighted loss using the calculated weights; training the discriminative model using the weighted loss; The recording medium is configured to record a program for causing the recording medium to perform the above steps. Effect of the Invention

[0011] By having the above-described configuration, the present invention can obtain a classification model that is resistant to fragmentation and has a high score and is less likely to cause misclassification. [Brief description of the drawings]

[0012] [Figure 1] 1 is a block diagram of an inspection system to which a learning device according to a first embodiment of the present invention is applied. [Diagram 2] 1 is a block diagram showing an example of an inspection device according to a first embodiment of the present invention. [Diagram 3] FIG. 2 is a diagram showing an example of a configuration of image information in the first embodiment of the present invention. [Figure 4] FIG. 2 is a diagram showing an example of a configuration of tracking information in the first embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram showing an example of a configuration of test result information in the first embodiment of the present invention. [Figure 6] 5 is a flowchart showing an example of an operation in a learning phase in the first embodiment of the present invention. [Figure 7] 5 is a flowchart showing an example of an operation in a test phase in the first embodiment of the present invention. [Figure 8] FIG. 2 is a diagram illustrating an example of the configuration of two types of teacher data used in machine learning of a discrimination model in the first embodiment of the present invention. [Figure 9] 2 is a schematic diagram showing an example of a method in which a discrimination model learning unit creates teacher data 251 from teacher data 250 in the first embodiment of the present invention. FIG. [Figure 10] 5 is a flowchart showing an example of a learning process of a discrimination model learning unit in the first embodiment of the present invention. [Figure 11] FIG. 2 is a diagram showing an equation used in the first embodiment of the present invention. [Figure 12] 5 is a flowchart showing an example of a process of a determination unit in the first embodiment of the present invention. [Figure 13] FIG. 2 is a diagram showing a schematic example of a movement trajectory of a floating object used as training data in the first embodiment of the present invention. [Figure 14] FIG. 11 is a block diagram of a learning device according to a second embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] [First embodiment] Fig. 1 is a block diagram of an inspection system 100 to which a learning device according to a first embodiment of the present invention is applied. Referring to Fig. 1, the inspection system 100 is a system that inspects the presence or absence of foreign matter in a liquid sealed in a container 400. The inspection system 100 includes, as main components, a gripping device 110, a lighting device 120, a camera device 130, an inspection device 200, and a display device 300.

[0014] The container 400 is a transparent or semi-transparent container such as a glass bottle or a plastic bottle. The inside of the container 400 is sealed or filled with a liquid such as medicine or water. There is a possibility that foreign matter may be mixed into the liquid sealed in the container 400. Possible examples of foreign matter include glass fragments, plastic fragments, rubber fragments, hair, fiber fragments, soot, and the like.

[0015] The gripping device 110 is configured to grip the container 400 in a predetermined position. The predetermined position may be any position. For example, the position of the container 400 when it is upright may be the predetermined position. Alternatively, the position of the container 400 tilted at a predetermined angle from the upright position may be the predetermined position. In the following, the upright position of the container 400 will be described as the predetermined position. The mechanism for gripping the container 400 in the upright position may be any position. For example, the gripping mechanism may be configured to include a base on which the container 400 is placed in the upright position, and a member for pressing the upper surface of the cap 401, which is the top of the container 400 placed on the base.

[0016] The gripping device 110 is configured to tilt, swing, or rotate the container 400 in a predetermined direction from an upright position while gripping the container 400. The mechanism for tilting, swinging, and rotating the container 400 is arbitrary. For example, the mechanism for tilting, swinging, and rotating the gripping mechanism may be configured to include a motor that tilts, swings, and rotates the entire gripping mechanism while gripping the container 400.

[0017] The gripping device 110 is connected to the inspection device 200 by wire or wirelessly. When the gripping device 110 is started by an instruction from the inspection device 200, it tilts, swings, and rotates the container 400 in a predetermined direction from an upright position while gripping the container 400. When the gripping device 110 is stopped by an instruction from the inspection device 200, it stops the operation of tilting, swinging, and rotating the container 400, and returns to a state in which the container 400 is gripped in an upright position.

[0018] When the container 400 is tilted, swung, and rotated as described above, and then stopped, a state is obtained in which the liquid flows due to inertia in the stationary container 400. When the liquid flows, a state is obtained in which foreign matter mixed in the liquid becomes suspended. In addition, when the liquid flows, there is a possibility that air bubbles attached to the inner wall surface of the container 400 or air bubbles mixed in during the flow of the liquid may become suspended in the liquid. Therefore, the inspection device 200 needs to distinguish whether the suspended matter is a foreign matter or an air bubble.

[0019] The illumination device 120 is configured to irradiate illumination light onto the liquid sealed in the container 400. The illumination device 120 is, for example, a surface light source having a size corresponding to the size of the container 400. The illumination device 120 is installed on the opposite side of the container 400 to the side on which the camera device 130 is installed. In other words, the illumination by the illumination device 120 is transmitted illumination. However, the position of the illumination device 120 is not limited thereto, and it may be installed, for example, on the bottom side of the container 400 or in a position adjacent to the camera device 130, and may be photographed using reflected light illumination.

[0020] The camera device 130 is an imaging device that continuously captures images of the liquid in the container 400 at a predetermined frame rate from a predetermined position on the opposite side of the container 400 from the side where the illumination device 120 is installed. The camera device 130 may be configured to include a color camera equipped with a CCD (Charge-Coupled Device) image sensor or a CMOS (Complementary MOS) image sensor having a pixel capacity of about several million pixels, for example. The camera device 130 is connected to the inspection device 200 by wire or wirelessly. The camera device 130 is configured to transmit the captured images in time series to the inspection device 200 together with information indicating the time of capture, etc.

[0021] The display device 300 is a display device such as an LCD (Liquid Crystal Display). The display device 300 is connected to the inspection device 200 by wire or wirelessly. The display device 300 is configured to display the results of the inspection of the container 400 performed by the inspection device 200, etc.

[0022] The inspection device 200 is an information processing device that performs image processing on time-series images captured by the camera device 130 to inspect the presence or absence of foreign matter in the liquid sealed in the container 400. The inspection device 200 is connected to the gripping device 110, the camera device 130, and the display device 300 by wire or wirelessly.

[0023] 2 is a block diagram showing an example of an inspection device 200. Referring to FIG. 2, the inspection device 200 includes a communication I / F unit 210, an operation input unit 220, a storage unit 230, and an arithmetic processing unit 240.

[0024] The communication I / F unit 210 is composed of a data communication circuit, and is configured to perform data communication with the gripping device 110, the camera device 130, the display device 300, and other external devices (not shown) via wired or wireless communication. The operation input unit 220 is composed of operation input devices such as a keyboard and a mouse, and is configured to detect an operator's operation and output it to the calculation processing unit 240.

[0025] The storage unit 230 is composed of one or more storage devices of one or more types, such as a hard disk or a memory, and is configured to store processing information and a program 231 required for various processes in the arithmetic processing unit 240. The program 231 is a program that is read into the arithmetic processing unit 240 and executed to realize various processing units, and is read in advance from an external device or recording medium (not shown) via a data input / output function such as the communication I / F unit 210 and stored in the storage unit 230. Main processing information stored in the storage unit 230 includes image information 232, tracking information 233, an identification model 234, and inspection result information 235.

[0026] The image information 232 includes a time series of images obtained by continuously photographing the liquid in the container 400 by the camera device 130. If floating matter is present in the liquid in the container 400, the image information 232 includes an image of the floating matter.

[0027] FIG. 3 shows a configuration example of the image information 232. The image information 232 in this example is composed of entries each consisting of a set of a container ID 2321, a photographing time 2322, and a frame image 2323. An ID that uniquely identifies the container 400 is set in the container ID 2321 item. The container ID 2321 may be a serial number assigned to the container 400, a barcode attached to the container 400, or fingerprint information collected from the cap 401 of the container 400. The photographing time 2322 and the frame image 2323 items are set with a photographing time and a frame image. The photographing time 2322 is set with an accuracy (for example, in milliseconds) that allows the photographing time to be distinguished from other frame images of the same container ID. For example, the photographing time 2322 may be the elapsed time from the point in time when the tilting, rocking, or rotation of the container 400 is stopped. In the example of FIG. 3, a container ID 2321 is associated with each frame image 2323, but a container ID 2321 may be associated with each group of a plurality of frame images 2323.

[0028] The tracking information 233 includes time series data representing the movement trajectory of the floating matter detected and tracked in the image of the floating matter present in the liquid in the container 400 captured in the image information 232. FIG. 4 shows an example of the configuration of the tracking information 233. The tracking information 233 in this example is composed of the entries of a container ID 2331 and a pair of a tracking ID 2332 and a pointer 2333. An ID that uniquely identifies the container 400 is set in the entry of the container ID 2331. An entry consisting of a pair of the tracking ID 2332 and the pointer 2333 is provided for each floating matter to be tracked. An ID for distinguishing the floating matter to be tracked from other floating matters in the same container 400 is set in the item of the tracking ID 2332. A pointer to the movement trajectory information 2334 of the floating matter to be tracked is set in the item of the pointer 2333.

[0029] The movement trajectory information 2334 is composed of entries each consisting of a set of a time 23341, a position information 23342, a size 23343, a color 23344, and a shape 23345. The items of the time 23341, the position information 23342, the size 23343, the color 23344, and the shape 23345 are set with the shooting time, the coordinate value indicating the position of the floating object to be tracked at the shooting time, the size of the floating object, the color of the floating object, and the shape of the floating object. The shooting time set in the time 23341 uses the shooting time 2322 of the frame image. The coordinate value may be, for example, a coordinate value in a predetermined coordinate system. In addition, the predetermined coordinate system may be a camera coordinate system viewed with the camera at the center, or may be a world coordinate system viewed with a certain position in space at the center. The entries of the movement trajectory information 2334 are arranged in the order of the time 23341. The time 23341 of the first entry is the tracking start time. The time 23341 of the last entry is the tracing end time. The time 23341 of the entries other than the first and last entries is the tracing midpoint time.

[0030] The identification model 234 is a model that estimates the type (class) of a floating object from time-series data representing the movement trajectory of the floating object. The number of identification classes is N. N is a positive integer of 2 or 3 or more. For example, when N=2, the identification model 234 outputs, for example, the probability that the floating object is a foreign object class. Also, when N=3, the identification model 234 outputs, for example, the probability of each of three classes, namely, the probability of the foreign object class, the probability of the bubble class, and the probability of the noise class. The probability of each class is output from the identification model 234 as, for example, a softmax value. The identification model 234 may be configured using, for example, a recursive structure of a neural network such as an RNN or LSTM. Alternatively, the identification model 234 may reduce the identification of fixed-length data using padding, pooling processing, or resizing.

[0031] The inspection result information 235 is information on the results of inspecting the presence or absence of foreign matter in the liquid sealed in the container 400 to be inspected. FIG. 5 shows an example of the configuration of the inspection result information 235. In this example, the inspection result information 235 is composed of a set of a container ID 2351 and an inspection result 2352. An ID that uniquely identifies the container 400 to be inspected is set in the entry of the container ID 2351. An inspection result of either OK (inspection passed) or NG (inspection failed) is set in the entry of the inspection result 2352. An inspection result of NG is issued when at least one of all floating matters detected in the liquid sealed in the container 400 identified by the container ID is determined to be of the foreign matter class with a probability equal to or greater than a predetermined value.

[0032] 2 again, the arithmetic processing unit 240 has a microprocessor such as an MPU and its peripheral circuits, and is configured to implement various processing units by reading and executing a program 231 from the storage unit 230, thereby allowing the above hardware and the program 231 to work together. The main processing units implemented by the arithmetic processing unit 240 include an acquisition unit 241, a discrimination model learning unit 242, and a determination unit 243.

[0033] The acquisition unit 241 is configured to control the gripping device 110 and the camera device 130 to acquire image information 232 depicting an image of floating matter present in the liquid sealed in the container 400. The acquisition unit 241 is also configured to analyze the image information 232 to acquire tracking information 233 including time-series data representing the movement trajectory of the floating matter.

[0034] The discriminative model training unit 242 is configured to generate training data used for training the discriminative model 234. In addition, the discriminative model training unit 242 is configured to train the discriminative model 234 by using the generated training data.

[0035] The determination unit 243 is configured to estimate a class of suspended matter from time series data representing a movement trajectory of suspended matter in the liquid sealed in the container 400 related to the inspection target, acquired by the acquisition unit 241, using the trained discrimination model 234. The determination unit 243 is also configured to create inspection result information 235 representing whether or not a foreign matter is present in the container 400 related to the inspection target, based on the estimation result.

[0036] Next, the operation of the inspection system 100 will be described. The phases of the inspection system 100 are roughly divided into a learning phase and an inspection phase. The learning phase is a phase for machine learning the discrimination model 234. The inspection phase is a phase for inspecting the presence or absence of foreign matter in the liquid sealed in the container 400 related to the inspection target, using the trained discrimination model 234.

[0037] Fig. 6 is a flow chart showing an example of the operation of the learning phase. Referring to Fig. 6, first, the acquisition unit 241 controls the gripping device 110 and the camera device 130 to acquire image information 232 showing an image of floating matter present in the liquid sealed in the container 400 (step S1). Next, the acquisition unit 241 analyzes the image information 232 to acquire tracking information 233 including time series data showing the movement trajectory of the floating matter (step S2).

[0038] Next, the discriminant model learning unit 242 creates teacher data to be used for machine learning of the discriminant model 234 (step S3). Next, the discriminant model learning unit 242 uses the created teacher data to perform machine learning of the discriminant model 234, which takes time-series data representing the movement trajectory of the floating object as input and the class of the floating object as output, to generate a trained discriminant model (step S4). When the learning phase ends, the discriminant model 234 becomes a trained discriminant model.

[0039] Fig. 7 is a flow chart showing an example of the operation of the inspection phase. Referring to Fig. 7, first, the acquisition unit 241 controls the gripping device 110 and the camera device 130 to acquire image information 232 showing an image of floating matter present in the liquid sealed in the container 400 related to the inspection target (step S11). Next, the acquisition unit 241 analyzes the image information 232 to acquire tracking information 233 including time series data showing the movement trajectory of the floating matter (step S12).

[0040] Next, the determination unit 243 uses the trained discrimination model 234 to estimate the class of the floating matter from the time series data representing the movement trajectory of the floating matter included in the tracking information 233 (step S13). Next, the determination unit 243 creates the inspection result information 236 based on the estimated class of the floating matter (step S14).

[0041] Next, the acquisition unit 241, the discrimination model learning unit 242, and the determination unit 243 will be described in detail.

[0042] First, the acquisition unit 241 will be described in detail.

[0043] The acquisition unit 241 first starts the gripping device 110 that grips the container 400 in an upright position, thereby tilting, swinging, and rotating the container 400 to be inspected. Next, when a certain time has elapsed after the start, the acquisition unit 241 stops the gripping device 110 to stop the container 400 in a predetermined position. In this way, by tilting, swinging, and rotating the container 400 for a certain time and then stopping it, a state in which the liquid flows by inertia in the stationary container 400 is obtained. Next, the acquisition unit 241 starts an operation of continuously photographing the liquid in the container 400 at a predetermined frame rate by the camera device 130 under transmitted illumination by the illumination device 120. That is, the acquisition unit 241 starts the above-mentioned photographing operation from time Ts, assuming that the time when the container 400 stops after being tilted, swung, and rotated is time Ts.

[0044] The acquisition unit 241 continues to capture images of the liquid in the container 400 by the camera device 130 from time Ts until time Te when a predetermined time Tw has elapsed. The predetermined time Tw may be set to a time (hereinafter, referred to as a minimum image capture time length) or more required for obtaining a movement trajectory in which all the air bubbles move upward in the container 400 and are no longer considered to move downward, assuming that all the floating objects floating in the liquid are air bubbles. The minimum image capture time length may be determined in advance by an experiment or the like, and may be set fixedly in the acquisition unit 241. The acquisition unit 241 may immediately stop image capture by the camera device 130 when the time Te is reached, or may continue image capture by the camera device 130.

[0045] The acquisition unit 241 adds the photographing time and the container ID to each of the time-series frame images acquired from the camera device 130 , and stores them in the storage unit 230 as image information 232 .

[0046] Next, when the acquisition unit 241 acquires a time series of frame images for a predetermined time length, the acquisition unit 241 detects the shadow of a floating object in the liquid in the container 400 from each of the frame images. For example, the acquisition unit 241 detects the shadow of a floating object in the liquid by a method described below. However, the acquisition unit 241 may detect the shadow of a floating object in the liquid by a method other than those described below.

[0047] First, the acquisition unit 241 performs binarization processing on each of the frame images to generate a binarized frame image. Next, the acquisition unit 241 detects the shadow of a floating object from each of the binarized frame images as follows.

[0048] The acquisition unit 241 first sets the binary frame image in which the shadow of the floating object is to be detected as the binary frame image of interest. Next, a difference image between the binary frame image of interest and the binary frame image captured Δt later is generated. Here, Δt is set to a time in which the same floating object partially overlaps in the two images, or appears in a very close position even if it does not overlap. Therefore, the time difference Δt is determined according to the properties and flow state of the liquid and the foreign object. In the difference image, the image parts that match in the two binary frame images are erased, and only the different image parts remain. Therefore, the outline and scratches of the container 400 that appear in the same position in the two binary frame images are erased, and only the shadow of the floating object appears. The acquisition unit 241 detects the shadow of the binary frame image of interest corresponding to the part where the shadow appears in the difference image as the shadow of the floating object present in the binary frame image of interest.

[0049] The acquisition unit 241 tracks the detected floating matter in the time-series images, and creates tracking information 233 according to the tracking results. First, the acquisition unit 241 initializes the tracking information 233. In this initialization, the container ID of the container 400 is set in the entry of container ID 2331 in Fig. 4. Next, the acquisition unit 241 tracks the floating matter in the time-series images by the method described below, and creates an entry of a pair of tracking ID 2332 and pointer 2333 in Fig. 4, and movement trajectory information 2334, for each floating matter, according to the tracking results.

[0050] First, the acquisition unit 241 focuses on the binarized frame image with the oldest photographing time among the time series of the binarized frame images created above. Next, the acquisition unit 241 assigns a unique tracking ID to each floating object detected in the binarized frame image of interest. Next, the acquisition unit 241 sets the tracking ID assigned to the floating object detected in the binarized frame image of interest for each detected floating object in the tracking ID 2332 field of Fig. 4, sets the photographing time of the binarized frame image of interest in the time 23341 field of the top entry of the movement trajectory information 2334 indicated by the corresponding pointer 2333, and sets the coordinate value, size, color, and shape of the floating object in the binarized frame image of interest in the position information 23342, size 23343, color 23344, and shape 23345 fields.

[0051] Next, the acquisition unit 241 shifts its attention to the binarized frame image one frame later than the binarized frame image of interest. Next, the acquisition unit 241 focuses on one of the floating objects detected in the binarized frame image of interest. Next, the acquisition unit 241 compares the position of the floating object of interest with the position of the floating object detected in the binarized frame image one frame earlier (hereinafter referred to as the preceding binarized frame image), and if the floating object exists within a predetermined threshold distance from the floating object of interest, it determines that the floating object of interest and the floating object that exists within the threshold distance are the same floating object. In this case, the acquisition unit 241 assigns to the floating object of interest the tracking ID that is assigned to the floating object determined to be the same floating object. Then, the acquisition unit 241 secures a new entry in the movement trajectory information 2334 pointed to by the pointer 2333 of the entry in the tracking information 233 to which the assigned tracking ID 2332 is set, and sets the shooting time of the binary frame image under focus and the coordinate values, size, color and shape of the floating object under focus to the time 23341, position information 23342, size 23343, color 23344 and shape 23345 of the secured entry.

[0052] On the other hand, if there is no floating object within the threshold distance from the floating object of interest in the preceding binarized frame image, the acquiring unit 241 judges the floating object of interest to be a new floating object and assigns a new tracking ID to it. Next, the acquiring unit 241 sets the tracking ID assigned to the floating object of interest in the tracking ID 2332 field of the newly secured entry in Fig. 4, sets the shooting time of the binarized frame image of interest in the time 23341 field of the top entry of the movement trajectory information 2334 indicated by the corresponding pointer 2333, and sets the coordinate values, size, color, and shape of the floating object of interest in the position information 23342, size 23343, color 23344, and shape 23345 fields.

[0053] When the acquisition unit 241 finishes processing the floating object of interest, it shifts its attention to the next floating object detected in the binary frame image of interest, and repeats the same processing as described above. Then, when the acquisition unit 241 finishes focusing on all floating objects detected in the binary frame image of interest, it shifts its attention to the frame image one frame later, and repeats the same processing as described above. Then, when the acquisition unit 241 finishes focusing on the last frame image in the image information 232, it ends the tracking processing.

[0054] In the above description, the acquisition unit 241 performs tracking based on the distance between floating objects in two adjacent frame images. However, the acquisition unit 241 may perform tracking based on the distance between floating objects in two adjacent frame images separated by n frames (n is a positive integer of 1 or more). The acquisition unit 241 may also perform tracking by comprehensively determining a tracking result obtained by performing tracking based on the distance between floating objects in two adjacent frame images separated by m frames (m is a positive integer of 0 or more) and a tracking result obtained by performing tracking based on the distance between floating objects in two adjacent frame images separated by m+j frames (j is a positive integer of 1 or more).

[0055] Next, the discrimination model learning unit 242 will be described in detail.

[0056] First, the training data used in the machine learning of the discrimination model 234 will be described.

[0057] FIG. 8 shows an example of the configuration of two types of teacher data used in the machine learning of the discrimination model 234. Referring to FIG. 8, the first type of teacher data 250 includes a single time series data 2501 representing the movement trajectory of a floating object and a correct answer label 2502 representing the class of the floating object. For example, the movement trajectory information 2334 shown in FIG. 4 may be used as the time series data 2501. Alternatively, the time series data 2501 may be information remaining after removing one, two, or all of the size 23343, color 23344, and shape 23345 from the movement trajectory information 2334 shown in FIG. 4. The correct answer label 2502 represents a class to which the floating object corresponding to the time series data 2501 belongs. For example, the correct answer label 2502 may be represented by a One-of-k notation in which one class is assigned to each vector element, and only the vector element of the correct answer class is set to 1 and the others are set to 0. The teacher data 250 may be created by, for example, interactive processing with the user. For example, the discriminative model learning unit 242 displays the movement trajectory information 2334 acquired by the acquisition unit 241 on the screen of the display device 300, and accepts a correct label of the movement trajectory information 2334 from the user through the operation input unit 220. Then, the discriminative model learning unit 242 creates a pair of the displayed movement trajectory information 2334 and the accepted correct label as one piece of teacher data 250. The discriminative model learning unit 242 creates a necessary and sufficient number of teacher data 250 for each discrimination class by a similar method. However, the method of creating the teacher data 250 is not limited to the above.

[0058] Trajectories A, B, and C shown in FIG. 13 are schematic examples of trajectories of floating objects represented by trajectory information 2334 constituting teacher data 250. In FIG. 13, trajectories A and B are foreign objects, and trajectory C is a bubble. In trajectory A of foreign object, the object moves upwards in some sections due to the influence of the liquid flow, but the foreign object, which has a higher specific gravity than the liquid, eventually falls. In trajectory B of foreign object, the object does not move upwards even once, and tends to fall from the beginning of tracking. On the other hand, in trajectory C of bubble, the object moves downwards in some sections due to the influence of the liquid flow, but eventually moves upwards.

[0059] 8, the second type of teacher data 251 includes a plurality of time series data 2511-i (i=1, 2, . . .) corresponding to the same floating object and a correct answer label 2512 indicating the class of the floating object. Such teacher data 251 may be mechanically created from the first type of teacher data 250, for example.

[0060] FIG. 9 is a schematic diagram showing an example of a method in which the discriminant model learning unit 242 creates the teacher data 251 from the teacher data 250. Referring to FIG. 9, the discriminant model learning unit 242 is configured to include a selection unit 2421 and a data conversion unit 2422. First, the discriminant model learning unit 242 uses the selection unit 2421 to select one or more pieces of teacher data 250' including time series data 2501 representing the movement trajectory of a foreign object and a correct answer label 2502 from the plurality of teacher data 250 described with reference to FIG. 8, and the number of pieces is a necessary and sufficient number. For example, when the correct answer label 2502 includes vector elements of three classes, a foreign object class, a bubble class, and a noise class, the teacher data 250' becomes teacher data having a correct answer label 2502 in which a value of 1 is set for the foreign object class. However, in addition to the teacher data having time series data 2501 representing the movement trajectory of a foreign object, teacher data having time series data 2501 representing the movement trajectory of something other than a foreign object may be selected from teacher data 250 and included in teacher data 250′.

[0061] Next, the discriminative model learning unit 242 uses the data conversion unit 2422 to generate one piece of teacher data 251 including a plurality of time series data 2511-i and a correct answer label 2512 from each of the teacher data 250'. Specifically, the discriminative model learning unit 242 calculates two intermediate times Mt1 and Mt2 that divide the time from the tracking start time St to the tracking end time Et of the time series data 2501 of the teacher data 250 into three equal parts. Next, the discriminative model learning unit 242 extracts all entries having a time 23341 from the tracking start time St to the intermediate time Mt1 from the movement trajectory information 2334 constituting the time series data 2501, and generates time series data composed of the extracted entries as the first time series data 2511-1. Next, the discriminant model learning unit 242 extracts all entries having a time 23341 from the intermediate time Mt1 to the intermediate time Mt2 from the movement trajectory information 2334 constituting the time series data 2501, and generates time series data consisting of the extracted entries as the second time series data 2511-2. Next, the discriminant model learning unit 242 extracts all entries having a time 23341 from the intermediate time Mt2 to the tracking end time Et from the movement trajectory information 2334 constituting the time series data 2501, and generates time series data consisting of the extracted entries as the third time series data 2511-3. In addition, the discriminant model learning unit 242 generates the correct answer label 2502 of the teacher data 250' as it is as the correct answer label 2512 of the teacher data 251.

[0062] Movement trajectories a1, a2, and a3 shown in Fig. 13 are schematic examples of movement trajectories of foreign objects represented by three pieces of time series data 2511-1, 2511-2, and 2511-3 constituting the teacher data 251. This teacher data 251 is generated from teacher data 250 representing the movement trajectory A of the foreign object shown in Fig. 13. With reference to Fig. 13, the movement trajectory a1 of the foreign object descends relatively gently. The movement trajectory a2 of the foreign object ascends relatively gently. The movement trajectory a3 of the foreign object descends abruptly.

[0063] However, the method of generating the teacher data 250' is not limited to the above. For example, one teacher data 251 may be generated from two or four or more partial time series data 2511 obtained by dividing the time series data 2501 by a positive integer of two or four or more. The number of time series data 2511 does not need to be the same for all teacher data 251, and may be different. That is, teacher data 251 including two time series data 2511-1 and 2511-2 obtained by dividing the time series data 2501 by two, teacher data 251 including three time series data 2511-1 to 2511-3 obtained by dividing the time series data 2501 by three, and teacher data 251 including four time series data 2511-1 to 2511-4 obtained by dividing the time series data by four may be mixed. The number of divisions may be changed depending on the length of the time series data 2501 to be divided (the time length from the tracking start time to the tracking end time). For example, the number of divisions may be increased as the time series data 2501 becomes longer. Furthermore, teacher data 250 having time series data 2501 with a length equal to or less than a threshold may not be selected as a source for generating teacher data 251. Furthermore, the multiple time series data 2511 constituting teacher data 251 are not limited to those derived from time series data 2501 related to the same floating matter, and may be derived from multiple time series data 2501 related to different floating matters in the same container 400. Furthermore, teacher data 251 may include time series data 2501 before division so as not to decrease the frequency of learning time series data 2501 with its original length.

[0064] Next, a method in which the discriminative model training unit 242 trains the discriminative model 234 using the teacher data 250 and 251 will be described.

[0065] FIG. 10 is a flowchart showing an example of the learning process of the discriminative model learning unit 242. Referring to FIG. 10, the discriminative model learning unit 242 first focuses on one piece of teacher data from a teacher data group including the teacher data 250 and the teacher data 251 (step S21). Next, the discriminative model learning unit 242 sets the value 1 to the internal variable m (step S22). Next, the discriminative model learning unit 242 acquires the softmax value of each class obtained as the output of the discriminative model 234 when the mth (m is the value of the internal variable at that time. Therefore, initially, it is 1) time-series data included in the teacher data under focus is input to the discriminative model 234 (step S23). Next, the discriminative model learning unit 242 calculates the error between the correct answer label of the teacher data under focus and the softmax value as an individual loss l using a loss function given in advance. m (Step S24). Here, the loss function is, for example, the cross-entropy l(q,y)=-log(q y ) may be used. In Equation 1, q is the N-component softmax value, and y is the correct class component. Next, the discriminant model learning unit 242 increments the value of the internal variable m by 1 (step S25). Next, the discriminant model learning unit 242 determines whether the value of the internal variable m exceeds the number of time-series data included in the teacher data of interest (step S26). If the value of the internal variable m does not exceed the number of time-series data, the discriminant model learning unit 242 returns to the process of step S23 and repeats the same process as the above-mentioned process for the next time-series data included in the teacher data of interest. On the other hand, if the value of the internal variable m exceeds the number of time-series data, the softmax value of each class of the discriminant model 234 is obtained and the individual loss is calculated for all time-series data included in the teacher data of interest. In this case, the discriminant model learning unit 242 proceeds to the process of step S27.

[0066] In step S27, the discriminative model learning unit 242 calculates a weight representing the importance of each piece of time series data in the teacher data of interest. For example, the discriminative model learning unit 242 determines that the time series data with a higher discrimination score is more important, and calculates a larger weight. Specifically, the discriminative model learning unit 242 first calculates the discrimination score s given by equation 2 in FIG. 11 for each piece of time series data included in the teacher data of interest. That is, the discrimination score s of the i-th time series data 2511-i is i is given by the maximum value of the N-component softmax value q obtained when the time series data 2511-i is input to the discrimination model 234. i is not limited to the above. For example, the discrimination score s i may be a softmax value of the correct class. Next, the discriminant model training unit 242 calculates the value of a strictly monotonically increasing function f(s) (hereinafter simply referred to as function f(s)) for each piece of time series data. Next, the discriminant model training unit 242 calculates the sum of the values ​​of the function f(s) of all the time series data. Next, for each piece of time series data, the discriminant model training unit 242 calculates the ratio of the value of the function f(s) of the time series data to the sum of the values ​​of the function (f) of all the time series data, as the weight w of the time series data. i That is, the weight w of the i-th time series data 2511-i is calculated as i is given by Equation 3 in Fig. 11. G in Equation 3 means a group consisting of time-series data of the teacher data under consideration. In this way, the discrimination model learning unit 242 calculates the value of the function f(s) normalized by the total value in the teacher data under consideration for each time-series data as the weight w.

[0067] The function f(s) may be, for example, the function shown in Equation 4 in FIG. 11. Alternatively, the function f(s) may be the function shown in Equation 5 in FIG. 11. Alternatively, the function f(s) may be the function shown in Equation 6 in FIG. 11. Alternatively, the function f(s) may be the function shown in Equation 7. Based on the function f(s) in Equation 4, the function f(s) in Equation 5 has the effect of increasing the weight between data with relatively low importance and data with high importance. Also, the function in Equation 6 has the effect of increasing the difference in weight between data with relatively low importance and data with high importance more than the function f(s) in Equation 5. On the other hand, the function f(s) in Equation 7 has the effect of reducing the difference in weight between data with relatively low importance and data with high importance based on the function in Equation 4.

[0068] Next, the discriminant model training unit 242 calculates the weighted individual loss w·l by multiplying each individual loss calculated in step S24 by the corresponding weight calculated in step S27 (step S28). Next, the discriminant model training unit 242 calculates the sum of all weighted individual losses as the weighted loss L of the training data (step S29). The weighted loss L is given by Equation 8 in FIG. 11. By using the weighted individual losses and weighted loss L as described above, the following effects (A), (B), and (C) are obtained.

[0069] (A) Among the multiple time series data 2511-1 to 2511-3 (each of which corresponds to one piece of fragment data), time series data that is easily identifiable as a foreign object class tends to have a high identification score early in learning, which has the effect of increasing the importance of such time series data (corresponding fragment data). Easily identifiable time series data is data that prominently contains features that serve as the basis for class identification. For example, foreign objects that have a high specific gravity compared to the liquid in the container 400 fall at a relatively high speed. Therefore, time series data that has the feature of falling rapidly is an example of easily identifiable time series data.

[0070] (B) Among the multiple time series data 2511-1 to 2511-3, time series data that does not sufficiently include features that serve as the basis for identifying the foreign object class may be misclassified as a class other than the foreign object class, for example, a bubble class, in some cases. However, since the correct class of the training data that includes such time series data in part is the foreign object class, there are often other time series data that belong to the same training data that obtain a high classification score. Therefore, the importance of the misclassified time series data is relatively reduced, and the loss is relatively reduced accordingly. As a result, there is an effect of lowering the classification score in the case of misclassification.

[0071] (C) The weighted individual loss and the weighted loss L are normalized by the weighted sum, so that all of the multiple time series data 2511-1 to 2511-3 are not overlooked.

[0072] 10 again, next, the discriminative model training unit 242 trains the discriminative model 234 so as to minimize the weighted loss L calculated in step S29 (step S30). Specifically, the discriminative model training unit 242 uses, for example, gradient descent and backpropagation to tune parameters of the discriminative model 234 so as to reduce the weighted loss L. Note that, in step S30, the discriminative model training unit 242 may train the discriminative model 234 so as to minimize the weighted individual loss for each of the weighted individual losses w1·l1, w2·l2, and w3·l3 instead of the weighted loss L.

[0073] When the discriminative model learning unit 242 finishes learning using the teacher data in question, it shifts its attention to the next teacher data in the teacher data group (step S31). Then, the discriminative model learning unit 242 returns to step S22 via step S32, and repeats the same process as described above for the newly focused teacher data. Then, when it has finished learning about all the teacher data included in the teacher data group (YES in step S32), it ends the process of FIG. 10.

[0074] The processing by the discrimination model learning unit 242 will be described in more detail below, taking as an example the teacher data 251 corresponding to the trajectories a1, a2, and a3 of foreign objects shown in Fig. 13, and the teacher data 250 corresponding to the trajectory A of the foreign object. For convenience of explanation, the number of discrimination classes in the discrimination model 234 is assumed to be three, namely, a foreign object class, a bubble class, and a noise class. The softmax values ​​of the three classes output from the discrimination model 234 are represented as [softmax value of the foreign object class, softmax value of the bubble class, and softmax value of the noise class]. It is also assumed that the time series data 2511-1 of the teacher data 251 corresponds to the trajectory a1, the time series data 2511-2 corresponds to the trajectory a2, and the time series data 2511-3 corresponds to the trajectory a3, respectively.

[0075] First, learning using the teacher data 251 will be described.

[0076] The discriminant model training unit 242 first acquires the softmax value of each class of the discriminant model 234 for the time series data 2511-1 corresponding to the movement trajectory a1 (step S23). The movement trajectory a1 has some of the characteristics of foreign objects, that is, foreign objects with a high specific gravity move downward, so the softmax value of the foreign object class is expected to be larger than that of the bubble or noise classes. Here, for example, it is assumed that [0.5, 0.4, 0.1] is acquired. The discriminant model training unit 242 calculates the individual loss l1 corresponding to the time series data 2511-1 from the acquired softmax value and the correct answer label 2512 ([1, 0, 0]) (step S24).

[0077] Next, the discriminant model training unit 242 acquires the softmax value of each class of the discriminant model 234 for the time series data 2511-2 corresponding to the movement trajectory a2 (step S23). Since the movement trajectory a2 has some characteristics of bubbles, that is, moving upward, the softmax value of the bubble class may be larger than that of the foreign object or noise class. Here, for example, it is assumed that [0.4, 0.5, 0.1] is acquired. The discriminant model training unit 242 calculates the individual loss l2 corresponding to the time series data 2511-2 from the acquired softmax value and the correct answer label 2512 ([1, 0, 0]) (step S24).

[0078] Next, the discriminant model training unit 242 acquires the softmax value of each class of the discriminant model 234 for the time series data 2511-3 corresponding to the movement trajectory a3 (step S23). Since the movement trajectory a3 has a prominent foreign object characteristic of moving downward, it is expected that the softmax value of the foreign object class will be sufficiently larger than that of the bubble or noise class. Here, for example, it is assumed that [0.8, 0.1, 0.1] is acquired. The discriminant model training unit 242 calculates the individual loss l3 corresponding to the time series data 2511-3 from the acquired softmax value and the correct answer label 2512 ([1, 0, 0]) (step S24).

[0079] Next, the discrimination model learning unit 242 calculates the weights w1, w2, and w3 of the time-series data 2511-1 to 2511-3 (step S27).

[0080] When the function f(s) of the formula 4 in FIG. 11 is used, w1 ≒ 0.278, w2 ≒ 0.278, and w3 ≒ 0.444 are obtained. When the function f(s) of the formula 5 in FIG. 11 is used, w1 ≒ 0.208, w2 ≒ 0.208, and w3 ≒ 0.583 are obtained. When the function f(s) of the formula 6 in FIG. 11 is used, w1 ≒ 0.102, w2 ≒ 0.102, and w3 ≒ 0.795 are obtained. When the function f(s) of the formula 7 in FIG. 11 is used, w1 ≒ 0.299, w2 ≒ 0.299, and w3 ≒ 0.403 are obtained.

[0081] Next, the discriminative model learning unit 242 calculates a weighted loss L for the teacher data 251 (step S28). For example, when the function f(s) of Equation 5 in FIG. 11 is used, L=0.208·l1+0.208·l2+0.583·l3.

[0082] Next, the discriminative model training unit 242 trains the discriminative model 234 so as to minimize the weighted loss L (step S30). Here, in the weighted loss L, the weight of the individual loss l3 of the time series data 2511-3 is large, and the weights of the individual losses l1 and l2 of the time series data 2511-1 and 2511-2 are small. Therefore, the time series data 2511-3 having prominent characteristics of a foreign object is trained with a large weight, and the time series data 2511-2 having characteristics of a misclassified bubble and the time series data 2511-1 having slight characteristics of a foreign object are trained with a small weight. As a result, the identification model 234 can be trained to increase the difference between the identification score at which a fragmented trajectory c1 of a bubble similar to the trajectory a1 (corresponding to time series data 2511-1) shown in FIG. 13 is identified as a foreign object, the identification score at which a fragmented trajectory c2 of a bubble similar to the trajectory a2 (corresponding to time series data 2511-2) is identified as a foreign object, and the identification score at which a foreign object trajectory B similar to the trajectory a3 (corresponding to time series data 2511-3) is identified as a foreign object.

[0083] In contrast, if each of the time series data 2511-1 to 2511-3 is trained as a foreign object without weighting, it becomes difficult to train the discrimination model 234 so as to increase the difference between the discrimination score at which the fragmented trajectory c1 of a bubble similar to the trajectory a1 (corresponding to the time series data 2511-1) is discriminated as a foreign object, the discrimination score at which the fragmented trajectory c2 of a bubble similar to the trajectory a2 (corresponding to the time series data 2511-2) is discriminated as a foreign object, and the discrimination score at which the trajectory B of a foreign object similar to the trajectory a3 (corresponding to the time series data 2511-3) is discriminated as a foreign object. As a result, the possibility of erroneously detecting the fragmented trajectories c1 and c2 of a bubble as a foreign object with a high discrimination score increases.

[0084] Next, a description will be given of learning using the teacher data 250. The teacher data 250 includes only one piece of time-series data 2501.

[0085] The discriminant model training unit 242 first obtains the softmax value of each class of the discriminant model 234 for the time series data 2511 (step S23). The foreign object movement trajectory A has a foreign object characteristic in that foreign objects with a high specific gravity eventually move downward, so the softmax value of the foreign object class is expected to be larger than that of the bubble or noise classes. Here, for example, it is assumed that [0.7, 0.2, 0.1] is obtained. The discriminant model training unit 242 calculates the individual loss l1 corresponding to the time series data 2511 from the obtained softmax value and the correct answer label 2502 ([1, 0, 0]) (step S24).

[0086] Next, the discrimination model learning unit 242 calculates a weight w1 of the time series data 2511 (step S27). Since the teacher data 250 includes only one piece of time series data, the weight is 1.

[0087] Next, the discriminative model learning unit 242 calculates a weighted loss L for the training data 250 (step S28). As a result, L=l1.

[0088] Next, the discriminative model training unit 242 trains the discriminative model 234 so as to minimize the weighted loss L (step S29).

[0089] According to the discrimination model learning unit 242 configured and operating as described above, it is possible to acquire a trained discrimination model 234 that can correctly identify the class of a floating object even when data representing a fragmented movement trajectory of the floating object is input. This is because the discrimination model learning unit 242 learns the discrimination model 234 using a plurality of time-series data 2511-1 to 2511-3 that belong to one teacher data 251 that assumes fragmentation.

[0090] Furthermore, the discriminative model learning unit 242 can acquire a trained discriminative model 234 that is unlikely to cause misclassification with a high score (overconfidence). This is because the discriminative model learning unit 242 calculates a discrimination score for each of a plurality of time-series data 2511 belonging to one teacher data 251 (corresponding to a group) using the discriminative model 234, and learns the discriminative model 234 using a weighted loss function L, which is a loss function that depends on the relative level of the discrimination score within the teacher data 251.

[0091] Next, the determination unit 243 will be described in detail.

[0092] Fig. 12 is a flowchart showing an example of the process of the determination unit 243. At the time when the determination unit 243 starts the process shown in Fig. 12, tracking information 233 including time series data showing the movement trajectory of floating matter present in the liquid sealed in the container 400 related to the test object is stored in the storage unit 230. As described with reference to Fig. 4, the tracking information 233 records a tracking ID 2332 for each floating matter and movement trajectory information 2334 that corresponds one-to-one to the tracking ID 2332.

[0093] 12, the determination unit 243 focuses on one tracking ID in the tracking information 233 related to the container 400 to be inspected (step S41). Next, the determination unit 243 acquires the identification class and identification score of the floating object from the softmax value of each class output when the floating object movement trajectory information 2334 corresponding to the focused tracking ID is input to the trained identification model 234 (step S42). For example, if the softmax value of the foreign object class is the largest among the three classes of the foreign object class, the bubble class, and the noise class, and the value is, for example, 0.8, the determination unit 243 acquires the floating object class=foreign object class and the identification score=0.8. Next, the determination unit 243 shifts its attention to the next tracking ID in the tracking information 233 (step S43). Next, the determination unit 243 returns to step S42 via step S44, and repeats the same process as described above for the floating object movement trajectory information 2334 corresponding to the newly focused tracking ID. Then, when the determination unit 243 has finished noting all the tracking IDs in the tracking information 233 (YES in step S44), the process proceeds to step S45.

[0094] In step S45, the determination unit 243 determines the maximum classification score s of the foreign object class among all the classification results calculated in step S42. max Next, the determination unit 243 obtains the classification score s max and a predetermined decision threshold s th and compare the discrimination score s max is the decision threshold s th If it is greater than 1, the inspection result information 235 is generated to indicate that the container 400 to be inspected contains a foreign object (step S47). max is the decision threshold s th If it is not larger, the inspection result information 235 is created indicating that no foreign matter has been mixed into the container 400 being inspected (step S48).

[0095] As described above, the inspection system 100 according to this embodiment can accurately inspect the presence or absence of foreign matter in the liquid sealed in the container 400. This is because the inspection is performed using the trained classification model 234 that is resistant to fragmentation and has a high score and is less likely to cause erroneous identification.

[0096] Next, a modification of this embodiment will be described.

[0097] <Variation 1> When using the function f(s)=s shown in Equation 4 in FIG. 11, the classification model 234 with the number of classification classes N may have an N+1-th extra softmax component. Then, the classification score s is the value q of the extra softmax component. N+1 The classification score s may be determined depending on how low it is. That is, the classification score s may be calculated using formula 9 in FIG. 11. In this modification, the classification model 234 is trained to increase the value of the extra softmax component as the degree of uncertainty as to which class an object may be classified into decreases. In this way, for example, when classifying whether or not an object is a foreign object, the classification score s when the classification model 234 estimates with high certainty that the object is either a foreign object or not with half of the probability, can be made higher than the classification score s when the classification model 234 outputs that the object is either a foreign object or not with half of the probability because of lack of certainty.

[0098] <Variation 2> In the above embodiment, the discriminative model training unit 242 trains the discriminative model 234 so as to minimize the weighted loss L corresponding to each piece of teacher data. However, the discriminative model 234 may be trained so as to minimize the average loss of the weighted loss L calculated for each teacher data belonging to each set of two or more teacher data.

[0099] <Variation 3> So far, the present invention has been applied to the learning of a discrimination model that identifies the class of floating objects from time series data representing the movement trajectory of floating objects in a liquid. However, the application of the present invention is not limited to this type of discrimination model. For example, the present invention may be applied to the learning of a discrimination model that determines whether a person in video data is suspicious or not from the movement of the person. Alternatively, the present invention may be applied to the learning of a discrimination model that detects an abnormality in an information processing device such as a computer from some time series data collected from the information processing device. Alternatively, the present invention may be applied to the learning of a discrimination model that identifies the class of an object in a still image.

[0100] [Second embodiment] 14 is a block diagram of a learning device 500 according to the second embodiment of the present invention. Referring to FIG. 14, the learning device 500 includes a learning unit 501.

[0101] The learning means 501 is configured to use first teacher data including a group including a plurality of first data corresponding to the same object and a first data label for the group to learn a discrimination model 502 that identifies a class to which second data corresponding to an unknown object belongs. In addition, the learning means 501 is configured to calculate a discrimination score for the first data using the discrimination model 502 in the learning, and to learn the discrimination model 502 using a loss weighted by a weight that depends on the relative level of the discrimination score within the group. The learning means 501 can be configured in the same manner as the discrimination model learning unit 242 in FIG. 2, for example, but is not limited thereto.

[0102] The learning device 500 configured as above operates as follows. That is, the learning means 501 uses first teacher data including a group including a plurality of first data corresponding to the same object and a first data label for the group to learn a discrimination model 502 that identifies a class to which second data corresponding to an unknown object belongs, in the learning. In the learning, the learning means 501 calculates a discrimination score for the first data using the discrimination model 502. Next, the learning means 501 calculates a weight that depends on the relative level of the discrimination score within the group. Next, the learning means 501 calculates a weighted loss using the calculated weight. Next, the learning means 501 learns the discrimination model 502 using the weighted loss.

[0103] The learning device 500 configured and operated as described above can acquire a trained discrimination model 502 that is resistant to fragmentation and is unlikely to cause high-score misclassification. This is because the learning means 501 calculates a discrimination score for the first data using the discrimination model 502, and trains the discrimination model 502 using a loss weighted by a weight that depends on the relative level of the discrimination score within the group.

[0104] Although the present invention has been described with reference to the above-mentioned embodiments, the present invention is not limited to the above-mentioned embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. [Industrial Applicability]

[0105] The present invention can be applied in the general field of learning discriminative models.

[0106] A part or all of the above-described embodiments can be described as, but is not limited to, the following supplementary notes. [Appendix 1] a learning means for learning a discrimination model for identifying a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; The learning means calculates a classification score for the first data using the classification model, and learns the classification model using a loss weighted by a weight that depends on a relative level of the classification score within the group. Learning device. [Appendix 2] The learning means has a data conversion means for inputting second teacher data including third data corresponding to a certain object and a second data label for the third data, and generating the first teacher data from a plurality of partial data obtained by dividing the third data into a plurality of parts and the second data label. 2. A learning device as described in claim 1. [Appendix 3] The learning means is configured to calculate, as a weight for the first data, a strictly monotonically increasing function f(s) of the classification score for the first data normalized by a total value within the group. 3. A learning device according to claim 1 or 2. [Appendix 4] The strictly monotonically increasing function f(s) is expressed as follows, where s is the classification score and N is the number of classification classes of the classification model: f(s)=s-1 / N That is, 4. A learning device as described in appended claim 3. [Appendix 5] The strictly monotonically increasing function f(s) is expressed as follows, where s is the classification score and N is the number of classification classes of the classification model: f(s)=(s-1 / N) 2 That is, 4. A learning device as described in appended claim 3. [Appendix 6] The strictly monotonically increasing function f(s) is expressed as follows, where s is the classification score and N is the number of classification classes of the classification model: f(s)=exp(s-1 / N) That is, 4. A learning device as described in appended claim 3. [Appendix 7] When the number of classification classes of the classification model is N, the learning means uses the maximum value of the softmax output of the N components of the classification model as the classification score. 7. A learning device according to any one of claims 1 to 6. [Appendix 8] The discriminative model has a specific softmax output that is trained to increase in value when the class is uncertain, and the training means uses the degree of lowness of the specific softmax output as the discriminative score. 7. A learning device according to any one of claims 1 to 6. [Appendix 9] The first data is time series data. A learning device according to any one of appendix 1 to 8. [Appendix 10] The first data is time series data representing a movement trajectory of an object obtained by observation. 10. A learning device according to any one of claims 1 to 9. [Appendix 11] A discrimination model is trained to identify a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; In the learning, a classification score for the first data is calculated using the classification model; Calculating a weight that depends on the relative rank of the discrimination score within the group; Calculating a weighted loss using the calculated weights; training the discriminative model using the weighted loss; Learning device. [Appendix 12] On the computer, a process of learning a discrimination model for identifying a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; In the above learning, calculating a classification score for the first data using the classification model; Calculating a weight depending on the relative height of the classification score within the group; calculating a weighted loss using the calculated weights; training the discriminative model using the weighted loss; A computer-readable recording medium having a program recorded thereon for causing a computer to carry out the above. [Explanation of symbols]

[0107] 100 Inspection Systems 110 Gripping device 120 Lighting Equipment 130 Camera Equipment 200 Inspection Equipment 300 display device 400 containers 401 Cap

Claims

1. a learning means for learning a discrimination model for identifying a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; The learning means calculates a classification score for the first data using the classification model, and learns the classification model using a loss weighted by a weight that depends on a relative level of the classification score within the group. Learning device.

2. The learning means has a data conversion means for inputting second teacher data including third data corresponding to a certain target and a second data label for the third data, and generating the first teacher data from a plurality of partial data obtained by dividing the third data into a plurality of parts and the second data label. The learning device according to claim 1 .

3. the learning means is configured to calculate, as a weight for the first data, a strictly monotonically increasing function f(s) of the classification score for the first data normalized by a total value within the group; The learning device according to claim 1 or 2.

4. The strictly monotonically increasing function f(s) is expressed as follows, where s is the classification score and N is the number of classification classes of the classification model: f(s)=s-1 / N That is, The learning device according to claim 3 .

5. The strictly monotonically increasing function f(s) is expressed as follows, where s is the classification score and N is the number of classification classes of the classification model: f(s)=(s-1 / N) 2 That is, The learning device according to claim 3 .

6. The strictly monotonically increasing function f(s) is expressed as follows, where s is the classification score and N is the number of classification classes of the classification model: f(s)=exp(s-1 / N) That is, The learning device according to claim 3 .

7. When the number of discrimination classes of the discrimination model is N, the learning means uses a maximum value of a softmax output of N components of the discrimination model as the discrimination score. A learning device according to any one of claims 1 to 6.

8. The discriminative model has a specific softmax output that is trained to increase in value when the class is uncertain, and the training means uses the degree of lowness of the specific softmax output as the discriminative score. A learning device according to any one of claims 1 to 6.

9. The first data is time series data. A learning device according to any one of claims 1 to 8.

10. The first data is time series data representing a movement trajectory of an object obtained by observation. A learning device according to any one of claims 1 to 9.

11. Using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group, a discrimination model is trained to identify a class to which second data corresponding to an unknown object belongs; In the learning, a classification score for the first data is calculated using the classification model; Calculating a weight that depends on the relative rank of the discrimination score within the group; Calculating a weighted loss using the calculated weights; training the discriminative model using the weighted loss; How to learn.

12. On the computer, a process of learning a discrimination model for identifying a class to which second data corresponding to an unknown object belongs, using first training data including a group including a plurality of first data corresponding to the same object and a first data label for the group; In the above learning, calculating a classification score for the first data using the classification model; Calculating a weight depending on the relative height of the classification score within the group; calculating a weighted loss using the calculated weights; training the discriminative model using the weighted loss; A program to carry out the above.

Citation Information

Patent Citations

  • Risk operation recognition model construction method and risk operation recognition method

    CN112598311A

  • Inspection method, inspection device, and inspection program

    JP2019174346A

  • Data processing device, data processing method and data processing program

    JP2020149601A

  • Learning data refining method and computer system

    JP2021033544A