WO2023189734A1 - Object identification device, object identification method, and program - Google Patents

Object identification device, object identification method, and program Download PDF

Info

Publication number
WO2023189734A1
WO2023189734A1 PCT/JP2023/010610 JP2023010610W WO2023189734A1 WO 2023189734 A1 WO2023189734 A1 WO 2023189734A1 JP 2023010610 W JP2023010610 W JP 2023010610W WO 2023189734 A1 WO2023189734 A1 WO 2023189734A1
Authority
WO
WIPO (PCT)
Prior art keywords
drug
image
type
group
identification
Prior art date
Application number
PCT/JP2023/010610
Other languages
French (fr)
Japanese (ja)
Inventor
真司 羽田
Original Assignee
富士フイルム富山化学株式会社
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 富士フイルム富山化学株式会社 filed Critical 富士フイルム富山化学株式会社
Publication of WO2023189734A1 publication Critical patent/WO2023189734A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61JCONTAINERS SPECIALLY ADAPTED FOR MEDICAL OR PHARMACEUTICAL PURPOSES; DEVICES OR METHODS SPECIALLY ADAPTED FOR BRINGING PHARMACEUTICAL PRODUCTS INTO PARTICULAR PHYSICAL OR ADMINISTERING FORMS; DEVICES FOR ADMINISTERING FOOD OR MEDICINES ORALLY; BABY COMFORTERS; DEVICES FOR RECEIVING SPITTLE
    • A61J3/00Devices or methods specially adapted for bringing pharmaceutical products into particular physical or administering forms
    • A61J3/06Devices or methods specially adapted for bringing pharmaceutical products into particular physical or administering forms into the form of pills, lozenges or dragees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Definitions

  • the present disclosure relates to an object identification device, an object identification method, and a program, and particularly relates to an image recognition technique for identifying an object from an image.
  • Patent Document 1 discloses drug identification software that sets a drug to be differentiated in a drug imaging device, photographs the drug, and searches for the drug by referring to a database based on the data of the photographed drug image. is listed.
  • Patent Document 2 describes an imaging step of capturing a reflected light image and a transmitted light image of a packaging paper in which one or more tablets for one dose are packaged, and a reflected light image based on the reflected light image and the transmitted light image.
  • the type of each tablet is determined by a cutting process in which a tablet area corresponding to the tablet inside is cut out, and by comparing the dimensions and colors of each tablet area cut out by the cutting process with model information regarding the shape and color of the tablet. At least similar tablets of different types but with similar features based on a learning model generated by performing machine learning using learning data including images of tablets.
  • a second identification step of identifying the type of the tablet is described.
  • the type of drug can be identified using information from stamps or printed characters and/or symbols attached to the tablet.
  • drugs such as capsule drugs and half-tablets
  • only part of the character and symbol information used to identify the drug type is captured in the photographed image, or there are countless patterns of capsule interlocking and tablet division.
  • it is difficult or impossible to identify the drug type by template matching of a photographed image with a master image or by machine learning-based methods.
  • characters and/or symbols attached to drugs by stamping or printing are referred to as "character symbols.”
  • the drug type can be identified through image recognition based on captured images.
  • the captured image is enlarged and information on the text symbols attached to the drug is presented to the user.
  • the drug type can be identified by visual inspection and text or voice input, and by searching a database such as a stamped text master.
  • a method of presenting information useful for drug type identification to the user to support the drug type identification work is considered to be practically effective.
  • a system is constructed that separates drugs whose drug type can be identified and drugs whose drug type is difficult to identify, photographs only drugs whose drug type can be identified, and identifies the type of drugs whose drug type can be identified. It is also possible.
  • Such technical issues are not limited to applications for identifying drugs, but can be understood as common issues when identifying the type of object from an image of various objects.
  • an object whose type can be identified from an image is referred to as an "object whose type can be identified”, and an object whose type is difficult to identify from an image but whose group it belongs to can be identified as a "difficult to identify object”. ”.
  • the present disclosure has been made in view of the above circumstances, and describes the method of identifying the type of each object using an image in which a plurality of objects are photographed, in which objects whose types can be identified and objects whose types are difficult to identify can coexist.
  • the object of the present invention is to provide an object identification device, an object identification method, and a program that enable the object identification.
  • An object identification device includes a detector that detects objects on an object-by-object basis from images in which a plurality of objects are photographed, and can identify the type of object from the image among the objects detected by the detector.
  • a classifier that estimates the type of the object from the image for objects whose type can be specified, and estimates the group from the image for objects whose type is difficult to specify from the image, but the group to which the object belongs can be specified; and a processing unit that performs group-specific processing that leads to identification of the type of objects estimated as a group by the classifier.
  • objects are detected from images in which a plurality of objects are photographed, and estimation is performed for each object by a classifier. If the object detected from the image is an object whose type can be identified, the classifier estimates the type of the object. On the other hand, if an object detected from an image is an object whose type is difficult to identify, the classifier estimates the group to which the object belongs, and performs group-specific processing that contributes to identifying the object type for objects whose group has been estimated. This will lead to identification of the species.
  • the image may be an image taken in a state in which objects whose types can be identified and objects whose types are difficult to identify coexist.
  • the object whose type is difficult to identify may be classified into a plurality of groups, and a group-specific process may be determined for each group.
  • the detector is configured to include a first trained model trained by machine learning using first training data in which each object is labeled without distinguishing between objects whose types can be identified and objects whose types are difficult to identify. It's okay.
  • the classifier is trained by machine learning using second training data in which objects whose type can be identified are labeled by the type of the object, and objects whose type is difficult to identify are labeled by the group to which the object belongs.
  • the configuration may include trained models.
  • Labels that identify groups may be defined in a hierarchical structure.
  • an object image obtained by cutting out the area of the object detected by the detector from the image in object units, a character/symbol extraction image containing at least one of characters and symbols extracted from the object image, and the external shape of the object.
  • the configuration may be such that at least one of an image and object size information is used.
  • a configuration may also be adopted in which magnification information indicating the enlargement or reduction ratio of the object image is used as input to the discriminator.
  • the group-specific processing may include processing to display a screen that accepts input of search conditions for searching for the type of object within the estimated group.
  • the object is a drug
  • the hard-to-identify object includes at least one of a capsule drug, a plain drug, and a divided tablet
  • the identifiable object includes a tablet with an inscription or print.
  • the configuration may include the following.
  • a drug image is obtained by cutting out the region of the drug detected by the detector from the image for each drug, a character/symbol extraction image containing at least one of the characters and symbols extracted from the drug image, and the outline of the drug.
  • the configuration may be such that at least one of an image and drug size information is used.
  • An object identification device is an object identification device including one or more processors and one or more memories in which programs executed by the one or more processors are stored, the object identification device including: The two or more processors perform a detection process that detects objects in units of objects from images in which multiple objects are photographed, and detect objects that can be identified from the image to the type of the object detected by the detection process.
  • the type of object can be estimated from the image, and although it is difficult to identify the type of object from the image, the group to which the object belongs can be estimated.For objects that are difficult to identify, a classification process is performed to estimate the group from the image, and the classification process is used to estimate the group. processing for transitioning to group-specific processing that leads to identification of the type of the object.
  • the one or more processors include a first trained model trained by machine learning using first training data that is labeled on an object-by-object basis without distinguishing between objects whose types can be identified and objects whose types are difficult to identify.
  • the configuration may be such that the detection process is executed using a detector.
  • the one or more processors are trained by machine learning using second training data in which objects whose type can be identified are labeled by the type of the object, and objects whose type is difficult to identify are labeled by the group to which the object belongs.
  • the configuration may also be such that the classification process is executed using a classifier including a second trained model.
  • the one or more processors may be configured to cut out a region of the object detected by the detection process from the image, execute processing to generate an object image for each object, and perform identification processing based on the object image.
  • the object is a drug
  • the hard-to-identify object includes at least one of a capsule drug, a plain drug, and a divided tablet
  • the identifiable object includes a tablet with an inscription or print.
  • the group-specific processing may include processing for displaying a screen that accepts input of search conditions for searching for the type of drug within the estimated group.
  • a first database in which character symbol information including at least one of characters and symbols indicated by a stamp or print attached to a drug is associated with a drug type, and a master image of the drug.
  • a second database in which is stored, the one or more processors search at least one of the first database and the second database based on the accepted search conditions, and search for drugs corresponding to the search conditions.
  • the configuration may be such that the candidates are output.
  • the one or more processors may be configured to perform processing to display a screen including a photographed image display unit that displays an image and a candidate display unit that displays information about the candidate object based on the estimation result of the identification process. good.
  • the one or more processors may be configured to perform a process of displaying information on a group to which a candidate object to be displayed on the candidate display section belongs.
  • the one or more processors may be configured to accept an instruction specifying a group to which a candidate object to be displayed on the candidate display section belongs, and control the display on the candidate display section according to the received instruction.
  • a configuration may be provided that includes a camera and a display that displays an image taken by the camera and information regarding an object estimated from the image.
  • An object identification method is an object identification method executed by one or more processors, wherein the one or more processors detect objects in units of objects from images in which a plurality of objects are photographed. Among the detected objects, if the type of the object can be estimated from the image and the type of the object can be identified, the type of the object is estimated from the image, and although it is difficult to identify the type of object from the image, the group to which the object belongs is determined.
  • the method includes estimating a group from an image for objects whose type is difficult to specify, and performing group-specific processing that leads to specifying the type of objects estimated as a group.
  • a program provides a computer with a function of detecting objects on an object-by-object basis from images in which a plurality of objects are photographed, and a type identification that can identify the type of the object from the image among the detected objects.
  • the type of object is estimated from the image, and although it is difficult to identify the type of object from the image, it is possible to identify the group to which the object belongs.For objects that are difficult to identify, there is a function that estimates the group from the image, and it is estimated as a group.
  • a function for executing group-specific processing that leads to identification of the type of object is realized.
  • the present disclosure it is possible to identify the type of each object in an image even if the image is a mixture of objects whose types can be identified and objects whose types are difficult to identify.
  • FIG. 1 is a front perspective view of a smartphone.
  • FIG. 2 is a rear perspective view of the smartphone.
  • FIG. 3 is a block diagram showing the electrical configuration of the smartphone.
  • FIG. 4 is a block diagram showing the internal configuration of the in-camera.
  • FIG. 5 is a block diagram showing the functional configuration of the drug type identification device according to the embodiment.
  • FIG. 6 is a flowchart showing an overview of a learning phase by machine learning for realizing a drug type identification device including a drug detector and a drug discriminator.
  • FIG. 7 is an explanatory diagram showing an example of an identification code provided as training data for a drug whose drug type can be specified.
  • FIG. 8 is an explanatory diagram showing an example of an identification code provided as training data for a drug whose drug type is difficult to identify.
  • FIG. 9 is an explanatory diagram showing another example of an identification code given as training data for a capsule drug.
  • FIG. 10 is an explanatory diagram showing another example of an identification code given as teacher data for a plain drug.
  • FIG. 11 is a conceptual diagram showing an example of information input to the drug identifier.
  • FIG. 12 is a diagram showing an example of input information to the neural network.
  • FIG. 13 is a diagram showing another example of input information to the neural network.
  • FIG. 14 is a diagram showing an example of input information in the case of a capsule medicine with an identification symbol printed on the capsule.
  • FIG. 15 is a diagram showing an example of input information for a capsule drug without an identification symbol.
  • FIG. 16 is a diagram showing an example of input information in the case of a half tablet.
  • FIG. 17 is a block diagram showing the functional configuration of the machine learning system.
  • FIG. 18 is a flowchart showing the operation of the drug type identification device according to the embodiment.
  • FIG. 19 is a flowchart showing the operation of the drug type identification device according to the embodiment, and shows an example of loop processing applied to step S15 and step S16 in FIG. 18.
  • FIG. 20 is a diagram showing an example of a screen displayed on a touch panel display.
  • FIG. 21 is a diagram showing an example of a screen display when editing a drug area.
  • FIG. 22 is an explanatory diagram illustrating an example of a region editing operation method.
  • FIG. 23 is a diagram illustrating an example of a screen display in a state where the identification of the drug has been determined.
  • FIG. 24 is a diagram showing an example of a screen display of an identification result confirmation GUI (Graphical User Interface).
  • FIG. 25 is a diagram showing an example of a screen display of the candidate list display GUI.
  • FIG. 26 is a diagram showing an example of a screen display of the engraved text GUI.
  • FIG. 27 is a diagram showing an example of a screen display of the capsule search GUI.
  • FIG. 28 is a diagram showing an example of a screen display of the plain medicine search GUI.
  • FIG. 29 is a diagram showing an example of a screen display of the divided tablet search GUI.
  • FIG. 30 is a diagram showing an example of an icon representing the shape of a typical drug.
  • FIG. 31 is a diagram showing an example of icons used for color selection.
  • FIG. 32 is a block diagram illustrating an example of a functional configuration for identifying the type of drug that is difficult to identify in the drug type identification device according to the embodiment.
  • FIG. 33 is a top view of the photographic assistance device.
  • FIG. 34 is a sectional view taken along line 34-34 in FIG. 33.
  • FIG. 35 is a top view of the photographing auxiliary device with the auxiliary light source removed.
  • FIG. 36 is a top view of a photographic assisting device according to another embodiment.
  • FIG. 37 is a sectional view taken along line 37-37 in FIG. 36.
  • FIG. 38 is a top view of the photographing auxiliary device with the auxiliary light source removed.
  • FIG. 39 is a cross-sectional view showing an example of a lighting device.
  • FIG. 34 is a sectional view taken along line 34-34 in FIG. 33.
  • FIG. 35 is a top view of the photographing auxiliary device with the auxiliary light source removed.
  • FIG. 36 is a top view of a
  • FIG. 40 is a top view of a drug mounting table using a circular marker as a reference marker.
  • FIG. 41 is a top view of a medicine placement table using a circular marker according to a modified example.
  • FIG. 42 is a diagram showing a specific example of a reference marker having a rectangular outer shape.
  • FIG. 43 is a top view of a medicine placement table using a circular marker according to another modification.
  • FIG. 44 is a diagram showing another specific example of a rectangular reference marker.
  • FIG. 45 is a diagram showing an example of a drug mounting table having a recessed structure.
  • FIG. 46 is a diagram showing an example of a drug mounting table having a recessed structure for capsule drugs.
  • FIG. 47 is a diagram illustrating an example of a drug platform having a recessed structure for elliptical tablets.
  • the drug type identification device is a device that identifies the type of drug (drug type) from an image of the drug.
  • drug type the type of drug
  • the drug type identification device detects each drug from an image of a plurality of drugs, and automatically determines whether each detected drug is a difficult-to-identify drug or a drug that can be identified. This makes it possible to efficiently identify the drug type by automatically branching to a drug type identification flow suitable for each drug type.
  • the drug type identification device is installed in a mobile terminal device, for example.
  • the mobile terminal device includes at least one of a smartphone, a mobile phone, a PHS (Personal Handy-phone System), a PDA (Personal Digital Assistant), a tablet computer terminal, a notebook personal computer terminal, and a mobile game console.
  • a drug type identification device realized by hardware and software of a smartphone will be described in detail with reference to the drawings.
  • FIG. 1 is a front perspective view of a smartphone 10 that is a camera-equipped mobile terminal device that functions as a drug type identification device according to an embodiment.
  • the smartphone 10 has a flat housing 12.
  • the smartphone 10 includes a touch panel display 14, a speaker 16, a microphone 18, and an in-camera 20 on the front of a housing 12.
  • the touch panel display 14 includes a display section that displays images and the like, and a touch panel section that is placed in front of the display section and receives touch input.
  • the display unit is, for example, a color LCD (Liquid Crystal Display) panel.
  • the touch panel section is, for example, a capacitive touch panel that is provided in a planar manner on a substrate main body that has optical transparency, and has a position detection electrode that has optical transparency, and an insulating layer provided on the position detection electrode. It is.
  • the touch panel section generates and outputs two-dimensional position coordinate information corresponding to a user's touch operation. Touch operations include tap operations, double-tap operations, flick operations, swipe operations, drag operations, pinch-in operations, and pinch-out operations.
  • the speaker 16 is an audio output unit that outputs audio during a call and when playing a video.
  • the microphone 18 is an audio input unit into which audio is input during a call and when shooting a video.
  • the in-camera 20 is an imaging device that shoots moving images and still images.
  • FIG. 2 is a rear perspective view of the smartphone 10.
  • the smartphone 10 includes an out camera 22 and a light 24 on the back surface of the housing 12.
  • the outside camera 22 is an imaging device that photographs moving images and still images.
  • the light 24 is a light source that emits illumination light when photographing with the out-camera 22, and is composed of, for example, an LED (Light Emitting Diode).
  • the smartphone 10 includes switches 26 on the front and side surfaces of the housing 12, respectively.
  • the switch 26 is an input member that receives instructions from the user.
  • the switch 26 is a push-button switch that is turned on when pressed with a finger or the like, and turned off by the restoring force of a spring or the like when the finger is released.
  • the configuration of the housing 12 is not limited to this, and a configuration having a folding structure or a sliding mechanism may be adopted.
  • the main function of the smartphone 10 is a wireless communication function that performs mobile wireless communication via a base station device and a mobile communication network.
  • FIG. 3 is a block diagram showing the electrical configuration of the smartphone 10.
  • the smartphone 10 includes the above-mentioned touch panel display 14, speaker 16, microphone 18, in-camera 20, out-camera 22, light 24, and switch 26, as well as a CPU (Central Processing Unit) 28, wireless communication 30, a communication section 32, a memory 34, an external input/output section 40, a GPS reception section 42, and a power supply section 44.
  • CPU Central Processing Unit
  • the CPU 28 is an example of a processor that executes instructions stored in the memory 34.
  • the CPU 28 operates according to the control program and control data stored in the memory 34, and centrally controls each part of the smartphone 10.
  • the CPU 28 has a mobile communication control function that controls each part of the communication system and an application processing function in order to perform voice communication and data communication through the wireless communication unit 30.
  • the CPU 28 has an image processing function that displays moving images, still images, characters, etc. on the touch panel display 14. This image processing function visually conveys information such as still images, moving images, and text to the user. Further, the CPU 28 acquires two-dimensional position coordinate information corresponding to the user's touch operation from the touch panel section of the touch panel display 14. Further, the CPU 28 obtains an input signal from the switch 26.
  • FIG. 4 is a block diagram showing the internal configuration of the in-camera 20. Note that the internal configuration of the out-camera 22 is the same as that of the in-camera 20. As shown in FIG. 4, the in-camera 20 includes a photographic lens 50, an aperture 52, an image sensor 54, an AFE (Analog Front End) 56, an A/D (Analog to Digital) converter 58, and a lens drive unit 60. .
  • the photographing lens 50 is composed of a zoom lens 50Z and a focus lens 50F.
  • the lens drive unit 60 performs optical zoom adjustment and focus adjustment by driving the zoom lens 50Z and focus lens 50F forward and backward in response to commands from the CPU 28. Further, the lens drive section 60 controls the aperture 52 according to commands from the CPU 28 to adjust exposure.
  • the lens drive section 60 corresponds to an exposure correction section that performs exposure correction of the camera based on the color of gray, which will be described later. Information such as the positions of the zoom lens 50Z and the focus lens 50F and the opening degree of the aperture 52 is input to the CPU 28.
  • the image sensor 54 includes a light-receiving surface in which a large number of light-receiving elements are arranged in a matrix.
  • the subject light that has passed through the zoom lens 50Z, the focus lens 50F, and the aperture 52 is imaged on the light receiving surface of the image sensor 54.
  • color filters of R (red), G (green), and B (blue) are provided on the light receiving surface of the image sensor 54.
  • Each light-receiving element of the image sensor 54 converts the subject light imaged on the light-receiving surface into an electrical signal based on R, G, and B color signals. Thereby, the image sensor 54 acquires a color image of the subject.
  • a photoelectric conversion element such as CMOS (Complementary Metal-Oxide Semiconductor) or CCD (Charge-Coupled Device) can be used.
  • the AFE 56 performs noise removal, amplification, etc. of the analog image signal output from the image sensor 54.
  • the A/D converter 58 converts the analog image signal input from the AFE 56 into a digital image signal with a gradation range.
  • an electronic shutter is used as a shutter to control the exposure time of incident light to the image sensor 54.
  • the exposure time can be adjusted by controlling the charge accumulation period of the image sensor 54 by the CPU 28.
  • the in-camera 20 may convert image data of captured moving pictures and still images into compressed image data such as MPEG (Moving Picture Experts Group) or JPEG (Joint Photographic Experts Group).
  • MPEG Motion Picture Experts Group
  • JPEG Joint Photographic Experts Group
  • the CPU 28 causes the memory 34 to store the moving images and still images taken by the in-camera 20 and the out-camera 22. Further, the CPU 28 may output the moving images and still images taken by the in-camera 20 and the out-camera 22 to the outside of the smartphone 10 through the wireless communication unit 30 or the external input/output unit 40.
  • the CPU 28 displays the moving images and still images taken by the in-camera 20 and the out-camera 22 on the touch panel display 14.
  • the CPU 28 may use the moving images and still images taken by the in-camera 20 and the out-camera 22 within the application software.
  • the CPU 28 may illuminate the subject with shooting auxiliary light by turning on the light 24 when shooting with the out-camera 22.
  • the lighting and extinguishing of the light 24 may be controlled by the user's touch operation on the touch panel display 14 or the operation of the switch 26 .
  • the wireless communication unit 30 performs wireless communication with a base station device accommodated in a mobile communication network according to instructions from the CPU 28.
  • the smartphone 10 uses this wireless communication to send and receive various file data such as audio data and image data, e-mail data, etc., and receive Web (abbreviation for World Wide Web) data, streaming data, and the like.
  • Web abbreviation for World Wide Web
  • a speaker 16 and a microphone 18 are connected to the talking section 32 .
  • the communication unit 32 decodes the audio data received by the wireless communication unit 30 and outputs it from the speaker 16.
  • the communication unit 32 converts the user's voice input through the microphone 18 into voice data that can be processed by the CPU 28 and outputs the data to the CPU 28 .
  • the memory 34 stores instructions for the CPU 28 to execute.
  • the memory 34 includes an internal storage section 36 built into the smartphone 10 and an external storage section 38 that is detachable from the smartphone 10 .
  • the internal storage section 36 and the external storage section 38 are realized using known storage media.
  • the memory 34 stores the control program of the CPU 28, control data, application software, address data associated with the name and telephone number of the communication partner, data of sent and received e-mails, web data downloaded through web browsing, and downloaded content. Store data etc. Further, the memory 34 may temporarily store streaming data and the like.
  • the external input/output unit 40 serves as an interface with an external device connected to the smartphone 10.
  • the smartphone 10 is directly or indirectly connected to other external devices through communication or the like via the external input/output unit 40 .
  • the external input/output unit 40 transmits data received from an external device to each component inside the smartphone 10, and transmits data inside the smartphone 10 to the external device.
  • Examples of communication methods include Universal Serial Bus (USB), IEEE (Institute of Electrical and Electronics Engineers) 1394, the Internet, wireless LAN (Local Area Network), Bluetooth (registered trademark), and RFID (Radio Frequency Identification). ), and infrared communication.
  • external devices include, for example, a headset, an external charger, a data port, an audio device, a video device, a smartphone, a PDA, a personal computer, and an earphone.
  • the GPS receiving unit 42 detects the position of the smartphone 10 based on positioning information from GPS satellites ST1, ST2, ..., STn.
  • the power supply unit 44 is a power supply source that supplies power to each part of the smartphone 10 via a power supply circuit (not shown).
  • Power supply section 44 includes a lithium ion secondary battery.
  • the power supply section 44 may include an A/D conversion section that generates a DC voltage from an external AC power source.
  • the smartphone 10 configured in this manner is set to the shooting mode by inputting an instruction from the user using the touch panel display 14 or the like, and can shoot moving images and still images using the in-camera 20 and the out-camera 22.
  • the smartphone 10 When the smartphone 10 is set to the shooting mode, it enters a shooting standby state, a moving image is shot by the in-camera 20 or the out-camera 22, and the shot moving image is displayed on the touch panel display 14 as a live view image.
  • the user can visually check the live view image displayed on the touch panel display 14 to determine the composition, confirm the subject to be photographed, and set photographing conditions.
  • the smartphone 10 When the smartphone 10 is in the shooting standby state and is instructed to shoot by inputting an instruction from the user using the touch panel display 14 or the like, the smartphone 10 performs AF (Autofocus) and AE (Auto Exposure) control to shoot and store videos and still images. I do.
  • AF Autofocus
  • AE Automatic Exposure
  • FIG. 5 is a block diagram showing the functional configuration of the drug type identification device 100 realized by the smartphone 10.
  • Drug type identification device 100 includes a processor 102 and a storage device 104.
  • Processor 102 includes CPU 28.
  • the processor 102 may include a GPU (Graphics Processing Unit).
  • Storage device 104 is a non-transitory, tangible, computer-readable medium and includes memory 34 .
  • Processor 102 is connected to touch panel display 14 .
  • the touch panel display 14 includes a display section 14A that functions as a display device (display), and an input section 14B that functions as an input device that receives input by touch operation.
  • the drug type identification device 100 includes an image acquisition section 112, a drug detector 114, a region correction section 116, a drug region cutting section 118, a drug identifier 120, a text search section 122, a display control section 124, and an input processing section 126. .
  • the image acquisition unit 112 acquires a captured image of the drug to be identified.
  • the photographed image is, for example, an image photographed by the in-camera 20 or the out-camera 22.
  • the photographed image may be an image acquired from another device via the wireless communication section 30, the external storage section 38, or the external input/output section 40.
  • the photographed image may include a plurality of drugs to be identified.
  • the plurality of drugs to be identified are not limited to drugs of the same drug type, but may be drugs of different drug types. In this embodiment, an example will be described in which an image in which a plurality of drugs are photographed together (as one image) is processed in a state where different types of drugs are mixed.
  • the photographed image may be an image in which the drug to be identified and the marker are photographed.
  • the marker may be, for example, an ArUco marker, a circular marker, a square marker, or the like.
  • a plurality of markers are included in the captured image.
  • the plurality of markers are arranged, for example, at the four corners of the rectangular area of the medicine placement range.
  • the photographed image may be an image in which the drug to be identified and a reference gray color are photographed.
  • the photographed image may be an image photographed at a standard photographing distance and photographing viewpoint.
  • the photographing distance can be expressed from the distance between the drug to be identified and the photographing lens 50, and the focal length of the photographing lens 50.
  • the photographing viewpoint can be expressed by the angle formed by the marker printing surface and the optical axis of the photographing lens 50.
  • the image acquisition unit 112 includes an image correction unit (not shown).
  • the image correction unit standardizes the photographing distance and photographing viewpoint of the photographed image based on the marker to obtain a standardized image.
  • the standardized image may be an image obtained by performing standardization processing on a photographed image and then cutting out an area inside a rectangle having four corner markers as vertices.
  • the image correction unit specifies the coordinates to which the four vertices of the rectangle whose coordinates are specified by the marker go after standardization of the photographing distance and photographing viewpoint.
  • the image correction unit obtains a perspective transformation matrix that transforms these four vertices into respective designated coordinate positions.
  • Such a perspective transformation matrix is uniquely determined if there are four points. For example, if there is a correspondence between four points, a transformation matrix can be obtained using the getPerspectiveTransform function of OpenCV (Open Source Computer Vision Library).
  • the image correction unit perspectively transforms the entire original captured image using the obtained perspective transformation matrix, and obtains a transformed image.
  • Such perspective transformation can be executed by using the warpPerspective function of OpenCV.
  • the image after this conversion may be a standardized image in which the photographing distance and photographing viewpoint are standardized.
  • the image correction unit may perform color tone correction of the captured image based on the reference gray color.
  • the drug detector 114 includes a first learned model TM1 that is a learning model trained by machine learning.
  • the first trained model TM1 is a model trained to perform a so-called object detection task.
  • the first trained model TM1 receives an image (pre-standardized image or standardized image) as input, it outputs position information corresponding to the region of the detected object, the class of the object, and a score indicating the probability of the object's certainty. do.
  • the first trained model TM1 is an example of a "first trained model" in the present disclosure.
  • the class of objects in drug detection includes at least "drug” and may further include “marker.”
  • the drug detector 114 detects a drug from the captured image acquired by the image acquisition unit 112 and outputs information indicating the area of the detected drug.
  • the drug detector 114 detects a drug area from the standardized image. If a plurality of drugs are included in the captured image, the drug detector 114 detects regions of each of the plurality of drugs.
  • the output from the first trained model TM1 may be position information of a bounding box indicating the region of each drug detected in the photographed image, or a segmentation mask that fills in the region of each drug pixel by pixel. It may be an image. Details of the learning method for creating the first trained model TM1 and the content of the detection process by the drug detector 114 will be described later. Drug detector 114 is an example of a "detector" in this disclosure.
  • the results of the detection process by the drug detector 114 are displayed on the display section 14A via the display control section 124.
  • the display control unit 124 generates a signal for display on the touch panel display 14 and performs display control.
  • the display control section 124 includes a magnification changing section 125 that changes the display magnification of the image displayed on the display section 14A.
  • an instruction to change the display magnification is input, such as when a pinch-out operation or a pinch-in operation is performed on the touch panel display 14, the magnification changing unit 125 performs enlargement or reduction processing according to the instruction.
  • the input processing section 126 receives input from the input section 14B or the microphone 18, and sends the received input information to the corresponding processing section.
  • the area correction unit 116 receives a correction instruction from the user regarding the drug area detected by the drug detector 114, and performs a process of correcting the drug area according to the received instruction. That is, the region modification section 116 modifies the detection result of the drug detector 114 according to the region modification instruction received from the input section 14B.
  • the area correction unit 116 allows the user to specify the correct area of the drug to be identified by inputting an instruction to correct the detection result from the input unit 14B when an erroneous detection or failure of detection occurs by the drug detector 114. be able to.
  • the drug region cutting unit 118 performs a process of cutting out a drug region for each drug from the photographed image based on the detection result of the drug detector 114.
  • the medicine region cutting unit 118 performs a process of cutting out the modified medicine region.
  • the drug identifier 120 includes a second learned model TM2 that is a learning model trained by machine learning.
  • the second trained model TM2 is a model trained to perform a so-called object recognition task.
  • the drug identifier 120 acquires each drug region image (hereinafter referred to as a drug image) cut out by the drug region cutting unit 118, estimates the type of the corresponding drug or the group to which the drug belongs, and labels it. (i.e., multi-class classification).
  • the class classification performed by the drug identifier 120 differs in the fineness (granularity) of the classification depending on whether the drug in the input image is a drug whose drug type is difficult to identify or a drug whose drug type can be identified.
  • the drug image is an example of an "object image” in the present disclosure.
  • the second trained model TM2 is an example of a "second trained model” in the present disclosure.
  • the drug identifier 120 estimates the group to which the drug belongs and outputs the estimation result.
  • examples of the group to which drugs whose drug type is difficult to identify may include "capsule drugs,” "divided tablets,” or "plain drugs.”
  • the group definition may be further divided into categories, and subgroups may be defined by hierarchical classification. For example, groups can be defined such as “white single-color capsule drugs,” “red and white bicolor capsule drugs,” “half tablets,” “quarter tablets,” “white plain drugs,” or “transparent plain drugs.” Good too.
  • the drug identifier 120 identifies the type of drug (drug type) and outputs the estimation result of the drug type.
  • the identification information of the drug type output by the drug identifier 120 may be, for example, a unique identification code defined for each drug type. Details of the learning method for creating the second learned model TM2 and the content of the identification process by the drug discriminator 120 will be described later.
  • the drug identifier 120 searches a drug master database (not shown) based on the identification code unique to the estimated drug type, and obtains drug information about the corresponding drug or similar drugs.
  • Drug identifier 120 is an example of a "discriminator" in the present disclosure.
  • the results of the identification process by the drug identifier 120 are displayed on the display section 14A via the display control section 124. After confirming the identification result displayed on the display unit 14A, the user can take actions such as finalizing the identification result, modifying the identification result, or performing a separate text search.
  • the text search unit 122 receives input of a search key from the input unit 14B or the microphone 18, accesses the stamped text master database 130, searches for relevant information, and outputs the search results.
  • the stamped text master includes data in which text information of character symbols stamped or printed for various drugs is linked to the type of drug.
  • the text information of characters and symbols stored in the database 130 is an example of "characters and symbols information" in the present disclosure.
  • the storage device 104 stores an engraved dextrose master database 130, a master image database 131 including master images of various drugs, and a drug master database (not shown). Master image database 131 may be included in a drug master database. Data such as the stamped text master, master image, and drug master may be stored on a network such as a cloud server (not shown).
  • the search results by the text search section 122 are displayed on the display section 14A via the display control section 124. Further, the master image read from the master image database 131 is displayed on the display section 14A via the display control section 124.
  • Database 130 is an example of a "first database” in the present disclosure.
  • Master image database 131 is an example of a "second database” in the present disclosure.
  • the storage device 104 includes an identification result storage section 132.
  • the identification result storage unit 132 is a storage area that stores the identification results of drug types by the drug identifier 120, the identification results of drug types specified based on the search results by the text search unit 122, and the like.
  • the drug type identification device 100 causes each of the drug detector 114 and the drug identifier 120 to learn based on machine learning as described below, and configures the drug type identification device 100 by combining them.
  • FIG. 6 is a flowchart outlining a learning phase by machine learning for realizing the drug type identification device 100 including the drug detector 114 and the drug identifier 120.
  • the processing of each step shown in FIG. 6 can be performed, for example, by a computer executing a program.
  • the machine learning method for obtaining the drug type identification device 100 includes a step of creating training data used for training the drug detector 114 (step S1: first training data creation step), and performing machine learning using the training data.
  • a process of training the drug detector 114 (step S2: first training process), a process of creating training data used for training the drug identifier 120 (step S3: second training data creation process), A process of training the drug identifier 120 by performing machine learning using the drug detector 114 (step S4), and a drug type identification device using the drug detector 114 trained in step S2 and the drug identifier 120 trained in step S4. 100 (step S5).
  • the training data used for supervised learning includes input data and correct answer data (supervised data).
  • Creating training data includes creating correct answer data (teacher data) corresponding to input data.
  • the process of creating the drug detector 114 (step S1, step S2) and the process of creating the drug identifier 120 (step S3, step S4) may be executed in parallel or sequentially. good.
  • the execution timing of each step 1 to 5 is not particularly limited, and may be executed continuously, or the processing of each step may be executed at different times or using different computers.
  • a first computer executes the process of creating the drug detector 114 (step S1, step S2), and a second computer different from the first computer executes the process of creating the drug identifier 120 (step S3, step S2).
  • S4 may also be executed.
  • the first computer may execute the process of creating training data (steps S1 and S3), and the second computer may execute the learning process (steps S2 and S4).
  • teacher data (correct data) is added to the training image regarding the position information and class of each drug included in the image.
  • the drug position information provided as teacher data may be information specifying the position of a bounding box surrounding the drug, or may be a mask filled with the shape of the drug itself.
  • the class label assigned as the teacher data may be uniformly set to "drug" regardless of the type of drug (drug type). In other words, the same classification label is given to both drugs whose drug type can be identified and drugs whose drug type is difficult to identify.
  • the drug detector 114 uses object position information, class information, and detected objects ( Here, we estimate the probability of drug use.
  • the object position information includes, for example, "coordinates of the four vertices of a non-rotated bounding box surrounding the drug,”"center coordinates, height, and width of a non-rotated bounding box surrounding the drug,” and “rotation surrounding the drug.” ⁇ center coordinates, height, width, and rotation angle of the bounding box'' or ⁇ a mask filled with the shape of the drug itself.'''
  • the object position information is preferably "center coordinates, height, width, and rotation angle of a rotating bounding box surrounding the drug" or "a mask filled with the shape of the drug itself.”
  • step S2 machine learning is performed to train a learning model (hereinafter referred to as the first learning model) applied to the drug detector 114 using the dataset of training data created in step S1.
  • the first learning model is configured using, for example, a neural network.
  • a convolutional neural network CNN
  • Drug detector 114 is trained to receive image input and output object position information for individual drugs within the image.
  • training of the first learning model requires a dataset that includes training data in which the marker region is given as correct data (teacher data).
  • the training data used for learning the drug detector 114 is an example of "first training data" in the present disclosure.
  • the drug identifier 120 is input with images of individual drugs, and is trained to estimate the class information of the type of drug or the group to which the drug belongs, and the likelihood of the identified class.
  • a unique identification code determined for each drug is given as a correct label.
  • an identification code is assigned to the group to which the drug belongs.
  • correct labels can be added for groups such as "capsule drug,” “plain drug,” “half tablet,” or “quarter tablet,” for which you want to branch the processing flow in the drug type identification phase.
  • capsule drug may be further divided into smaller groups such as “hard capsule drug” and “soft capsule drug” and correct labels may be assigned.
  • a stamp extraction image is an image in which only the stamped part or printed part of the medicine is extracted, and the stamped part or printed part is represented in white on a mainly black background.
  • the training data used for learning the drug identifier 120 is an example of "second training data" in the present disclosure.
  • FIG. 7 is a diagram illustrating an example of an identification code provided as training data for a drug whose drug type can be identified. For drugs whose drug type can be identified, a different identification code is assigned to each drug type. “P000001”, “P000002”, . . . “P009999” in FIG. 7 represent examples of identification codes uniquely defined corresponding to different drug types.
  • the identification code shown in FIG. 7 is an example of a "type unit" label in the present disclosure.
  • FIG. 8 is a diagram showing an example of an identification code provided as training data for a drug whose drug type is difficult to identify.
  • an identification code is assigned to the group to which the drug belongs.
  • an identification code of "G000001” representing the group of "capsule drugs” is assigned to an image of a capsule drug, regardless of the drug type.
  • an identification code of "G000002” representing the "plain drug” group is assigned to images of plain drugs, regardless of the drug type.
  • an identification code of "G000003" representing the group of "half tablets” is assigned regardless of the drug type.
  • an identification code of "G000004” representing the group of "quarter tablets” is assigned regardless of the drug type.
  • the same identification code may be given to them.
  • separate identification codes may be assigned to each of the half tablet and quarter tablet, and the program may perform the same processing on the identification codes "G000003" and "G000004."
  • identification codes of subgroups that are finely classified into groups according to a hierarchical structure may be defined.
  • FIG. 9 is a diagram showing another example of an identification code given as training data for a capsule drug.
  • the inference accuracy of the drug identifier 120 will be improved by dividing capsule drugs into more finely divided groups based on capsule color or printed character color. Further, by performing such detailed grouping, usability may be improved as a search attribute during capsule search, and it may be utilized for discrimination processing.
  • classifications subgroups
  • groups of single-color capsules may be further classified according to the color of the capsules.
  • an identification code of "G000010” representing a group of monochromatic and white capsule drugs is assigned to an image of monochrome and white capsule drugs.
  • An identification code of "G000011” representing a group of monochrome blue capsule drugs is assigned to an image of monochrome blue capsule drugs.
  • individual identification codes representing each group may be similarly assigned to images of monochromatic capsule medicines of other colors.
  • the group of two-color capsules may be further classified based on the combination of capsule colors. For example, for an image of two-colored capsule medicines, red and white, an identification code of "G000100" representing a group of red and white two-color capsule medicines is assigned. An identification code of "G000101" representing a group of blue and white capsule medicines is assigned to an image of capsule medicines of two colors, blue and white. Although not shown in FIG. 9, individual identification codes representing each group may be similarly assigned to images of capsule medicines with other two-color combinations.
  • plain tablets may also be divided into groups according to color or shape and identification codes may be assigned.
  • FIG. 10 is a diagram showing another example of the identification code given as teacher data for plain drugs.
  • FIG. 10 shows an example in which the plain drugs are further divided into groups based on the combination of the shape and color of the plain drugs.
  • FIG. 10 shows examples in which the shape of the plain drug is circular and ellipsoidal.
  • an identification code of "G001001” representing a group of circular white medicines is given.
  • An identification code of "G001002" representing a group of circular yellow plain drugs is assigned to an image of a plain drug that is circular in shape and yellow in color.
  • individual identification codes representing the respective groups may be similarly assigned to images of plain drugs having circular shapes and other colors.
  • an identification code of "G002001” representing a group of ellipsoidal and orange plain drugs is assigned.
  • An identification code of "G002002” representing a group of ellipsoidal and transparent plain drugs is assigned to an image of a plain drug whose shape is an ellipsoid and whose color is transparent.
  • individual identification codes representing the respective groups may be similarly assigned to images of plain drugs of other colors in which the drugs are ellipsoidal in shape.
  • individual identification codes representing each group may be assigned to images of plain medicines in combinations of shapes and colors (not shown).
  • drug shape information can also be a robust information source that is not easily affected by the imaging environment.
  • An image of the external shape of a drug can be useful shape information.
  • information on the length and breadth of the drug's major axis and minor axis can also be a robust information source that is not easily affected by the imaging environment.
  • size information can also be an extremely important source of information for group identification for drugs that are difficult to identify, such as capsule drugs without printed identification symbols or plain tablets.
  • the input to the drug identifier 120 is the original image, which is a region image (drug image) cut out for each drug from the captured image, the stamp extraction image extracted from the original image, and the external shape. It is preferable to use a combination of one or more of the image and size information, preferably a plurality of them.
  • the term “mark extraction image” includes not only a stamp but also an image obtained by extracting a print attached to a tablet or a capsule.
  • the stamp extraction image may also be referred to as a character symbol extraction image.
  • imprint may be understood as a term including concepts such as “printing", “print symbol”, “identification symbol” or "letter symbol” on the tablet or capsule drug, depending on the context.
  • the configuration may be such that all of the information including the original image including color information, the stamp extraction image, the external shape image, and the size information is input into the drug identifier 120, or some of these information may be combined.
  • the configuration may be such that the information is input to the drug identifier 120.
  • FIG. 11 is a conceptual diagram showing an example of information input to the drug identifier 120.
  • the original image Org is a drug image for each drug, and corresponds to an individual drug image cut out for each drug from the photographed image.
  • the stamp extraction image Egm is an image in which a stamp is extracted from the original image Org.
  • the stamp extraction image Egm may be an image subjected to emphasis processing to increase the visibility of the extracted stamp.
  • the external shape image Otw is an image showing the external shape of the drug extracted from the original image Org. Note that the external shape image Otw is not limited to an image showing a strict outline of the medicine, but may be an image showing an approximate shape according to the outline.
  • the size information is, for example, numerical information obtained by measuring the major axis and minor axis of the drug based on the original image Org or the external image Otw.
  • the learning model applied to the drug identifier 120 is configured using, for example, a neural network.
  • a neural network For example, CNN can be used as a network model suitable for image recognition.
  • combining these multiple images in the channel direction and inputting them There may be a method in which the images are combined horizontally or vertically (within the plane of the image) and input as a composite image.
  • the input image size may be subject to a fixed value constraint, so the following two methods may be available as input image methods.
  • the first method is a method of enlarging or reducing the image according to the input image size accepted by the input layer of the neural network.
  • FIG. 12 shows an example of input information according to the first method.
  • each image is enlarged or reduced to the upper limit of the input image size accepted by the neural network and inputted.
  • Information on the image enlargement or reduction ratio used in this image enlargement or reduction processing (hereinafter referred to as "resizing processing") is stored in case it is needed in subsequent processing.
  • magnification information applied to the resizing process is stored, and one or more images of the original image Org1, the engraving extraction image Egm1, and the outer shape image Otw1, and size information are input to the neural network.
  • magnification information for resizing processing is used as necessary.
  • the original image Org1 shown here is obtained by resizing an image of each drug unit cut out from the standardized image of the captured image to match the input image size of the neural network. Furthermore, a stamp extraction image Egm1 is obtained by performing a process of extracting a stamp from the original image Org1. Outline image Otw1 is obtained by performing processing to extract the outer shape of the medicine from original image Org1.
  • the input image size of the neural network can be designed to be smaller, and a reduction in execution time can be expected.
  • the input image size of the neural network can be designed to be an appropriate size for recognition performance without being constrained by the maximum size of drugs that exist in the world, thereby suppressing unnecessary data processing.
  • processing is somewhat complicated in that image resizing processing is performed during input/output of the neural network.
  • information on the enlargement/reduction ratio (magnification information) is stored in case it is needed in later processing (such as when presenting drug identification results to the user with an image proportional to the size of the tablet). It is necessary to keep it.
  • the second method is a method in which the image is pasted and input at the same image size (without enlarging/reducing processing) at the center position of the image of the input image size accepted by the input layer of the neural network.
  • the input image size to the neural network is determined in advance, and the same original image cut out from the standardized image of the photographed image is input to the input layer of the acceptable input image size.
  • the standardized original image is an image whose correspondence with the actual size of the drug is known.
  • FIG. 13 shows an example of input information according to the second method.
  • image resizing processing is not necessary. Therefore, in the case of the second method, there is no need to input magnification information indicating the enlargement/reduction ratio.
  • a combination of one or more of the original image Org2, the stamp extraction image Egm2, and the outline image Otw2 and size information can be used as input information to the neural network.
  • the outline image Otw2 itself extracted from the original image Org2 includes information that substantially indicates the size of the drug, when the outline image Otw2 is used for input, the numerical values of the major axis and the minor axis are The advantage is that information is not always necessary.
  • the input image size that the neural network accepts is determined by the largest drug size that exists in the world, so extra space is created around the tablet, especially for small tablets. , there may be waste in processing. Furthermore, since the input image size accepted by the neural network is larger than that of the first method, the execution time may be longer than that of the first method. Furthermore, in the case of the second method, small tablets and tablets with finely engraved characters are processed as they are, so the identification accuracy of these tablets may be lower than that of the first method.
  • the first method is a more preferable method for identifying drug types using the smartphone 10.
  • FIGS. 14 to 16 show examples of input information regarding drugs whose drug type is difficult to identify.
  • an example will be shown in which information about a drug whose drug type is difficult to identify is input to the neural network using the first method.
  • FIG. 14 is an example of input information in the case of a capsule drug (with identification symbol) in which an identification symbol is printed on the capsule.
  • a combination of one or more of the original image Org3, the stamp extraction image Egm3, and the external shape image Otw3 is input to the neural network as in FIG. 12. .
  • numerical information on the size (longer axis and shorter axis) of the capsule medicine measured from the original image Org3 can be input.
  • magnification information for resizing processing may be input.
  • the stamp extraction image Egm3 is an image of the identification symbol extracted from the original image Org3.
  • FIG. 15 is an example of input information for a capsule drug without an identification symbol.
  • a capsule drug without an identification symbol that does not have an identification symbol in the original image Org4 is a capsule drug that does not originally have an identification symbol printed on the capsule, or even if there is an identification symbol on the capsule, the printing was not done at the time of photographing. There may be cases where the identification symbol is not captured in the original image Org4 because it was photographed in a hidden state.
  • the stamp extraction image Egm4 is an image that does not include any information about the identification mark.
  • the external shape image Otw4 is an image obtained by extracting the shape of the capsule medicine shown in the original image Org4.
  • numerical information on the size (longer axis and shorter axis) of the capsule medicine measured from the original image Org4 can be input.
  • magnification information for resizing processing may be input.
  • FIG. 16 is an example of input information for half tablets.
  • a combination of one or more of the original image Org5, the stamp extraction image Egm5 extracted from the original image Org5, and the external shape image Otw5 is input.
  • a combination of numerical information on the size of the half tablet (longer axis and shorter axis) measured from the original image Org5 and magnification information for resizing processing can be input.
  • FIG. 17 is a block diagram showing the functional configuration of the machine learning system 150. Here, an example will be shown in which the combination of input information described in FIG. 12 is input to the learning model 151.
  • the machine learning system 150 is a device that generates a second trained model TM2 applied to the drug identifier 120, and is realized using a computer system including one or more computers.
  • Machine learning system 150 includes a learning model 151, a loss calculation unit 152, and an optimizer 154.
  • the learning model 151 uses a neural network such as CNN.
  • the learning model 151 receives, as input information, a drug image IMj that is a region image of the drug DRj, a stamp extraction image IM1j, an outline image IM2j, and size information SZj that is numerical information indicating the size of the drug. It accepts the input of information combined with the magnification information MGj of the resizing process, and outputs the inference result PRj of the type of drug DRj or the group to which the drug DRj belongs.
  • the subscript j represents the index number of the training data.
  • the machine learning system 150 shown in FIG. 17 includes a stamp extraction section 140, an external shape extraction section 142, and a size measurement section 144 before the learning model 151.
  • the stamp extracting unit 140 extracts a stamp or printed character symbol from the drug image IMj, and generates a stamp extraction image IM1j that is an image of the extracted character symbol.
  • the stamp extraction unit 140 processes the drug region of the input image, eliminates external edge information of the drug DRj, and extracts character symbols.
  • the stamp extraction image IM1j is an image in which the character symbol is emphasized by expressing the luminance of the stamped portion or the printed portion relatively higher than the luminance of the portion other than the stamped portion or the printed portion.
  • the outer shape extraction unit 142 extracts the outer shape of the drug DRj from the drug image IMj, and generates an outer shape image IM2j that is an image showing the outer shape of the drug DRj.
  • the size measuring unit 144 measures the size of the drug DRj from the drug image IMj and/or the external shape image IM2j, and generates size information SZj indicating the respective dimensions of the major axis and the minor axis.
  • the machine learning system 150 adopts a configuration in which this information is generated from the drug image IMj and input into the learning model 151.
  • the engraving extraction image IM1j, the external shape image IM2j, and the size Part or all of the information SZj may be created in advance and included in the training data dataset. In that case, part or all of the stamp extraction section 140, the external shape extraction section 142, and the size measurement section 144 are unnecessary in the machine learning system 150.
  • the loss calculation unit 152 calculates a loss value (loss) between the inference result output from the learning model 151 and the correct data (teacher data) GTj associated with the input information.
  • the optimizer 154 adjusts the learning model 151 based on the calculation result of the loss value indicating the error between the output of the learning model 151 and the correct teacher signal so that the inference result PRj output by the learning model 151 approaches the correct answer data GTj.
  • the update amount of the parameters is determined, and the parameters of the learning model 151 are updated.
  • the optimizer 154 updates parameters based on an algorithm such as gradient descent.
  • the parameters of the learning model 151 include filter coefficients (weights of connections between nodes) of filters used for processing each layer of the neural network, node biases, and the like.
  • the machine learning system 150 may acquire training data and update parameters in units of mini-batches that are a collection of a plurality of training data.
  • the parameters of the learning model 151 are optimized, and a learning model 151 having the desired inference performance is generated.
  • the learned (trained) learning model 151 for which acceptable inference accuracy has been confirmed is used as the second trained model TM2 of the drug discriminator 120.
  • the drug type identification device 100 may, for example, insert a link between the drug region cutting unit 118 and the drug identifier 120 described in FIG.
  • the configuration includes a processing section similar to the stamp extraction section 140, the external shape extraction section 142, and the size measurement section 144.
  • the drug type identification device 100 is an example of an “object identification device” in the present disclosure.
  • FIG. 18 is a flowchart showing the operation of the drug type identification device 100 according to this embodiment.
  • the medicine type identification device 100 As an example of how the medicine type identification device 100 is used, a case will be described in which medicines brought by a certain patient are identified.
  • step S11 the user simultaneously photographs multiple drugs to be identified.
  • the user can take pictures of a plurality of drugs in pharmaceutically meaningful units, such as when the drug is taken at the same time.
  • the user takes out a package of medicines included in the patient's medicines from a bag, and uses the camera function of the smartphone 10 to simultaneously (collectively) photograph the plurality of medicines.
  • the processor 102 acquires a photographed image obtained by photographing.
  • the plurality of drugs photographed at this time include drugs whose drug types can be identified and drugs whose drug types are difficult to identify.
  • a drug whose drug type can be specified is an example of a "type-identifiable object" in the present disclosure
  • a drug whose drug type is difficult to specify is an example of an "object whose type is difficult to specify” in the present disclosure.
  • the processor 102 uses the drug detector 114 to detect individual drugs from the captured image.
  • the drug detector 114 detects drugs whose drug type can be identified and drugs whose drug type is difficult to identify on an individual drug basis from the captured image.
  • the drug detector 114 estimates, for example, "the center coordinates, height, width, and rotation angle of a bounding box with rotation surrounding the drug” or "a segmentation mask that fills the drug area with the shape of the drug itself", Output the estimation results.
  • the estimation (detection) result by the drug detector 114 is displayed on the touch panel display 14 for confirmation by the user.
  • the processor 102 receives an input from the input unit 14B of the touch panel display 14 or the like for an instruction to modify the detection result or an instruction to approve (confirm) the detection result. If the detection results of the drug detector 114 include over-detection or detection failure (missing detection), the user inputs an instruction to correct the detection results from the input section 14B of the touch panel display 14, etc., and selects the correct area for each drug. Can be specified. Note that the detection results can be corrected for each detected area or for each drug.
  • a drug unit is an example of an "object unit" in the present disclosure.
  • step S13 the processor 102 determines whether the detection results by the drug detector 114 include over-detection or detection failure. If there is overdetection or detection failure in the detection result by the drug detector 114 and the determination result in step S13 is Yes, the processor 102 proceeds to step S14 and corrects the drug area according to the instruction received from the user. I do. For example, if an overdetected area is included, processing is performed to delete that area. Furthermore, if there is a detection failure in which a region is not detected even though there is a drug, a process such as adding a new region for the drug is performed. After step S14, the processor 102 proceeds to step S15.
  • step S13 determines whether the determination result in step S13 is No, that is, if there is no overdetection or detection failure in the detection result by the drug detector 114.
  • the processor 102 proceeds to step S15.
  • step S15 the processor 102 uses the drug identifier 120 to identify each drug in the image.
  • the processor 102 cuts out drug images for each detected drug, inputs each drug image into a drug identifier 120, and identifies the drug.
  • step S15 The processing content of step S15 will be described later using FIG. 19, but the outline is as follows. That is, for drugs whose drug type can be specified, it is expected that the drug identifier 120 will make inferences on a drug type (drug type) basis. If it is confirmed visually that the drug is correct based on the drug type identification result obtained by the drug identifier 120, the inferred result is confirmed. On the other hand, if the drug identifier 120 mistakenly infers a group of drugs whose drug type is difficult to identify, the drug type can be selected from among the drugs presented as other high-rank inference candidates, or the drug type can be selected by voice search, text search, etc. Identify.
  • the drug identifier 120 will make inferences in units of groups to which the drug belongs. If it is inferred for each group as a drug that is difficult to identify, and if the inference is confirmed to be correct by visual inspection of the photographed image of the drug, the process proceeds to the drug type identification flow defined for that group. For example, if it is a group of "capsule medicines", you can visually check the character symbols attached to the capsules on the photographed image, input the text of the characters and/or symbols by text or voice, and search the engraving text master database. Then, by comparing the drug to be identified with the master data, the process moves to a drug type identification flow in which the drug type is specified.
  • the user appropriately corrects the inference result and proceeds to the appropriate drug type identification flow (see FIG. 19).
  • step S16 the processor 102 determines whether the drug types for all drugs in the image have been determined. If the determination result in step S16 is No, the processor 102 returns to step S15, changes the drug to be identified, and continues the process. If the determination result in step S16 is Yes, the processor 102 ends the flowchart of FIG.
  • FIG. 19 is a flowchart illustrating an example of loop processing applied to steps S15 and S16 in FIG. 18.
  • step S21 the processor 102 uses the drug identifier 120 to identify the drug, and determines whether the identification result is a drug belonging to a drug whose drug type can be specified. .
  • the identification result by the drug identifier 120 is provided to the user through the touch panel display 14.
  • the processor 102 receives input of various instructions from the input unit 14B of the touch panel display 14, such as an instruction to confirm the drug type, an instruction to correct the identification result, or an instruction to proceed to other processing such as text search.
  • the user confirms the presented identification results and inputs an instruction to confirm the drug type from the input section of the touch panel display 14, or inputs an instruction to modify the identification results or move to an engraved text search. I can do it.
  • step S21 the processor 102 determines whether the determination result in step S21 is Yes. If the determination result in step S21 is Yes, the processor 102 proceeds to step S22. In step S22, the processor 102 determines whether the result of the medicine identifier 120 that the medicine can be identified is correct. If the determination result in step S22 is Yes, the processor 102 proceeds to step S23 and determines whether the drug type specified (inferred) by the drug identifier 120 is correct. If the user can visually confirm that the drug type is correct, the user can input an instruction to confirm the drug type.
  • step S23 determines the drug type.
  • step S23 the processor 102 proceeds to step S28.
  • step S28 the processor 102 executes a non-machine learning-based drug type identification flow using stamped text or the like. After step S28, the processor 102 proceeds to step S29.
  • step S21 determines whether or not the result of the drug being difficult to identify by drug type identified by the drug identifier 120 is correct. If the determination result in step S24 is No, the processor 102 proceeds to step S28.
  • step S24 determines whether the type of group to which the difficult-to-identify drug belongs, which is the identification result identified (inferred) by the drug identifier 120, is correct. do. If the determination result in step S25 is No, or if the determination result in step S22 is No, the processor 102 proceeds to step S26. In step S26, the processor 102 identifies the group of difficult-to-identify drugs to which the drug belongs. In step S26, the processor 102 receives an input from the input unit 14B of the touch panel display 14 or the like to specify the type of group to which the drug belongs, and specifies the group according to the received instruction.
  • step S26 the processor 102 proceeds to step S27. Further, if the determination result in step S25 is Yes, the processor 102 proceeds to step S27. In step S27, the processor 102 executes the drug type identification flow defined for the group of drugs that are difficult to identify. After step S27, the processor 102 proceeds to step S29 and determines the drug type.
  • FIG. 20 is a diagram showing an example of a screen displayed on the touch panel display 14.
  • FIG. 20 shows an example of a detection result display GUI that displays the detection results of the drug area detected by the drug detector 114.
  • the screen SC1 provided by the drug type identification device 100 is roughly divided into three areas: an entire image display area EDA, a candidate display area CDA, and a button display area BDA.
  • a standardized image generated from the acquired captured image is displayed on the entire image display section EDA. Note that the entire captured image including the marker may be displayed on the entire image display section EDA.
  • the entire image display section EDA is an example of a "photographed image display section" in the present disclosure.
  • the entire image display section EDA can enlarge or reduce a portion of the image by pinching out or pinching in. Therefore, if the characters and symbols attached to drugs are too small to be seen, each drug can be enlarged and displayed.
  • the detection result by the drug detector 114 is displayed on the entire image display section EDA. After photographing, the area of each drug detected by the drug detector 114 is displayed in a rectangular frame (bounding box).
  • FIG. 20 an example of a captured image including three drugs DR1, DR2, and DR3 is shown. Frames BX1 and BX2 are displayed for drugs DR1 and DR2 detected by drug detector 114, respectively.
  • detection has failed for drug DR3, and the frame for drug DR3 is not displayed.
  • Each area surrounded by frames BX1, BX2, and BX3 can be selected by the user, and for example, the selected area is displayed with a red frame, and the unselected area is displayed with a blue frame, changing the color of the frame line. Of course, another color may be used. It is preferable that the frames BX1, BX2, and BX3 indicating the regions are displayed with different border colors depending on the selected/unselected state of the region.
  • a check box CB is attached to each frame BX1, BX2, and BX3.
  • the check box CB may be marked or left blank depending on the status, such as "drug type confirmed” or "undetermined state.”
  • the region editing switch SW1 is a switch operated when it is desired to modify the detection result of the drug region.
  • the area editing switch SW1 is slid to the right of the screen, the drug area can be edited on the screen of the entire image display section EDA.
  • the area editing switch SW1 is turned on, the area addition button BT2 and the area deletion button BT3 become pressable, and the screen shifts to the area correction GUI.
  • the area editing switch SW1 is slid to the left of the screen, the area becomes unable to be edited. If editing is not possible, the area addition button BT2 and area deletion button BT3 are grayed out.
  • turning on/off the editability of a region is not limited to the region editing switch SW1 illustrated in FIG. 20, and may be implemented by, for example, a long press or a double tap on the entire image display section EDA.
  • the region addition button BT2 is pressed, a state is created in which a region can be specified on the entire image display section EDA and a drug region can be added.
  • the area deletion button BT3 is used when deleting an over-detected area.
  • the drug image cut out in that area is subjected to identification processing using the drug discriminator 120, and the candidate drug is displayed in the candidate display area CDA below. Display information. Additionally, the dimensions of the major axis and minor axis are displayed for each area. The dimension display may be turned on/off using a separate switch or the like.
  • a candidate drug is an example of a "candidate object" in this disclosure.
  • the candidate display section CDA is an area that mainly displays drug information of candidate drugs.
  • the candidate display section CDA displays drug information of candidate drugs based on the identification results estimated by the drug identifier 120.
  • the drug information of the candidate drug includes, for example, a master image of the drug, an identification code of the drug, a drug surface, a drug efficacy classification, and information on a group to which the drug belongs.
  • FIG. 20 an example of drug information of a candidate drug for drug DR1 is shown. Note that it is also possible to enlarge/reduce the image in the candidate display section CDA by pinching out or pinching in.
  • the display field that displays group information is configured as a selection box SLB1. Further, an engraved text search button BT4 is displayed in the candidate display area CDA.
  • buttons are arranged in the button display area BDA, including, for example, a drug type confirmation button BT5, a drug type confirmation hold button BT6, a reshoot button BT7, and a completion button BT8. These buttons can change to a pressable state or a non-pressable state depending on the situation.
  • the re-photographing button BT7 is used to perform re-photographing by pressing the button when there is a problem with the photographed image, such as when the photographed image is blurred.
  • FIG. 21 is an example of a screen display when editing a drug area. As illustrated in FIG. 20, when overdetection and/or detection failure is confirmed in the detection results of the drug detector 114, the user slides the area editing switch SW1 to the right of the screen to enable area editing. do.
  • the position, shape, rotation angle, etc. of the selected area can be adjusted by dragging, tapping, etc.
  • the corner portion of the frame BX the area can be expanded or contracted while keeping the aspect ratio constant.
  • the user selects the area Abs indicated by the frame BX3 and clicks the area delete button. By pressing BT3, the area Abs can be deleted.
  • the "area deletion" function is not limited to the area deletion button BT3; deletion can also be performed by long-pressing the relevant area to display a pull-down menu (not shown), and selecting "area deletion" from the pull-down menu.
  • a GUI may be implemented so that the
  • the region addition button BT2 selects the region, and adds the region. can.
  • To add an area for example, tap any point, drag it to the bottom right to create an additional rectangular area, and use the method explained in Figure 22 to change the rectangle's width, height, rotation angle, etc. Adjust.
  • press and hold a point on the screen of the entire image display section EDA to display the default rectangle with an undefined area add an area, move this rectangle in parallel to an appropriate position, change the width and height of the rectangle, and rotate it. It may be implemented to correct by adjusting the angle.
  • FIG. 23 is an example of a screen display in a state where the identification of the drug has been determined.
  • a check mark indicating the status of "drug type confirmed” is entered in the check box CB for each of the frames BX1 and BX4 for drugs DR1 and DR3 whose drug type has been confirmed.
  • a pull-down menu is displayed, and the status can be changed from the pull-down menu. For example, the status can be changed from "drug type confirmed" to "undetermined state.”
  • the drug type may not necessarily be identified, so the status may be "drug type determination pending."
  • the status may be "drug type determination pending."
  • an "x” mark indicating the status of "drug type determination pending” may be displayed in the check box CB of the drug DR2 for which determination of the drug type is pending. Note that in the case of an "unconfirmed state" in which neither the drug type has been determined nor the drug type determination pending, nothing is displayed in the check box CB (see FIG. 22).
  • the default of check box CB is blank indicating "undefined state".
  • the user presses the completion button BT8 to complete the identification work for the main photographed image.
  • FIG. 24 is an example of a screen display of the identification result confirmation GUI.
  • FIG. 24 shows an example of a GUI that displays drug information about drugs belonging to the group ⁇ Drugs that can be identified by drug type.'' Although the illustration of the entire image display section EDA is omitted in FIG. 24, the entire image display section EDA exists above the candidate display section CDA of the screen SC4 shown in FIG. 24 (see FIG. 23).
  • the candidate display section CDA displays the front and back sides of the master image of the drug, the drug code, the drug name, and the size ( Drug information such as major axis and minor axis dimensions is displayed. Furthermore, the type of group to which the selected drug belongs is displayed at the bottom of the drug information display section where the drug information is displayed. The type of group is displayed in the selection box SLB1.
  • candidate drugs with lower scores are displayed in order on the drug information display section of the candidate display section CDA.
  • candidate drugs with higher scores are displayed in order on the drug information display section of the candidate display section CDA.
  • the pull-down menu PDM can be displayed by pressing the pull-down button of the selection box SLB1, the correct group can be selected from the pull-down menu PDM, and the transition can be made to a GUI specific to each group. can.
  • the stamped text search button BT4 is pressed. By doing so, the screen transitions to the engraved text search GUI.
  • the drug type confirmation button BT5 is pressed to confirm the drug type with the drug displayed or selected in the candidate display area CDA.
  • the drug type confirmation button BT5 is pressed, the drug type is confirmed and a check mark is displayed in the check box CB of the corresponding drug on the entire image display section EDA.
  • the drug type confirmation hold button BT6 is pressed when the discrimination of the selected drug is completed without determining the drug type.
  • an "x" mark is displayed in the check box CB of the corresponding drug on the entire image display section EDA.
  • FIG. 25 is an example of a screen display of the candidate list display GUI.
  • the candidate list display GUI is a GUI that displays a list of drugs with high scores based on inference by the drug identifier 120 when the selected drug belongs to the group of "drugs that can be identified by drug type.” As shown in FIG. 25, since a plurality of candidate drugs are displayed in a list, comparative study becomes possible. Although the illustration of the entire image display section EDA and the button display section BDA is omitted in FIG. 25, the entire image display section EDA is present on the screen SC5 of the candidate display section CDA shown in FIG. A button display section BDA exists below the screen of the candidate display section CDA (see FIG. 23). The same applies to each of the figures in FIGS. 26 to 29.
  • FIG. 25 shows an example in which drug information about the four drugs with the highest scores is displayed in a list.
  • the knob of the scroll bar SRB at the right end of the screen SC5 downward or by swiping the screen lower-level candidates can also be displayed.
  • the drug type can be confirmed by selecting any drug on the candidate image list screen SC5 and pressing the "drug type confirmation button BT5" on the button display section BDA.
  • the display order in the list display may be determined by the score of the inference by the drug discriminator 120, or by, for example, searching the stamp text database for drugs that are similar to the stamp text of the drug with the highest score by the drug discriminator 120. They may be displayed in order of similarity score.
  • the display format of the list display is not limited to the display format in which the items are arranged vertically in a single column as shown in FIG. 25, but may be displayed in multiple rows and multiple columns by using a wider screen.
  • the drug information for each drug includes the master image (front and back), text information indicating the drug name, and numerical size information, as well as stamp text information registered in the stamp text database ( It is preferable to display master character information).
  • master text information is used for convenience of illustration, but in actual screen display, stamp text information registered for each drug will be displayed.
  • FIG. 26 is an example of a screen display of the engraved text GUI.
  • the stamped text GUI is a GUI that displays a list of drugs with text similar to the text input in the search box SBX1 when the selected drug belongs to the group of "drugs that can be identified by drug type.”
  • a engraved text GUI screen SC6 including a search box SBX1 is displayed as shown in FIG.
  • the user can search by engraved characters by inputting text into the search box SBX1 using a keyboard or voice input and pressing the search button SBT1.
  • the search results are displayed in a list as in FIG. 25.
  • the display format for displaying a list of candidate drugs is also the same as that in FIG. 25.
  • the similarity score may be determined every time a character is input into the search box SBX1, and the candidate list display may be updated immediately.
  • FIG. 27 is an example of a screen display of the capsule search GUI.
  • the capsule search GUI is a GUI displayed on the candidate display section CDA when the medicine identifier 120 identifies "capsule medicine” or when "capsule” is selected from the pull-down menu PDM of the group selection box SLB1. It is.
  • the capsule search screen SC7 includes a text search box SBX2, a size search box SZB, capsule color selection boxes SLB2 and SLB3, a font color selection box SLB4, a capsule image display area SRD, and a group selection box SLB1. , capsule list button BT13.
  • the size search box SZB includes an input box IB1 for inputting a numerical value of the major axis, an input box IB2 for inputting a numerical value for the minor axis, and a search button BT12.
  • an input box IB1 for inputting a numerical value of the major axis an input box IB2 for inputting a numerical value for the minor axis
  • a search button BT12 By inputting numerical values into the input boxes IB1 and IB2 by keyboard or voice input and pressing the search button BT12, it is possible to search by the size of the capsule drug.
  • the search results are displayed on the capsule image display section SRD.
  • the front and back sides of the master image are displayed from the top in descending order of text similarity score.
  • the similarity score may be determined every time a character is input into the text search box SBX2, and the candidate list display may be updated immediately.
  • capsule search text search is limited to capsules.
  • the front and back sides of the master image are displayed from the top in descending order of degree of matching with the input length and breadth values. In this case as well, the search range is limited to capsules.
  • past discrimination history data may be referred to, and capsules with a discrimination history may be displayed preferentially.
  • knob of the scroll bar SRB at the right end of the screen SC7 downward or by swiping the screen SC7 lower-level candidates can also be displayed.
  • the form of candidate display is not limited to the form in which candidates are displayed in a single column vertically as shown in FIG. 27, but may be displayed in multiple rows and in multiple columns.
  • the capsule list button BT13 at the bottom right of the screen SC7 When the capsule list button BT13 at the bottom right of the screen SC7 is pressed, the capsule image display section SRD expands to the right, and more capsule drug candidates are displayed as a list at once. In this case, the capsule list button BT13 is replaced with a "back button" (not shown), and when the back button is pressed, the screen returns to the original capsule candidate screen (FIG. 27).
  • the drug type can be determined by selecting one of the capsules from among the capsule images displayed on the capsule image display section SRD and pressing the "drug type confirmation button BT5" on the button display section BDA.
  • Capsule color selection boxes SLB2 and SLB3 and text color selection box SLB4 may be used to narrow down the candidates by specifying the capsule color and printed text color.
  • the capsule color may be automatically recognized from the photographed image, the candidates may be narrowed down in advance, and the selection boxes SLB2 and SLB3 may be displayed by default.
  • the drug information for each drug includes the master image (front and back), text information indicating the drug name, numerical information about the size, and the stamp text registered in the stamp text database. It is preferable to display information (master character information).
  • FIG. 28 is an example of a screen display of the plain drug search GUI.
  • the plain drug search GUI is displayed in the candidate display area CDA when the drug is identified as "plain drug” by the drug identifier 120 or when "plain drug” is selected in the pull-down menu PDM of the group selection box SLB1. This is a GUI.
  • the plain drug search screen SC8 includes a color selection box SLB5, a plain drug image display section SRD2, a group selection box SLB1, and a plain drug list button BT14.
  • the plain drug image display section SRD2 displays the front and back sides of the master image from top to bottom in order of degree of agreement with the values of the major axis and minor axis of the drug selected in the entire image display section EDA.
  • the search range is limited to plain tablets.
  • past discrimination history data may be referred to, and plain drugs with a discrimination history may be displayed preferentially.
  • the form of candidate display is not limited to the form in which candidates are displayed in a single column vertically as shown in FIG. 27, but may be displayed in multiple rows and in multiple columns.
  • the plain drug list button BT14 at the bottom right of the screen SC8 When the plain drug list button BT14 at the bottom right of the screen SC8 is pressed, the plain drug image display section SRD2 expands to the right, and more plain drug candidates are displayed as a list at once. In this case, the plain drug list button BT14 is replaced with a "back button" (not shown), and when the back button is pressed, the screen returns to the original plain drug candidate screen (FIG. 28).
  • a color selection box SLB5 may be used to specify the color of the plain drug to narrow down the candidates.
  • the color of the plain drug may be automatically recognized from the photographed image, the candidates narrowed down in advance, and the selection box SLB5 may be displayed by default.
  • the user can confirm the drug type by selecting any capsule from among the capsule images displayed on the capsule image display section SRD and pressing the drug type confirmation button BT5 on the button display section BDA.
  • FIG. 29 is an example of a screen display of the divided tablet search GUI.
  • the split tablet search GUI is displayed in the candidate display area CDA when the drug is identified as "split tablet” by the drug identifier 120, or when "split tablet” is selected from the pull-down menu of the group selection box SLB1. It is a GUI.
  • the divided tablet search screen SC9 includes a divided tablet image display section LS1, a divided tablet call button BT15, a search box SBX3, a candidate drug image display section LS2, and a group selection box SLB1.
  • the divided tablet image display section LS1 displays a list of the divided tablet images selected in the entire image display section EDA and the divided tablet images called up by pressing the divided tablet call button BT15. For example, the divided tablet image selected in the entire image display section EDA is displayed at the top of the list display in the divided tablet image display section LS1.
  • the divided tablet image display section LS1 clearly distinguishes between a display section that displays the divided tablet image called up by pressing the divided tablet call button BT15 and a display section that displays the divided tablet image selected in the entire image display section EDA. It may be configured to display the information.
  • one or more divided tablet images can be selected from the list of previously registered divided tablet photographed images and added to the list displayed in the divided tablet image display section LS1.
  • the following implementation may be considered, for example. That is, when the drug group selected on the entire image display section EDA is in the state of "divided tablets", if you press and hold the selected area on the entire image display section EDA, a pull-down menu will be displayed, and from this pull-down menu, you can select " ⁇ Divided tablet image registration'' item can be selected.
  • the shared unit is a part of the storage area of the storage device 104, and is a storage area in which data and the like that are shared in the processing in the drug type identification device 100 beyond the work unit of discrimination are stored.
  • the method for registering divided tablet images is not limited to this example, and other methods may be used.
  • the candidate drug image display section LS2 displays the front and back sides of the master image in descending order of text similarity score from top to bottom.
  • the similarity score may be determined every time one character is input into the search box SBX3, and the candidate list display may be updated immediately.
  • past discrimination history data may be referred to, and drugs corresponding to divided tablets with a discrimination history may be displayed preferentially.
  • the form of candidate display is not limited to the form in which candidates are displayed in a single column vertically as shown in FIG. 27, but may be displayed in multiple rows and in multiple columns.
  • the user can confirm the drug type by selecting any drug from among the drugs displayed on the candidate drug image display section LS2 and pressing the "drug type confirmation button BT5" on the button display section BDA.
  • drug information for each drug includes the master image (front and back), text information indicating the drug name, and numerical size information, which are registered in the stamp text database. It is preferable to display stamped text information (master character information).
  • a color selection box may be used to specify the color of the drug to narrow down the candidates.
  • the color of the divided tablet may be automatically recognized from the photographed image, the candidates narrowed down in advance, and the color selection box may be displayed by default.
  • FIG. 30 shows an example of an icon representing the shape of a typical drug.
  • Typical shapes for agents can be circular, oval, oval, pentagonal, and hexagonal.
  • graphic icons corresponding to each of these typical shapes and an "other" button may be arranged on the search screen, and the designation of the shape may be accepted by selecting the icon.
  • the configuration is not limited to selection from a pull-down menu, and color options may be provided using icons.
  • FIG. 31 shows an example of icons used for color selection.
  • FIG. 31 shows an example in which, from the left, icons of white, yellow, orange, brown, red, blue, green, and transparent colors and an "other" button are arranged.
  • icons white, yellow, orange, brown, red, blue, green, and transparent colors and an "other" button are arranged.
  • the arrangement order of colors, the types of colors displayed as icons, and the number of colors can be designed as appropriate.
  • a configuration may also be adopted in which icons corresponding to each color and an "other" button are arranged on the search screen, and the designation of the color is accepted by selecting the icon.
  • icons corresponding to each color and an "other" button are arranged on the search screen, and the designation of the color is accepted by selecting the icon.
  • FIG. 32 is a block diagram illustrating an example of a functional configuration for identifying the type of drug that is difficult to identify in the drug type identification device 100 according to the embodiment.
  • the drug type identification device 100 includes a drug type identification processing control section 160 that controls processing content based on information estimated by the drug identifier 120, a drug type estimation result presentation processing section 170, a capsule drug identification processing section 172, and a plain drug identification processing section 170. It includes a specific processing section 174 and a divided tablet specific processing section 176.
  • the drug identifier 120 outputs drug type estimation information in which the type of the drug is estimated when the drug to be identified is a drug whose drug type can be specified, and if the drug to be identified is a drug whose drug type is difficult to identify, it estimates the group to which the drug belongs. Output group estimation information.
  • the drug type identification processing control unit 160 acquires the estimated information output from the drug identifier 120, and distributes subsequent processing according to the estimated information.
  • the drug type estimation processing control unit 160 When the drug type identification processing control unit 160 acquires the drug type estimation information from the drug identifier 120, it causes the drug type estimation result presentation processing unit 170 to execute the process.
  • the drug type estimation result presentation processing section 170 performs a process of displaying drug information of a candidate drug on the candidate display section CDA based on the drug estimation information estimated by the drug discriminator 120. Through the processing of the drug type estimation result presentation processing unit 170, the screen display described with reference to FIGS. 24 and 25 is realized.
  • the drug type estimation result presentation processing section 170 cooperates with the text search section 122 and can transition to the process of searching for stamped text by pressing the stamped text search button BT4 (see FIG. 26).
  • the drug type identification processing control section 160 includes a group discrimination section 162.
  • the group determining unit 162 determines the label of the estimated group when the estimated information output from the drug discriminator 120 is group estimated information.
  • an example will be shown in which it is determined which group it belongs to among "capsule drugs,” “plain drugs,” and “divided tablets.”
  • the drug type identification processing control section 160 causes the capsule drug identification processing section 172 to execute the process.
  • the capsule drug identification processing unit 172 performs processing to provide a capsule search GUI (see FIG. 27) for supporting identification of the drug type of a capsule drug.
  • the capsule drug identification processing section 172 includes a capsule drug search section 173.
  • the capsule drug search unit 173 receives input of search conditions, executes a search process based on the received search conditions, and outputs search results.
  • the drug type identification processing control unit 160 causes the plain drug identification processing unit 174 to execute the process.
  • the plain drug identification processing unit 174 performs processing to provide a plain drug search GUI (see FIG. 28) for supporting identification of drug types for plain drugs.
  • the plain drug identification processing section 174 includes a plain drug search section 175.
  • the plain drug search unit 175 receives input of search conditions, executes a search process based on the received search conditions, and outputs search results.
  • the drug type identification processing control unit 160 causes the split tablet identification processing unit 176 to execute the processing.
  • the split tablet identification processing unit 176 performs processing to provide a split tablet search GUI (see FIG. 29) for supporting identification of drug types for split tablets.
  • the split tablet identification processing unit 176 includes a split tablet search unit 177 and a split tablet image registration unit 178.
  • Divided tablet search unit 177 receives input of search conditions, executes search processing based on the received search conditions, and outputs search results.
  • the divided tablet image registration unit 178 is a processing unit that performs the registration process and readout process of the divided tablet image described in FIG. 29.
  • each of the capsule drug search section 173, the plain drug search section 175, and the divided tablet search section 177 narrows down the search conditions based on the estimated group labels. be able to.
  • the process including the provision of a group-specific search GUI executed by each of the capsule medicine identification processing unit 172, the plain medicine identification processing unit 174, and the divided tablet identification processing unit 176 is a process that leads to identification of the type of medicine in each group. This is an example of (group-specific processing).
  • FIG. 33 is a top view of the photographing auxiliary device 70 for photographing a photographed image to be input to the drug type identification device 100. Further, FIG. 34 is a sectional view taken along line 34-34 in FIG. 33. FIG. 34 also shows the smartphone 10 that takes an image of the drug using the photographing auxiliary device 70.
  • the photographing auxiliary device 70 includes a housing 72, a medicine table 74, a main light source 75, and an auxiliary light source 78.
  • the shape is shown based on a square, but the housing 72, the medicine table 74, and the auxiliary light source 78 may have a rectangular shape.
  • the casing 72 includes a square bottom plate 72A supported horizontally, and four rectangular side plates 72B, 72C, 72D, and 72E vertically fixed to the ends of each side of the bottom plate 72A. configured.
  • the drug mounting table 74 is fixed to the upper surface of the bottom plate 72A of the housing 72.
  • the drug placement table 74 is a member having a surface on which a drug is placed, and here, it is a thin plate-like member made of plastic or paper that is square in top view, and the placement surface on which the drug to be identified is placed. It has a standard gray color.
  • the standard gray color is expressed by 256 gradation values from 0 (black) to 255 (white), for example, in the range of 130 to 220, and more preferably in the range of 150 to 190. It is a gradation value.
  • the colors may be washed out due to the automatic exposure adjustment function, and sufficient marking information may not be obtained.
  • the drug placement table 74 since the placement surface is gray in color, the details of the markings can be captured without color scattering. Further, by acquiring the gray pixel values appearing in the photographed image and correcting them to the true gray gradation values, it is possible to realize tone correction or exposure correction of the photographed image.
  • Reference markers 74A, 74B, 74C, and 74D made of black and white are placed at the four corners of the placement surface of the drug placement table 74 by pasting or printing. Although any reference markers 74A, 74B, 74C, and 74D may be used, simple circular markers are used here because they have high detection robustness.
  • the reference markers 74A, 74B, 74C, and 74D preferably have a size of 3 to 30 mm in the vertical and horizontal directions, and more preferably a size of 5 to 15 mm.
  • the distance between the reference marker 74A and the reference marker 74B and the distance between the reference marker 74A and the reference marker 74D are each preferably 20 to 100 mm, more preferably 20 to 60 mm.
  • the four reference markers 74A, 74B, 74C, and 74D may be connected with a straight line to clearly define a rectangular drug placement range.
  • FIG. 33 shows an example in which four reference markers 74A, 74B, 74C, and 74D are arranged at the vertices of a square
  • the arrangement form of the reference markers 74A, 74B, 74C, and 74D is not limited to the example in FIG. 33.
  • four fiducial markers 74A, 74B, 74C, and 74D may be placed at the vertices of a rectangle.
  • FIG. 32 shows an example in which five drugs T1, T2, T3, T4, and T5 are imaged.
  • bottom plate 72A of the casing 72 may also serve as the drug placement table 74.
  • the main light source 75 and the auxiliary light source 78 constitute an illumination device used to capture an image of the drug to be identified.
  • the main light source 75 is used to extract the stamp of the drug to be identified.
  • Auxiliary light source 78 is used to accurately bring out the color and shape of the drug to be identified.
  • the photographing auxiliary device 70 does not need to include the auxiliary light source 78.
  • FIG. 35 is a top view of the photographing auxiliary device 70 with the auxiliary light source 78 removed.
  • the main light source 75 is composed of a plurality of LEDs 76.
  • the LEDs 76 are white light sources each having a light emitting portion within 10 mm in diameter.
  • six LEDs 76 are arranged horizontally at a constant height on each of four rectangular side plates 72B, 72C, 72D, and 72E.
  • the main light source 75 irradiates the identification target drug with illumination light from at least four directions.
  • the main light source 75 only needs to be able to irradiate the identification target drug with illumination light from at least two directions.
  • the angle ⁇ formed by the irradiation light emitted by the LED 76 and the upper surface (horizontal surface) of the drug to be identified is preferably within the range of 10° to 20° in order to extract the stamp.
  • the main light source 75 may be composed of rod-shaped light sources each having a width of 10 mm or less and arranged horizontally on each of the four rectangular side plates 72B, 72C, 72D, and 72E.
  • the main light source 75 may be lit all the time. Thereby, the photographing auxiliary device 70 can irradiate the identification target drug with illumination light from all directions. An image taken with all the LEDs 76 turned on is called a fully illuminated image. According to the full illumination image, it becomes easy to extract the print of the identification target drug to which the print is added.
  • the LED 76 may be turned on and off depending on the timing, or the LED 76 may be turned on and off by a switch (not shown). Thereby, the photographic assisting device 70 can irradiate the identification target drug with illumination light from a plurality of different directions using the plurality of main light sources 75.
  • an image taken with only the six LEDs 76 provided on the side plate 72B lit is called a partially illuminated image.
  • a partial illumination image photographed with only the six LEDs 76 provided on the side plate 72C lit, and a portion photographed with only the six LEDs 76 provided on the side plate 72D lit is photographed.
  • four partial illumination images each illuminated with illumination light from different directions can be obtained.
  • the auxiliary light source 78 is a flat white light source with a square outer shape and a square opening in the center.
  • the auxiliary light source 78 may be an achromatic reflector that diffusely reflects the light emitted from the main light source 75.
  • the auxiliary light source 78 is arranged between the smartphone 10 and the medicine table 74 so that the identification target medicine is uniformly irradiated with light from the photographing direction (optical axis direction of the camera).
  • the illuminance of the irradiation light from the auxiliary light source 78 that irradiates the identification target drug is relatively lower than the illuminance of the irradiation light from the main light source 75 that irradiates the identification target drug.
  • FIG. 36 is a top view of a photographic assisting device 80 according to another embodiment.
  • FIG. 37 is a sectional view taken along line 37-37 in FIG. 36.
  • FIG. 37 also shows the smartphone 10 that takes an image of the drug using the photographing auxiliary device 80. Note that in FIGS. 36 and 37, parts common to those in FIGS. 33 and 34 are given the same reference numerals, and detailed explanation thereof will be omitted.
  • the photographic assisting device 80 includes a housing 82, a main light source 84, and an auxiliary light source 86.
  • the photographing auxiliary device 80 does not need to include the auxiliary light source 86.
  • the housing 82 has a cylindrical shape and is composed of a circular bottom plate 82A supported horizontally and a side plate 82B fixed perpendicularly to the bottom plate 82A.
  • a drug mounting table 74 is fixed to the upper surface of the bottom plate 82A.
  • FIG. 38 is a top view of the photographing auxiliary device 80 with the auxiliary light source 86 removed.
  • the main light source 84 is composed of 24 LEDs 85 arranged in a ring shape at constant intervals in the horizontal direction at a constant height on the side plate 82B.
  • the main light source 84 may be lit all the time, or the LED 85 may be switched on and off.
  • the auxiliary light source 86 is a flat white light source with a circular outer shape and a circular opening in the center.
  • the auxiliary light source 86 may be an achromatic reflector that diffusely reflects the light emitted from the main light source 84.
  • the illuminance of the irradiation light from the auxiliary light source 86 that irradiates the identification target drug is relatively lower than the illuminance of the irradiation light from the main light source 84 that irradiates the identification target drug.
  • the photographing auxiliary device 70 and the photographing auxiliary device 80 may include a fixing mechanism (not shown) that fixes the smartphone 10 that photographs the drug to be identified at a standard photographing distance and photographing viewpoint position.
  • the fixing mechanism may be configured to be able to change the distance between the identification target drug and the camera according to the focal length of the photographing lens 50 of the smartphone 10.
  • FIG. 39 is a cross-sectional view showing the configuration of an illumination device 81 as a photographic assistance device according to another embodiment.
  • the illumination device 81 shown in FIG. 39 has a configuration in which the bottom plate 82A and the drug mounting table 74 are removed from the configuration of the photographic assistance device 80 described in FIGS. 37 and 38.
  • the other configuration may be the same as the configuration of the photographic assisting device 80.
  • a diffuser cover (not shown) or the like may be arranged to cover the LED 85 on the side surface.
  • FIG. 40 is a top view of the medicine mounting table 74 using the circular marker MC1.
  • circular markers MC1 are arranged at the four corners of the medicine table 74 as reference markers 74A, 74B, 74C, and 74D.
  • the left diagram F40A in FIG. 40 shows an example in which the centers of the reference markers 74A, 74B, 74C, and 74D constitute four vertices of a square, and the right diagram F40B in FIG. , and 74D constitute four vertices of a rectangle.
  • the reason for arranging four reference markers is that the coordinates of four points are required to determine a perspective transformation matrix for standardization.
  • the four reference markers 74A, 74B, 74C, and 74D have the same size and the same color, but may have different sizes and colors. Note that when the sizes are different, it is preferable that the centers of the adjacent reference markers 74A, 74B, 74C, and 74D are arranged so as to constitute four vertices of a square or a rectangle. By making the reference markers different in size or color, it becomes easier to specify the shooting direction.
  • At least four circular markers MC1 may be arranged, and five or more circular markers MC1 may be arranged.
  • the centers of the four circular markers MC1 constitute four vertices of a square or rectangle, and the centers of the additional circular markers MC1 are arranged on the sides of the square or rectangle. It is preferable.
  • the photographing direction can be easily identified.
  • by arranging five or more reference markers even if detection of one of the reference markers fails, at least four points necessary to obtain the perspective transformation matrix for standardization can be detected simultaneously. This has the advantage of increasing the probability and reducing the time and effort required to re-photograph.
  • the circular marker MC1 includes an outer first perfect circle with a relatively large diameter and an inner second perfect circle that is arranged concentrically with the first perfect circle and has a relatively smaller diameter than the first perfect circle. Be prepared. That is, the first perfect circle and the second perfect circle are circles that are arranged at the same center but have different radii. Further, in the circular marker MC1, the inside of the second perfect circle is white, and the area inside the first perfect circle and outside the second perfect circle is filled in black.
  • the diameter of the first perfect circle is preferably 3 mm to 20 mm. Further, the diameter of the second perfect circle is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the diameters of the first perfect circle and the second perfect circle (diameter of the first perfect circle/diameter of the second perfect circle) is preferably 2 to 10.
  • FIG. 41 is a top view of a medicine placement table 74 using a circular marker according to a modification.
  • the left diagram F41A in FIG. 41 is a diagram showing an example in which the circular marker MC2 is used as the reference markers 74A, 74B, 74C, and 74D.
  • the circular marker MC2 has a cross-shaped figure made up of two white straight lines perpendicular to each other inside a black filled perfect circle so that the intersection of the two straight lines coincides with the center of the perfect circle.
  • the reference markers 74A, 74B, 74C, and 74D of the circular marker MC2 are arranged so that their respective centers constitute four vertices of a square, and the straight lines of the cross-shaped figure of the circular marker MC2 are connected to the sides of this square. arranged in parallel.
  • the reference markers 74A, 74B, 74C, and 74D of the circular marker MC2 may be arranged such that their centers constitute four vertices of a rectangle.
  • the thickness of the line of the cross-shaped figure of the circular marker MC2 can be determined as appropriate.
  • the right diagram F40B in FIG. 41 is a diagram showing an example in which the circular marker MC3 is used as the reference markers 74A, 74B, 74C, and 74D.
  • the circular marker MC3 has two perfect circles with different radii placed at the same center, the inside of the inner perfect circle is white, and the area inside the outer perfect circle and outside the inner perfect circle is white. It is painted black. Further, in the circular marker MC3, a cross-shaped figure consisting of two black straight lines orthogonal to each other is arranged inside the inner perfect circle so that the intersection of the two straight lines coincides with the center of the perfect circle. There is.
  • the reference markers 74A, 74B, 74C, and 74D of the circular marker MC3 are arranged so that their centers constitute four vertices of a square, and the straight lines of the cross-shaped figure of the circular marker MC3 are connected to the sides of this square. arranged in parallel.
  • the reference markers 74A, 74B, 74C, and 74D of the circular marker MC3 may be arranged such that their centers constitute four vertices of a rectangle.
  • the thickness of the line of the cross-shaped figure of the circular marker MC3 can be determined as appropriate.
  • the circular markers MC2 and MC3 it is possible to improve the estimation accuracy of the center point coordinates. Further, since the circular markers MC2 and MC3 have a different appearance from the medicine, the markers can be easily recognized.
  • FIG. 42 is a diagram showing a specific example of a reference marker having a rectangular outer shape.
  • the left diagram F42A in FIG. 41 shows the rectangular marker MS1.
  • the rectangular marker MS1 includes an outer square SQ1 with a relatively large side length and an inner square SQ2 that is arranged concentrically with the square SQ1 and has a relatively smaller side length than the square SQ1. That is, the squares SQ1 and SQ2 are quadrilaterals arranged at the same center (center of gravity) but having different lengths on one side.
  • the inside of the square SQ2 is white, and the area inside the square SQ1 and outside the square SQ2 is filled in black.
  • the length of one side of the square SQ1 is preferably 3 mm to 20 mm. Further, the length of one side of the square SQ2 is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the lengths of one side of square SQ1 and square SQ2 (length of one side of square SQ1/length of one side of square SQ2) is preferably from 2 to 10. In order to further improve the accuracy of estimating the center coordinates, a black rectangle (for example, a square), not shown, whose side length is relatively smaller than that of the square SQ2 may be concentrically arranged inside the square SQ2.
  • the right view F42B of FIG. 42 shows a top view of the medicine mounting table 74 using the rectangular square marker MS1.
  • rectangular markers MS1 are arranged at the four corners as reference markers 74A, 74B, 74C, and 74D.
  • reference markers 74A, 74B, 74C, and 74D are arranged at the four corners as reference markers 74A, 74B, 74C, and 74D.
  • a line connecting the centers of adjacent reference markers 74A, 74B, 74C, and 74D forms a square. It may also be rectangular.
  • FIG. 43 is a top view of a medicine placement table 74 using a circular marker according to another modification.
  • the left diagram F43A in FIG. 42 is a diagram showing an example in which circular marker MC4 is used as the reference markers 74A, 74B, 74C, and 74D.
  • the circular marker MC4 includes an outer first perfect circle with a relatively large diameter, an inner second perfect circle that is arranged concentrically with the first perfect circle and has a relatively smaller diameter than the first perfect circle, and A black circle (third perfect circle) that is arranged concentrically with the second perfect circle inside the second perfect circle and has a diameter that is relatively smaller than the second perfect circle.
  • the inside of the second perfect circle is white, and the area inside the first perfect circle and outside the second perfect circle is filled in black.
  • the diameter of the first perfect circle is preferably 3 mm to 20 mm. Further, the diameter of the second perfect circle is preferably 5 mm to 18 mm. The diameter of the third perfect circle is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the diameters of the first perfect circle and the second perfect circle (diameter of the first perfect circle/diameter of the second perfect circle) is preferably 1.1 to 3. Furthermore, the ratio of the diameters of the second perfect circle and the third perfect circle (diameter of the second perfect circle/diameter of the third perfect circle) is preferably 2 to 10.
  • the left diagram F43A in FIG. 43 shows an example in which the centers of the reference markers 74A, 74B, 74C, and 74D constitute four vertices of a square, and the right diagram F43B in FIG. , and 74D constitute four vertices of a rectangle.
  • a straight line connecting the four circular markers MC4 in the vertical and horizontal directions is displayed. According to the circular marker MC4, it is possible to improve the estimation accuracy of the center point coordinates.
  • the straight lines appearing in the captured image can be used to correct distortion of the captured image, specify the cropping range of the standardized image, etc. It is also possible to deal with Note that these straight lines may not be provided.
  • FIG. 44 is a diagram showing another specific example of a rectangular reference marker.
  • the left diagram F44A in FIG. 44 shows the rectangular marker MS2.
  • the quadrilateral marker MS2 includes an outer square SQ1 whose side length is relatively large, an inner square SQ2 which is arranged concentrically with the square SQ1 and whose side length is relatively smaller than the square SQ1, and a square SQ2.
  • the length of one side of the square SQ1 is preferably 3 mm to 20 mm. Further, the length of one side of the square SQ2 is preferably 5 mm to 18 mm.
  • the length of one side of the square SQ3 is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the lengths of one side of square SQ1 and square SQ2 (length of one side of square SQ1/length of one side of square SQ2) is preferably 1.1 to 3. The ratio of the lengths of one side of square SQ2 and square SQ3 (length of one side of square SQ2/length of one side of square SQ3) is preferably from 2 to 10.
  • the right diagram F44B in FIG. 44 shows a top view of the medicine mounting table 74 using the rectangular square marker MS2.
  • quadrangular markers MS2 are arranged at the four corners of the medicine table 74 as reference markers 74A, 74B, 74C, and 74D.
  • a line connecting the centers of adjacent reference markers 74A, 74B, 74C, and 74D forms a square. It may also be rectangular.
  • straight lines connecting the four rectangular markers MS2 in the vertical and horizontal directions are displayed.
  • the rectangular marker MS2 it is possible to improve the estimation accuracy of the center point coordinates. Furthermore, by connecting the rectangular markers MS2 with straight lines, it becomes easier to recognize the marker and the medicine placement range. Note that these straight lines may not be provided.
  • the medicine mounting table 74 may include a mixture of circular markers MC and square markers MS. By mixing circular markers MC and square markers MS, effects such as easier identification of the photographing direction can be expected.
  • a circular marker rather than a rectangular marker.
  • a mobile terminal device such as a smartphone
  • the following constraints (a) to (c) exist.
  • the circular markers it is possible to improve the accuracy of estimating the center coordinates of the markers.
  • a simple circular marker is distorted in shape and tends to cause errors in estimating the center coordinates, but since the inner circles of concentric circles have a narrower range, the trained model can easily estimate the center coordinates even in distorted pre-standardized images. Easy to identify.
  • the outer circles of concentric circles have the advantage of having a large structure, making it easier to find trained models, and being robust against noise and dirt. Note that the accuracy of estimating the center point coordinates of the rectangular markers can also be improved by making them concentric.
  • the placement surface of the drug placement table of the photographic assistance device may be provided with a recessed structure on which the drug is placed.
  • Indentation structures include depressions, grooves, depressions, and holes.
  • FIG. 45 is a diagram showing a drug mounting table 410 that is used in place of or in addition to the drug mounting table 74 (see FIG. 33) and is provided with a recessed structure. .
  • the drug mounting table 410 is made of paper, synthetic resin, fiber, rubber, or glass.
  • the left view F45A of FIG. 45 is a top view of the medicine mounting table 410. As shown in the left figure F45A, the placement surface of the drug placement table 410 has a gray color, and reference markers 74A, 74B, 74C, and 74D are arranged at the four corners.
  • the shape of the marker is shown using a circular marker MC1, but it is not limited to the circular marker MC1, and may be a circular marker MC2, MC3, MC4, a square marker MS1, or MS2.
  • a total of nine depressions 410A, 410B, 410C, 410D, 410E, 410F, 410G, 410H, and 410I are provided on the placement surface of the drug placement table 410 as a depression structure.
  • the depressions 410A to 410I are circular in shape and have the same size when viewed from above.
  • the right view F45B of FIG. 45 is a cross-sectional view of the drug mounting table 410 taken along the line 44-44.
  • the depressions 410A, 410B, and 410C have hemispherical bottom surfaces and each have the same depth. The same applies to the depressions 410D to 410I.
  • the bottom surface does not need to be perfectly hemispherical, and may be a concave curved surface with a constant radius of curvature or a concave curved surface with a gradually changing radius of curvature.
  • right diagram F45B shows tablets T51, T52, and T53 placed in depressions 410A, 410B, and 410C, respectively.
  • Tablets T51 and T52 are each medicines that are circular in top view and rectangular in side view.
  • the tablet T53 is a drug that is circular in top view and oval in side view.
  • tablet T51 and tablet T53 have the same size, and tablet T52 is relatively smaller than tablet T51 and tablet T53.
  • the tablets T51 to T53 are placed in the recesses 410A to 410C and left still.
  • the tablets T51 to T53 may have a circular shape when viewed from above, or may have a straight line on the left and right sides and an arc shape on the top and bottom when viewed from the side.
  • the circular drug can be prevented from moving when viewed from above and can be left stationary. Furthermore, since the position of the medicine at the time of photographing can be determined to be the position of the depression structure, it becomes easy to detect the medicine area.
  • the medicine table may have a recessed structure for rolling type medicines such as capsule medicines.
  • FIG. 46 is a diagram showing a drug mounting table 412 provided with a recessed structure for capsule drugs. Note that parts common to those in FIG. 45 are given the same reference numerals, and detailed explanation thereof will be omitted.
  • the left view F46A in FIG. 46 is a top view of the medicine mounting table 412. As shown in the left figure F46A, a total of six depressions 412A, 412B, 412C, 412D, 412E, and 412F are provided on the placement surface of the drug placement table 412 as a depression structure in 3 rows and 2 columns.
  • the depressions 412A to 412F are each rectangular in size when viewed from above.
  • the recess need not be perfectly hemispherical, but may be a concave curved surface with a constant radius of curvature or a concave curved surface with a gradually changing radius of curvature.
  • the right view F46B of FIG. 46 is a cross-sectional view of the drug mounting table 412 taken along the line 46-46.
  • depressions 412A, 412B, and 412C have semi-cylindrical bottoms and are each of the same depth. The same applies to the depressions 412D to 412F.
  • F63B shows capsule medicines CP1, CP2, and CP3 placed in recesses 412A, 412B, and 412C, respectively.
  • Capsule drugs CP1 to CP3 have a cylindrical shape with hemispherical ends (bottom surfaces), and have different diameters.
  • the capsule medicines CP1 to CP3 are placed in the recesses 412A to 412C and left still.
  • the cylindrical capsule drug can be prevented from moving or rolling, and can be left still. can. Furthermore, since the position of the medicine at the time of photographing can be determined to be the position of the depression structure, it becomes easy to detect the medicine area.
  • FIG. 47 is a diagram showing a medicine platform 414 provided with a concave structure for oval tablets. Note that parts common to those in FIG. 46 are denoted by the same reference numerals, and detailed explanation thereof will be omitted.
  • the left view F47A of FIG. 47 is a top view of the medicine mounting table 414. As shown in the left figure F47A, a total of six depressions 414A, 414B, 414C, 414D, 414E, and 414F are provided on the placement surface of the drug placement table 414 as a depression structure in 3 rows and 2 columns. Each of the recesses 414A to 414F is rectangular when viewed from above.
  • the recesses 414A and 414B have the same size.
  • Recesses 414C and 414D have the same size and are relatively smaller than recesses 414A and 414B.
  • Recesses 414E and 414F have the same size and are relatively smaller than recesses 414C and 414D.
  • the left diagram F47A shows tablets T61, T62, and T63 placed in the recesses 414B, 414D, and 414F, respectively.
  • the depressions 414B, 414D, and 414F have sizes corresponding to the tablets T61, T62, and T63, respectively.
  • the right view F47B in FIG. 47 is a cross-sectional view of the drug mounting table 414 taken along the line 47-47. As shown in the right figure F47B, the recesses 414A and 414B have flat bottom surfaces. As shown in the right figure F47B, the tablet T61 is placed in the depression 414B and left still. The same applies to tablets T62 and T63.
  • the drug placement table 414 by providing the placement surface with the rectangular parallelepiped-shaped recessed structure, it is possible to prevent the oval-shaped tablet from moving and to allow it to stand still. Furthermore, since the position of the medicine at the time of photographing can be determined to be the position of the depression structure, it becomes easy to detect the medicine area.
  • the shape, number, and arrangement of the recess structures are not limited to the embodiments shown in FIGS. 45 to 47, and may be appropriately combined, enlarged, or reduced.
  • the hardware structure of a processing unit that executes various processes such as 178 is the following various processors.
  • processors include the CPU (Central Processing Unit), which is a general-purpose processor that executes programs and functions as various processing units, the GPU (Graphics Processing Unit), which is a processor specialized in image processing, and the FPGA (Field Processing Unit).
  • Programmable Logic Devices PLDs
  • PLDs which are processors whose circuit configuration can be changed after manufacturing, such as Programmable Gate Arrays, and ASICs (Application Specific Integrated Circuits), which are specifically designed to perform specific processes. This includes a dedicated electric circuit that is a processor having a circuit configuration.
  • One processing unit may be composed of one of these various processors, or may be composed of two or more processors of the same type or different types.
  • one processing unit may be configured by a plurality of FPGAs, a combination of a CPU and an FPGA, a combination of a CPU and a GPU, or the like.
  • the plurality of processing units may be configured with one processor.
  • one processor is configured with a combination of one or more CPUs and software, as typified by computers such as clients and servers. There is a form in which a processor functions as multiple processing units.
  • processors that use a single IC (Integrated Circuit) chip, such as System On Chip (SoC), which implements the functions of an entire system including multiple processing units.
  • SoC System On Chip
  • various processing units are configured using one or more of the various processors described above as a hardware structure.
  • circuitry that is a combination of circuit elements such as semiconductor elements.
  • the processing functions of the drug type identification device 100 are not limited to the smartphone 10, and can be realized using various forms of information processing devices such as a tablet computer, a personal computer, or a workstation.
  • a computer-readable program that allows a computer to implement part or all of the processing functions of the drug type identification device 100 described in the above embodiments is a non-transitory information storage medium such as an optical disk, a magnetic disk, or a semiconductor memory or other tangible object. It is possible to record the program on a medium and provide the program through this information storage medium. Furthermore, instead of providing the program by storing it in a tangible, non-temporary information storage medium, it is also possible to provide the program signal as a download service using a telecommunications line such as the Internet.
  • ⁇ Effects of embodiment> According to the drug type identification device 100 according to the embodiment, even if an image is taken in which a drug whose drug type can be identified and a drug whose drug type is difficult to identify are mixed, it is possible to identify the type of each drug in the image or the group to which the drug belongs. It is possible to automatically identify the drug, shift to processing specific to each group for drugs whose drug type is difficult to identify, and provide a GUI that supports identification of the type. For this reason, it becomes possible to collectively image a plurality of drugs in meaningful units from a pharmaceutical standpoint and identify each drug.
  • the drug identifier 120 may include an image recognizer using a template matching technique.
  • an "object” refers to an object that can be classified according to a hierarchical structure.
  • the specific depth of the hierarchical structure of classification is called granularity, and an object belongs to one of the "types” at that granularity.
  • Identity refers to determining which type an object belongs to at a certain granularity.
  • the hierarchical structure may be defined depending on the purpose of identification.
  • a collection of objects with common characteristics is called a group.
  • Groups may or may not be related to types.
  • the group may refer to an upper layer of the type in the above hierarchical structure, or may be a newly defined set (unrelated to the above hierarchical structure) for convenience. Groups may be determined and defined depending on the purpose of identification.
  • Drugs are objects that can be classified in a hierarchical structure based on medicinal efficacy classification or hierarchical structure based on external characteristics.
  • Drug identification can be defined as the act of determining which YJ code the target drug has (this is an example of the definition of drug identification; for example, the identification code may be defined using a type other than the YJ code ).
  • Each group of "capsule drug” and "plain tablet” explained in the above embodiment is a set of types newly defined for convenience.
  • the "half-tablet" group is a group of drugs newly defined for convenience.
  • the YJ code is a set unrelated to the type, the purpose of drug identification is to specify the YJ code of half a tablet.
  • Smartphone 12 Housing 14 Touch panel display 14A Display section 14B Input section 16 Speaker 18 Microphone 20 In-camera 22 Out-camera 24 Light 26 Switch 28 CPU 30 Wireless communication section 32 Call section 34 Memory 36 Internal storage section 38 External storage section 40 External input/output section 42 GPS reception section 44 Power supply section 50 Photographic lens 50F Focus lens 50Z Zoom lens 54 Image sensor 58 A/D converter 60 Lens drive Part 70 Photography auxiliary device 72 Housing 72A Bottom plate 72B Side plate 72C Side plate 72D Side plate 72E Side plate 74 Drug placement tables 74A, 74B, 74C, 74D Reference marker 75 Main light source 78 Auxiliary light source 80 Photography auxiliary device 81 Illumination device 82 Housing 82A Bottom plate 82B Side plate 84 Main light source 86 Auxiliary light source 100 Drug type identification device 102 Processor 104 Storage device 112 Image acquisition unit 114 Drug detector 116 Area correction unit 118 Drug area extraction unit 120 Drug identifier 122 Text search unit 124 Display control unit 125 Magnification change unit 126 Input processing unit 130 Database

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Medicinal Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Chemical & Material Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Pharmacology & Pharmacy (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Image Analysis (AREA)

Abstract

Provided are an object identification device, an object identification method, and a program that allow for identification of the types of individual objects using an image containing a plurality of objects that can include both a type-identifiable object and a type-unidentifiable object. This object identification device comprises: a detector that detects objects from an image containing a plurality of objects on an object-by-object basis; an identifier that estimates, with respect to a type-identifiable object among the objects detected by the detector for which the type of object can be identified from the image, the type of the object from the image, and that estimates, with respect to a type-unidentifiable object for which identification of the type of object is difficult but that allows for identification of a group to which the object belongs, the group to which the object belongs from the image; and a processing unit that performs group-specific processing that leads to identification of the type with respect to the object that has been estimated as a group by the identifier.

Description

物体識別装置、物体識別方法及びプログラムObject identification device, object identification method and program
 本開示は、物体識別装置、物体識別方法及びプログラムに係り、特に画像から物体を識別する画像認識技術に関する。 The present disclosure relates to an object identification device, an object identification method, and a program, and particularly relates to an image recognition technique for identifying an object from an image.
 特許文献1には、鑑別を行いたい薬剤を薬剤撮影装置にセットして薬剤の撮影を行い、撮影された薬剤の画像のデータを基に、データベースを参照して薬剤の検索を行う薬剤鑑別ソフトウェアが記載されている。 Patent Document 1 discloses drug identification software that sets a drug to be differentiated in a drug imaging device, photographs the drug, and searches for the drug by referring to a database based on the data of the photographed drug image. is listed.
 特許文献2には、服用1回分の1以上の錠剤が分包された分包紙の反射光画像および透過光画像を撮像する撮像工程と、反射光画像および透過光画像に基づき、反射光画像中の錠剤に対応する領域である錠剤領域を切り出す切り出し工程と、切り出し工程によって切り出された錠剤領域それぞれの寸法および色を、錠剤の形状および色に関するモデル情報と照合することによって、錠剤それぞれの種別を識別する第1識別工程と、錠剤の画像を含んだ学習用データを用いた機械学習が実行されることで生成された学習モデルに基づいて少なくとも、種別は異なるが特徴量の類似する類似錠剤についての種別を識別する第2識別工程と、を含むことを特徴とする錠剤検知方法が記載されている。 Patent Document 2 describes an imaging step of capturing a reflected light image and a transmitted light image of a packaging paper in which one or more tablets for one dose are packaged, and a reflected light image based on the reflected light image and the transmitted light image. The type of each tablet is determined by a cutting process in which a tablet area corresponding to the tablet inside is cut out, and by comparing the dimensions and colors of each tablet area cut out by the cutting process with model information regarding the shape and color of the tablet. At least similar tablets of different types but with similar features based on a learning model generated by performing machine learning using learning data including images of tablets. A second identification step of identifying the type of the tablet is described.
特開2022-010060号公報Japanese Patent Application Publication No. 2022-010060 特開2018-027242号公報JP2018-027242A
 錠剤の薬種を識別する場合、錠剤に付されている刻印や印字の文字及び/又は記号の情報を手がかりに薬剤の種類(薬種)を特定できるケースが多い。その一方で、カプセル薬剤や半錠等の薬剤は、撮影画像に薬種を特定するための文字記号情報が一部しか写っていない、あるいは、カプセルのかみ合わせや錠剤の分割のパターンが無数にあるなどの理由により、撮影画像に対するマスタ画像とのテンプレートマッチングや機械学習ベースの方法によって薬種を特定することが困難あるいは不可能である。つまり、薬剤は、刻印や印字を有する錠剤など、撮影された画像から画像認識技術によって薬剤の種類まで特定が可能な薬剤と、カプセル薬剤や半錠剤等のように、撮影された画像から薬剤の種類までを特定することが困難な薬剤とがあり得る。本明細書では、前者を「薬種特定可能薬剤」と呼び、後者を「薬種特定困難薬剤」と呼ぶ。また、刻印や印字によって薬剤に付される文字及び/又は記号を「文字記号」と表記する。 When identifying the drug type of a tablet, in many cases, the type of drug (drug type) can be identified using information from stamps or printed characters and/or symbols attached to the tablet. On the other hand, for drugs such as capsule drugs and half-tablets, only part of the character and symbol information used to identify the drug type is captured in the photographed image, or there are countless patterns of capsule interlocking and tablet division. For these reasons, it is difficult or impossible to identify the drug type by template matching of a photographed image with a master image or by machine learning-based methods. In other words, there are two types of drugs, such as tablets with stamps or prints, whose type can be identified from the photographed image using image recognition technology, and those such as capsules and half-tablets, which can be identified from the photographed image. There may be drugs whose type is difficult to identify. In this specification, the former is referred to as a "drug whose drug type can be identified," and the latter is referred to as a "drug whose drug type is difficult to identify." Furthermore, characters and/or symbols attached to drugs by stamping or printing are referred to as "character symbols."
 薬種特定可能薬剤は、撮影画像に基づき画像認識によって薬種まで特定することが期待される。一方、薬種特定困難薬剤の薬種を特定するには、例えば、撮影画像を拡大して、薬剤に付されている文字記号の情報をユーザに提示し、ユーザが部分的に視認できている文字記号を目視してテキスト入力又は音声入力することにより、刻印テキストマスタなどのデータベースに対して検索を行うなどの手法により薬種を特定できる場合がある。このように、薬種特定困難薬剤に関しては、薬種の特定に役立つ情報をユーザに提示して薬種特定作業を支援する手法が実用上有効であると考えられる。 For drugs whose drug type can be identified, it is expected that the drug type can be identified through image recognition based on captured images. On the other hand, in order to identify the drug type of a drug that is difficult to identify, for example, the captured image is enlarged and information on the text symbols attached to the drug is presented to the user. In some cases, the drug type can be identified by visual inspection and text or voice input, and by searching a database such as a stamped text master. As described above, for drugs whose drug type is difficult to identify, a method of presenting information useful for drug type identification to the user to support the drug type identification work is considered to be practically effective.
 識別対象の薬剤を撮影する段階で薬種特定可能薬剤と、薬種特定困難薬剤とを分別して、薬種特定可能薬剤に限って撮影を行い、薬種特定可能薬剤の種類を識別するようにシステムを構築することも考えられる。 At the stage of photographing the drug to be identified, a system is constructed that separates drugs whose drug type can be identified and drugs whose drug type is difficult to identify, photographs only drugs whose drug type can be identified, and identifies the type of drugs whose drug type can be identified. It is also possible.
 しかしながら、薬学的観点、及びユーザビリティ観点からは、同一服用時点、同一調剤などの単位で複数の薬剤を一度に撮影し、まとめて薬種特定作業ができることが好ましい。 However, from a pharmaceutical standpoint and a usability standpoint, it is preferable to photograph multiple medications at the same time, at the same time of administration, at the same dispensing, etc., and to collectively identify the drug type.
 ところがそのように同一服用時点などの単位で撮影を行うと、必然的に1つの撮影画像には薬種特定困難薬剤と薬種特定可能薬剤とが混在することになり、個々の薬剤に対して薬種特定困難薬剤か薬種特定可能薬剤であるかを選択する必要がある。ユーザビリティの観点からは、可能な限りこの選択は薬種識別装置上で自動的に実行されるのが好ましい。また、この選択は、薬種識別装置上での一連の薬種特定作業フローの中で行われるのが好ましい。 However, if images are taken at the same time of administration, etc., a single image will inevitably contain a mixture of drugs whose drug type is difficult to identify and drugs whose drug type can be identified. It is necessary to choose between a difficult drug and a drug whose type can be identified. From a usability standpoint, it is preferable that this selection be performed automatically on the drug type identification device whenever possible. Further, it is preferable that this selection is performed in a series of drug type identification work flows on the drug type identification device.
 このような技術課題は、薬剤を識別する用途に限らず、様々な物体について画像から物体の種類を特定する場合に共通する課題として把握される。本明細書では、画像から物体の種類まで特定できる物体を「種類特定可能物体」といい、画像から物体の種類までは特定困難であるが物体が属するグループを特定できる物体を「種類特定困難物体」という。 Such technical issues are not limited to applications for identifying drugs, but can be understood as common issues when identifying the type of object from an image of various objects. In this specification, an object whose type can be identified from an image is referred to as an "object whose type can be identified", and an object whose type is difficult to identify from an image but whose group it belongs to can be identified as a "difficult to identify object". ”.
 本開示はこのような事情に鑑みてなされたもので、種類特定可能物体と種類特定困難物体とが混在し得る複数の物体が撮影された画像を用いて個々の物体の種類を特定することを可能にする物体識別装置、物体識別方法及びプログラムを提供することを目的とする。 The present disclosure has been made in view of the above circumstances, and describes the method of identifying the type of each object using an image in which a plurality of objects are photographed, in which objects whose types can be identified and objects whose types are difficult to identify can coexist. The object of the present invention is to provide an object identification device, an object identification method, and a program that enable the object identification.
 本開示の一態様に係る物体識別装置は、複数の物体が撮影された画像から物体を物体単位で検出する検出器と、検出器によって検出された物体のうち、画像から物体の種類まで特定できる種類特定可能物体については画像から物体の種類を推定し、画像から物体の種類までは特定困難であるが物体が属するグループを特定できる種類特定困難物体については画像からグループを推定する識別器と、識別器によりグループとして推定された物体について種類の特定につながるグループ特有の処理を行う処理部と、を備える。 An object identification device according to an aspect of the present disclosure includes a detector that detects objects on an object-by-object basis from images in which a plurality of objects are photographed, and can identify the type of object from the image among the objects detected by the detector. a classifier that estimates the type of the object from the image for objects whose type can be specified, and estimates the group from the image for objects whose type is difficult to specify from the image, but the group to which the object belongs can be specified; and a processing unit that performs group-specific processing that leads to identification of the type of objects estimated as a group by the classifier.
 本態様によれば、複数の物体が撮影された画像から物体が検出され、個々の物体について識別器による推定が行われる。画像から検出された物体が種類特定可能物体である場合は識別器によってその物体の種類が推定される。一方、画像から検出された物体が種類特定困難物体である場合は識別器によってその物体が属するグループが推定され、グループまで推定されている物体について物体の種類の特定に寄与するグループ特有の処理に移行して、種類の特定につなげる。 According to this aspect, objects are detected from images in which a plurality of objects are photographed, and estimation is performed for each object by a classifier. If the object detected from the image is an object whose type can be identified, the classifier estimates the type of the object. On the other hand, if an object detected from an image is an object whose type is difficult to identify, the classifier estimates the group to which the object belongs, and performs group-specific processing that contributes to identifying the object type for objects whose group has been estimated. This will lead to identification of the species.
 画像は、種類特定可能物体と種類特定困難物体とが混在している状態で撮影された画像であってもよい。 The image may be an image taken in a state in which objects whose types can be identified and objects whose types are difficult to identify coexist.
 種類特定困難物体は、複数のグループに分類され、それぞれのグループに対してグループ特有の処理が定められている構成であってもよい。 The object whose type is difficult to identify may be classified into a plurality of groups, and a group-specific process may be determined for each group.
 検出器は、種類特定可能物体と種類特定困難物体とを区別せずに物体単位でラベル付けした第1の訓練データを用いて機械学習により訓練された第1の学習済みモデルを含む構成であってもよい。 The detector is configured to include a first trained model trained by machine learning using first training data in which each object is labeled without distinguishing between objects whose types can be identified and objects whose types are difficult to identify. It's okay.
 識別器は、種類特定可能物体については物体の種類単位でラベル付けし、種類特定困難物体については物体が属するグループ単位でラベル付けした第2の訓練データを用いて機械学習により訓練された第2の学習済みモデルを含む構成であってもよい。 The classifier is trained by machine learning using second training data in which objects whose type can be identified are labeled by the type of the object, and objects whose type is difficult to identify are labeled by the group to which the object belongs. The configuration may include trained models.
 グループを識別するラベルは階層構造で定義されていてもよい。 Labels that identify groups may be defined in a hierarchical structure.
 識別器への入力として、画像から検出器によって検出された物体の領域を物体単位で切り出した物体画像、物体画像から抽出された文字及び記号のうち少なくとも一方を含む文字記号抽出画像、物体の外形画像、及び物体のサイズ情報のうち少なくとも1つを用いる構成であってもよい。 As input to the discriminator, an object image obtained by cutting out the area of the object detected by the detector from the image in object units, a character/symbol extraction image containing at least one of characters and symbols extracted from the object image, and the external shape of the object. The configuration may be such that at least one of an image and object size information is used.
 識別器への入力として、さらに、物体画像の拡大又は縮小率を示す倍率情報を用いる構成であってもよい。 A configuration may also be adopted in which magnification information indicating the enlargement or reduction ratio of the object image is used as input to the discriminator.
 グループ特有の処理は、推定されたグループ内で物体の種類を検索するための検索条件の入力を受け付ける画面を表示させる処理を含む構成であってもよい。 The group-specific processing may include processing to display a screen that accepts input of search conditions for searching for the type of object within the estimated group.
 本開示の他の態様において、物体は薬剤であり、種類特定困難物体は、カプセル薬剤、無地薬剤、及び分割錠剤のうち少なくとも1つを含み、種類特定可能物体は、刻印又は印字を有する錠剤を含む構成であってもよい。 In another aspect of the present disclosure, the object is a drug, the hard-to-identify object includes at least one of a capsule drug, a plain drug, and a divided tablet, and the identifiable object includes a tablet with an inscription or print. The configuration may include the following.
 識別器への入力として、画像から検出器によって検出された薬剤の領域を薬剤単位で切り出した薬剤画像、薬剤画像から抽出された文字及び記号のうち少なくとも一方を含む文字記号抽出画像、薬剤の外形画像、及び薬剤のサイズ情報のうち少なくとも1つを用いる構成であってもよい。 As input to the discriminator, a drug image is obtained by cutting out the region of the drug detected by the detector from the image for each drug, a character/symbol extraction image containing at least one of the characters and symbols extracted from the drug image, and the outline of the drug. The configuration may be such that at least one of an image and drug size information is used.
 本開示の他の態様に係る物体識別装置は、1つ以上のプロセッサと、1つ以上のプロセッサが実行するプログラムが記憶される1つ以上のメモリと、を備える物体識別装置であって、1つ以上のプロセッサは、複数の物体が撮影された画像から物体を物体単位で検出する検出処理と、検出処理によって検出された物体のうち、画像から物体の種類まで特定できる種類特定可能物体については画像から物体の種類を推定し、画像から物体の種類までは特定困難であるが物体が属するグループを推定できる種類特定困難物体については画像からグループを推定する識別処理と、識別処理によりグループとして推定された物体について種類の特定につながるグループ特有の処理に移行する処理と、を実行する。 An object identification device according to another aspect of the present disclosure is an object identification device including one or more processors and one or more memories in which programs executed by the one or more processors are stored, the object identification device including: The two or more processors perform a detection process that detects objects in units of objects from images in which multiple objects are photographed, and detect objects that can be identified from the image to the type of the object detected by the detection process. The type of object can be estimated from the image, and although it is difficult to identify the type of object from the image, the group to which the object belongs can be estimated.For objects that are difficult to identify, a classification process is performed to estimate the group from the image, and the classification process is used to estimate the group. processing for transitioning to group-specific processing that leads to identification of the type of the object.
 1つ以上のプロセッサは、種類特定可能物体と種類特定困難物体とを区別せずに物体単位でラベル付けした第1の訓練データを用いて機械学習により訓練された第1の学習済みモデルを含む検出器を用いて検出処理を実行する構成であってもよい。 The one or more processors include a first trained model trained by machine learning using first training data that is labeled on an object-by-object basis without distinguishing between objects whose types can be identified and objects whose types are difficult to identify. The configuration may be such that the detection process is executed using a detector.
 1つ以上のプロセッサは、種類特定可能物体については物体の種類単位でラベル付けし、種類特定困難物体については物体が属するグループ単位でラベル付けした第2の訓練データを用いて機械学習により訓練された第2の学習済みモデルを含む識別器を用いて識別処理を実行する構成であってもよい。 The one or more processors are trained by machine learning using second training data in which objects whose type can be identified are labeled by the type of the object, and objects whose type is difficult to identify are labeled by the group to which the object belongs. The configuration may also be such that the classification process is executed using a classifier including a second trained model.
 1つ以上のプロセッサは、画像から検出処理によって検出された物体の領域を切り出し、物体単位の物体画像を生成する処理を実行し、物体画像に基づいて識別処理を行う構成であってもよい。 The one or more processors may be configured to cut out a region of the object detected by the detection process from the image, execute processing to generate an object image for each object, and perform identification processing based on the object image.
 本開示の他の態様において、物体は薬剤であり、種類特定困難物体は、カプセル薬剤、無地薬剤、及び分割錠剤のうち少なくとも1つを含み、種類特定可能物体は、刻印又は印字を有する錠剤を含み、グループ特有の処理は、推定されたグループ内で薬剤の種類を検索するための検索条件の入力を受け付ける画面を表示させる処理を含む構成であってもよい。 In another aspect of the present disclosure, the object is a drug, the hard-to-identify object includes at least one of a capsule drug, a plain drug, and a divided tablet, and the identifiable object includes a tablet with an inscription or print. The group-specific processing may include processing for displaying a screen that accepts input of search conditions for searching for the type of drug within the estimated group.
 本開示の他の態様において、薬剤に付された刻印又は印字が示す文字及び記号のうち少なくとも一方を含む文字記号情報と薬剤の種類とが紐付けされた第1のデータベースと、薬剤のマスタ画像が格納されている第2のデータベースと、を備え、1つ以上のプロセッサは、受け付けた検索条件に基づき第1のデータベース及び第2のデータベースのうち少なくとも一方を検索し、検索条件に該当する薬剤の候補を出力する構成であってもよい。 In another aspect of the present disclosure, there is provided a first database in which character symbol information including at least one of characters and symbols indicated by a stamp or print attached to a drug is associated with a drug type, and a master image of the drug. a second database in which is stored, the one or more processors search at least one of the first database and the second database based on the accepted search conditions, and search for drugs corresponding to the search conditions. The configuration may be such that the candidates are output.
 1つ以上のプロセッサは、画像を表示させる撮影画像表示部と、識別処理の推定結果に基づく候補物体の情報を表示させる候補表示部と、を含む画面を表示させる処理を行う構成であってもよい。 The one or more processors may be configured to perform processing to display a screen including a photographed image display unit that displays an image and a candidate display unit that displays information about the candidate object based on the estimation result of the identification process. good.
 1つ以上のプロセッサは、候補表示部に表示させる候補物体が属するグループの情報を表示させる処理を行う構成であってもよい。 The one or more processors may be configured to perform a process of displaying information on a group to which a candidate object to be displayed on the candidate display section belongs.
 1つ以上のプロセッサは、候補表示部に表示させる候補物体が属するグループを指定する指示を受け付け、受け付けた指示に従い、候補表示部の表示を制御する構成であってもよい。 The one or more processors may be configured to accept an instruction specifying a group to which a candidate object to be displayed on the candidate display section belongs, and control the display on the candidate display section according to the received instruction.
 本開示の他の態様において、カメラと、カメラによって撮影された画像及び画像から推定された物体に関する情報を表示するディスプレイと、を備える構成であってもよい。 In another aspect of the present disclosure, a configuration may be provided that includes a camera and a display that displays an image taken by the camera and information regarding an object estimated from the image.
 本開示の他の態様に係る物体識別方法は、1つ以上のプロセッサが実行する物体識別方法であって、1つ以上のプロセッサが、複数の物体が撮影された画像から物体を物体単位で検出することと、検出された物体のうち、画像から物体の種類まで推定できる種類特定可能物体については画像から物体の種類を推定し、画像から物体の種類までは特定困難であるが物体が属するグループを特定できる種類特定困難物体については画像からグループを推定することと、グループとして推定された物体について種類の特定につながるグループ特有の処理を実行することと、を含む。 An object identification method according to another aspect of the present disclosure is an object identification method executed by one or more processors, wherein the one or more processors detect objects in units of objects from images in which a plurality of objects are photographed. Among the detected objects, if the type of the object can be estimated from the image and the type of the object can be identified, the type of the object is estimated from the image, and although it is difficult to identify the type of object from the image, the group to which the object belongs is determined. The method includes estimating a group from an image for objects whose type is difficult to specify, and performing group-specific processing that leads to specifying the type of objects estimated as a group.
 本開示の他の態様に係るプログラムは、コンピュータに、複数の物体が撮影された画像から物体を物体単位で検出する機能と、検出された物体のうち、画像から物体の種類まで特定できる種類特定可能物体については画像から物体の種類を推定し、画像から物体の種類までは特定困難であるが物体が属するグループを特定できる種類特定困難物体については画像からグループを推定する機能と、グループとして推定された物体について種類の特定につながるグループ特有の処理を実行する機能と、を実現させる。 A program according to another aspect of the present disclosure provides a computer with a function of detecting objects on an object-by-object basis from images in which a plurality of objects are photographed, and a type identification that can identify the type of the object from the image among the detected objects. For possible objects, the type of object is estimated from the image, and although it is difficult to identify the type of object from the image, it is possible to identify the group to which the object belongs.For objects that are difficult to identify, there is a function that estimates the group from the image, and it is estimated as a group. A function for executing group-specific processing that leads to identification of the type of object is realized.
 本開示によれば、種類特定可能物体と種類特定困難物体とが混在した状態で撮影された画像であっても画像内の個々の物体の種類を特定することが可能になる。 According to the present disclosure, it is possible to identify the type of each object in an image even if the image is a mixture of objects whose types can be identified and objects whose types are difficult to identify.
図1は、スマートフォンの正面斜視図である。FIG. 1 is a front perspective view of a smartphone. 図2は、スマートフォンの背面斜視図である。FIG. 2 is a rear perspective view of the smartphone. 図3は、スマートフォンの電気的構成を示すブロック図である。FIG. 3 is a block diagram showing the electrical configuration of the smartphone. 図4は、インカメラの内部構成を示すブロック図である。FIG. 4 is a block diagram showing the internal configuration of the in-camera. 図5は、実施形態に係る薬種識別装置の機能構成を示すブロック図である。FIG. 5 is a block diagram showing the functional configuration of the drug type identification device according to the embodiment. 図6は、薬剤検出器と薬剤識別器とを含む薬種識別装置を実現するための機械学習による学習フェーズの概要を示すフローチャートである。FIG. 6 is a flowchart showing an overview of a learning phase by machine learning for realizing a drug type identification device including a drug detector and a drug discriminator. 図7は、薬種特定可能薬剤についての教師データとして付与する識別コードの例を示す説明図である。FIG. 7 is an explanatory diagram showing an example of an identification code provided as training data for a drug whose drug type can be specified. 図8は、薬種特定困難薬剤について教師データとして付与する識別コードの例を示す説明図である。FIG. 8 is an explanatory diagram showing an example of an identification code provided as training data for a drug whose drug type is difficult to identify. 図9は、カプセル薬剤について教師データとして付与する識別コードの他の例を示す説明図である。FIG. 9 is an explanatory diagram showing another example of an identification code given as training data for a capsule drug. 図10は、無地薬剤について教師データとして付与する識別コードの他の例を示す説明図である。FIG. 10 is an explanatory diagram showing another example of an identification code given as teacher data for a plain drug. 図11は、薬剤識別器に入力する情報の例を示す概念図である。FIG. 11 is a conceptual diagram showing an example of information input to the drug identifier. 図12は、ニューラルネットワークへの入力情報の例を示す図である。FIG. 12 is a diagram showing an example of input information to the neural network. 図13は、ニューラルネットワークへの入力情報の他の例を示す図である。FIG. 13 is a diagram showing another example of input information to the neural network. 図14は、カプセルに識別記号が印字されているカプセル薬剤の場合における入力情報の例を示す図である。FIG. 14 is a diagram showing an example of input information in the case of a capsule medicine with an identification symbol printed on the capsule. 図15は、識別記号が無いカプセル薬剤の場合の入力情報の例を示す図である。FIG. 15 is a diagram showing an example of input information for a capsule drug without an identification symbol. 図16は、半錠剤の場合の入力情報の例を示す図である。FIG. 16 is a diagram showing an example of input information in the case of a half tablet. 図17は、機械学習システムの機能的構成を示すブロック図である。FIG. 17 is a block diagram showing the functional configuration of the machine learning system. 図18は、実施形態に係る薬種識別装置の動作を示すフローチャートである。FIG. 18 is a flowchart showing the operation of the drug type identification device according to the embodiment. 図19は、実施形態に係る薬種識別装置の動作を示すフローチャートであり、図18のステップS15及びステップS16に適用されるループ処理の例を示す。FIG. 19 is a flowchart showing the operation of the drug type identification device according to the embodiment, and shows an example of loop processing applied to step S15 and step S16 in FIG. 18. 図20は、タッチパネルディスプレイに表示される画面の例を示す図である。FIG. 20 is a diagram showing an example of a screen displayed on a touch panel display. 図21は、薬剤の領域編集を行う場合の画面表示の例を示す図である。FIG. 21 is a diagram showing an example of a screen display when editing a drug area. 図22は、領域編集の操作方法の例を示す説明図である。FIG. 22 is an explanatory diagram illustrating an example of a region editing operation method. 図23は、薬剤についての識別を確定させた状態の画面表示の例を示す図である。FIG. 23 is a diagram illustrating an example of a screen display in a state where the identification of the drug has been determined. 図24は、識別結果確認GUI(Graphical User Interface)の画面表示の例を示す図である。FIG. 24 is a diagram showing an example of a screen display of an identification result confirmation GUI (Graphical User Interface). 図25は、候補一覧表示GUIの画面表示の例を示す図である。FIG. 25 is a diagram showing an example of a screen display of the candidate list display GUI. 図26は、刻印テキストGUIの画面表示の例を示す図である。FIG. 26 is a diagram showing an example of a screen display of the engraved text GUI. 図27は、カプセル検索GUIの画面表示の例を示す図である。FIG. 27 is a diagram showing an example of a screen display of the capsule search GUI. 図28は、無地薬剤検索GUIの画面表示の例を示す図である。FIG. 28 is a diagram showing an example of a screen display of the plain medicine search GUI. 図29は、分割錠剤検索GUIの画面表示の例を示す図である。FIG. 29 is a diagram showing an example of a screen display of the divided tablet search GUI. 図30は、典型的な薬剤の形状を表すアイコンの例を示す図である。FIG. 30 is a diagram showing an example of an icon representing the shape of a typical drug. 図31は、色の選択に用いられるアイコンの例を示す図である。FIG. 31 is a diagram showing an example of icons used for color selection. 図32は、実施形態に係る薬種識別装置において薬種特定困難薬剤の種類を特定するため機能的構成の例を示すブロック図である。FIG. 32 is a block diagram illustrating an example of a functional configuration for identifying the type of drug that is difficult to identify in the drug type identification device according to the embodiment. 図33は、撮影補助装置の上面図である。FIG. 33 is a top view of the photographic assistance device. 図34は、図33の34-34線における断面図である。FIG. 34 is a sectional view taken along line 34-34 in FIG. 33. 図35は、補助光源を取り外した状態の撮影補助装置の上面図である。FIG. 35 is a top view of the photographing auxiliary device with the auxiliary light source removed. 図36は、他の実施形態に係る撮影補助装置の上面図である。FIG. 36 is a top view of a photographic assisting device according to another embodiment. 図37は、図36の37-37線における断面図である。FIG. 37 is a sectional view taken along line 37-37 in FIG. 36. 図38は、補助光源を取り外した状態の撮影補助装置の上面図である。FIG. 38 is a top view of the photographing auxiliary device with the auxiliary light source removed. 図39は、照明装置の例を示す断面図である。FIG. 39 is a cross-sectional view showing an example of a lighting device. 図40は、基準マーカとして円形マーカを用いた薬剤載置台の上面図である。FIG. 40 is a top view of a drug mounting table using a circular marker as a reference marker. 図41は、変形例に係る円形マーカを用いた薬剤載置台の上面図である。FIG. 41 is a top view of a medicine placement table using a circular marker according to a modified example. 図42は、外形が四角形の基準マーカの具体例を示す図である。FIG. 42 is a diagram showing a specific example of a reference marker having a rectangular outer shape. 図43は、他の変形例に係る円形マーカを用いた薬剤載置台の上面図である。FIG. 43 is a top view of a medicine placement table using a circular marker according to another modification. 図44は、四角形の基準マーカの他の具体例を示す図である。FIG. 44 is a diagram showing another specific example of a rectangular reference marker. 図45は、くぼみ構造を有する薬剤載置台の例を示す図である。FIG. 45 is a diagram showing an example of a drug mounting table having a recessed structure. 図46は、カプセル薬剤向けのくぼみ構造を有する薬剤載置台の例を示す図である。FIG. 46 is a diagram showing an example of a drug mounting table having a recessed structure for capsule drugs. 図47は、楕円形の錠剤向けのくぼみ構造を有する薬剤載置台の例を示す図である。FIG. 47 is a diagram illustrating an example of a drug platform having a recessed structure for elliptical tablets.
 以下、添付図面に従って本発明の好ましい実施形態について詳説する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
 <実施形態に係る薬種識別装置の概要>
 実施形態に係る薬種識別装置は、薬剤を撮影した画像から薬剤の種類(薬種)を識別する装置である。本実施形態では、薬種特定可能薬剤と薬種特定困難薬剤とが混在する状態で複数の薬剤が撮影されることが想定されているが、両者が混在しない場合あるいは1つの薬剤のみが撮影された場合であっても薬種識別装置は有効に機能し得る。
<Overview of drug type identification device according to embodiment>
The drug type identification device according to the embodiment is a device that identifies the type of drug (drug type) from an image of the drug. In this embodiment, it is assumed that a plurality of drugs are photographed in a state in which a drug whose drug type can be identified and a drug whose drug type is difficult to identify coexist.However, in the case where both drugs do not coexist or only one drug is photographed However, the drug type identification device can still function effectively.
 実施形態に係る薬種識別装置は、複数の薬剤を撮影した画像から個々の薬剤を検出し、検出された個々の薬剤に対して薬種特定困難薬剤であるか、薬種特定可能薬剤であるかを自動判別して、それぞれに適した薬種特定フローへ自動分岐して効率良く薬種の特定を行うことを可能とする。薬種識別装置は、一例として携帯端末装置に搭載される。携帯端末装置は、スマートフォン、携帯電話機、PHS(Personal Handy-phone System)、PDA(Personal Digital Assistant)、タブレット型コンピュータ端末、ノート型パーソナルコンピュータ端末、及び携帯型ゲーム機のうちの少なくとも1つを含む。以下では、スマートフォンのハードウェアとソフトウェアとによって実現される薬種識別装置を例に挙げ、図面を参照しつつ、詳細に説明する。 The drug type identification device according to the embodiment detects each drug from an image of a plurality of drugs, and automatically determines whether each detected drug is a difficult-to-identify drug or a drug that can be identified. This makes it possible to efficiently identify the drug type by automatically branching to a drug type identification flow suitable for each drug type. The drug type identification device is installed in a mobile terminal device, for example. The mobile terminal device includes at least one of a smartphone, a mobile phone, a PHS (Personal Handy-phone System), a PDA (Personal Digital Assistant), a tablet computer terminal, a notebook personal computer terminal, and a mobile game console. . Hereinafter, a drug type identification device realized by hardware and software of a smartphone will be described in detail with reference to the drawings.
 〔スマートフォンの外観〕
 図1は、実施形態に係る薬種識別装置として機能するカメラ付き携帯端末装置であるスマートフォン10の正面斜視図である。図1に示すように、スマートフォン10は、平板状の筐体12を有する。スマートフォン10は、筐体12の正面にタッチパネルディスプレイ14、スピーカ16、マイクロフォン18、及びインカメラ20を備えている。
[Smartphone appearance]
FIG. 1 is a front perspective view of a smartphone 10 that is a camera-equipped mobile terminal device that functions as a drug type identification device according to an embodiment. As shown in FIG. 1, the smartphone 10 has a flat housing 12. The smartphone 10 includes a touch panel display 14, a speaker 16, a microphone 18, and an in-camera 20 on the front of a housing 12.
 タッチパネルディスプレイ14は、画像等を表示するディスプレイ部、及びディスプレイ部の前面に配置され、タッチ入力を受け付けるタッチパネル部を備える。ディスプレイ部は、例えばカラーLCD(Liquid Crystal Display)パネルである。 The touch panel display 14 includes a display section that displays images and the like, and a touch panel section that is placed in front of the display section and receives touch input. The display unit is, for example, a color LCD (Liquid Crystal Display) panel.
 タッチパネル部は、例えば光透過性を有する基板本体の上に面状に設けられ、光透過性を有する位置検出用電極、及び位置検出用電極上に設けられた絶縁層を有する静電容量式タッチパネルである。タッチパネル部は、ユーザのタッチ操作に対応した2次元の位置座標情報を生成して出力する。タッチ操作は、タップ操作、ダブルタップ操作、フリック操作、スワイプ操作、ドラッグ操作、ピンチイン操作、及びピンチアウト操作を含む。 The touch panel section is, for example, a capacitive touch panel that is provided in a planar manner on a substrate main body that has optical transparency, and has a position detection electrode that has optical transparency, and an insulating layer provided on the position detection electrode. It is. The touch panel section generates and outputs two-dimensional position coordinate information corresponding to a user's touch operation. Touch operations include tap operations, double-tap operations, flick operations, swipe operations, drag operations, pinch-in operations, and pinch-out operations.
 スピーカ16は、通話時及び動画再生時に音声を出力する音声出力部である。マイクロフォン18は、通話時及び動画撮影時に音声が入力される音声入力部である。インカメラ20は、動画及び静止画を撮影する撮像装置である。 The speaker 16 is an audio output unit that outputs audio during a call and when playing a video. The microphone 18 is an audio input unit into which audio is input during a call and when shooting a video. The in-camera 20 is an imaging device that shoots moving images and still images.
 図2は、スマートフォン10の背面斜視図である。図2に示すように、スマートフォン10は、筐体12の背面にアウトカメラ22、及びライト24を備えている。アウトカメラ22は、動画及び静止画を撮影する撮像装置である。ライト24は、アウトカメラ22で撮影を行う際に照明光を照射する光源であり、例えばLED(Light Emitting Diode)により構成される。 FIG. 2 is a rear perspective view of the smartphone 10. As shown in FIG. 2, the smartphone 10 includes an out camera 22 and a light 24 on the back surface of the housing 12. The outside camera 22 is an imaging device that photographs moving images and still images. The light 24 is a light source that emits illumination light when photographing with the out-camera 22, and is composed of, for example, an LED (Light Emitting Diode).
 さらに、図1及び図2に示すように、スマートフォン10は、筐体12の正面及び側面に、それぞれスイッチ26を備えている。スイッチ26は、ユーザからの指示を受け付ける入力部材である。スイッチ26は、指等で押下されるとオンとなり、指を離すとバネ等の復元力によってオフ状態となる押しボタン式のスイッチである。 Furthermore, as shown in FIGS. 1 and 2, the smartphone 10 includes switches 26 on the front and side surfaces of the housing 12, respectively. The switch 26 is an input member that receives instructions from the user. The switch 26 is a push-button switch that is turned on when pressed with a finger or the like, and turned off by the restoring force of a spring or the like when the finger is released.
 なお、筐体12の構成はこれに限定されず、折り畳み構造又はスライド機構を有する構成を採用してもよい。 Note that the configuration of the housing 12 is not limited to this, and a configuration having a folding structure or a sliding mechanism may be adopted.
 〔スマートフォンの電気的構成〕
 スマートフォン10の主たる機能として、基地局装置と移動体通信網とを介した移動無線通信を行う無線通信機能を備える。
[Electrical configuration of smartphone]
The main function of the smartphone 10 is a wireless communication function that performs mobile wireless communication via a base station device and a mobile communication network.
 図3は、スマートフォン10の電気的構成を示すブロック図である。図3に示すように、スマートフォン10は、前述のタッチパネルディスプレイ14、スピーカ16、マイクロフォン18、インカメラ20、アウトカメラ22、ライト24、及びスイッチ26の他、CPU(Central Processing Unit)28、無線通信部30、通話部32、メモリ34、外部入出力部40、GPS受信部42、及び電源部44を有する。 FIG. 3 is a block diagram showing the electrical configuration of the smartphone 10. As shown in FIG. 3, the smartphone 10 includes the above-mentioned touch panel display 14, speaker 16, microphone 18, in-camera 20, out-camera 22, light 24, and switch 26, as well as a CPU (Central Processing Unit) 28, wireless communication 30, a communication section 32, a memory 34, an external input/output section 40, a GPS reception section 42, and a power supply section 44.
 CPU28は、メモリ34に記憶された命令を実行するプロセッサの一例である。CPU28は、メモリ34が記憶する制御プログラム及び制御データに従って動作し、スマートフォン10の各部を統括して制御する。CPU28は、無線通信部30を通じて音声通信及びデータ通信を行うために、通信系の各部を制御する移動通信制御機能と、アプリケーション処理機能を備える。 The CPU 28 is an example of a processor that executes instructions stored in the memory 34. The CPU 28 operates according to the control program and control data stored in the memory 34, and centrally controls each part of the smartphone 10. The CPU 28 has a mobile communication control function that controls each part of the communication system and an application processing function in order to perform voice communication and data communication through the wireless communication unit 30.
 また、CPU28は、動画、静止画、及び文字等をタッチパネルディスプレイ14に表示する画像処理機能を備える。この画像処理機能により、静止画、動画、及び文字等の情報が視覚的にユーザに伝達される。また、CPU28は、タッチパネルディスプレイ14のタッチパネル部からユーザのタッチ操作に対応した2次元の位置座標情報を取得する。さらに、CPU28は、スイッチ26からの入力信号を取得する。 Additionally, the CPU 28 has an image processing function that displays moving images, still images, characters, etc. on the touch panel display 14. This image processing function visually conveys information such as still images, moving images, and text to the user. Further, the CPU 28 acquires two-dimensional position coordinate information corresponding to the user's touch operation from the touch panel section of the touch panel display 14. Further, the CPU 28 obtains an input signal from the switch 26.
 インカメラ20及びアウトカメラ22は、CPU28の指示に従って、動画及び静止画を撮影する。図4は、インカメラ20の内部構成を示すブロック図である。なお、アウトカメラ22の内部構成は、インカメラ20と共通している。図4に示すように、インカメラ20は、撮影レンズ50、絞り52、撮像素子54、AFE(Analog Front End)56、A/D(Analog to Digital)変換器58、及びレンズ駆動部60を有する。 The in-camera 20 and the out-camera 22 shoot moving images and still images according to instructions from the CPU 28. FIG. 4 is a block diagram showing the internal configuration of the in-camera 20. Note that the internal configuration of the out-camera 22 is the same as that of the in-camera 20. As shown in FIG. 4, the in-camera 20 includes a photographic lens 50, an aperture 52, an image sensor 54, an AFE (Analog Front End) 56, an A/D (Analog to Digital) converter 58, and a lens drive unit 60. .
 撮影レンズ50は、ズームレンズ50Z及びフォーカスレンズ50Fから構成される。レンズ駆動部60は、CPU28からの指令に応じて、ズームレンズ50Z及びフォーカスレンズ50Fを進退駆動して光学ズーム調整及びフォーカス調整を行う。また、レンズ駆動部60は、CPU28からの指令に応じて絞り52を制御し、露出を調整する。レンズ駆動部60は、後述するグレーの色に基づいてカメラの露光補正を行う露光補正部に相当する。ズームレンズ50Z及びフォーカスレンズ50Fの位置、絞り52の開放度等の情報は、CPU28に入力される。 The photographing lens 50 is composed of a zoom lens 50Z and a focus lens 50F. The lens drive unit 60 performs optical zoom adjustment and focus adjustment by driving the zoom lens 50Z and focus lens 50F forward and backward in response to commands from the CPU 28. Further, the lens drive section 60 controls the aperture 52 according to commands from the CPU 28 to adjust exposure. The lens drive section 60 corresponds to an exposure correction section that performs exposure correction of the camera based on the color of gray, which will be described later. Information such as the positions of the zoom lens 50Z and the focus lens 50F and the opening degree of the aperture 52 is input to the CPU 28.
 撮像素子54は、多数の受光素子がマトリクス状に配列された受光面を備える。ズームレンズ50Z、フォーカスレンズ50F、及び絞り52を透過した被写体光は、撮像素子54の受光面上に結像される。撮像素子54の受光面上には、R(赤)、G(緑)、及びB(青)のカラーフィルタが設けられている。撮像素子54の各受光素子は、受光面上に結像された被写体光をR、G、及びBの各色の信号に基づいて電気信号に変換する。これにより、撮像素子54は被写体のカラー画像を取得する。撮像素子54としては、CMOS(Complementary Metal-Oxide Semiconductor)、又はCCD(Charge-Coupled Device)等の光電変換素子を用いることができる。 The image sensor 54 includes a light-receiving surface in which a large number of light-receiving elements are arranged in a matrix. The subject light that has passed through the zoom lens 50Z, the focus lens 50F, and the aperture 52 is imaged on the light receiving surface of the image sensor 54. On the light receiving surface of the image sensor 54, color filters of R (red), G (green), and B (blue) are provided. Each light-receiving element of the image sensor 54 converts the subject light imaged on the light-receiving surface into an electrical signal based on R, G, and B color signals. Thereby, the image sensor 54 acquires a color image of the subject. As the image sensor 54, a photoelectric conversion element such as CMOS (Complementary Metal-Oxide Semiconductor) or CCD (Charge-Coupled Device) can be used.
 AFE56は、撮像素子54から出力されるアナログ画像信号のノイズ除去、及び増幅等を行う。A/D変換器58は、AFE56から入力されるアナログ画像信号を階調幅があるデジタル画像信号に変換する。なお、撮像素子54への入射光の露光時間を制御するシャッターは、電子シャッターが用いられる。電子シャッターの場合、CPU28によって撮像素子54の電荷蓄積期間を制御することで、露光時間(シャッタースピード)を調節することができる。 The AFE 56 performs noise removal, amplification, etc. of the analog image signal output from the image sensor 54. The A/D converter 58 converts the analog image signal input from the AFE 56 into a digital image signal with a gradation range. Note that an electronic shutter is used as a shutter to control the exposure time of incident light to the image sensor 54. In the case of an electronic shutter, the exposure time (shutter speed) can be adjusted by controlling the charge accumulation period of the image sensor 54 by the CPU 28.
 インカメラ20は、撮影した動画及び静止画の画像データをMPEG(Moving Picture Experts Group)又はJPEG(Joint Photographic Experts Group)等の圧縮した画像データに変換してもよい。 The in-camera 20 may convert image data of captured moving pictures and still images into compressed image data such as MPEG (Moving Picture Experts Group) or JPEG (Joint Photographic Experts Group).
 図3の説明に戻り、CPU28は、インカメラ20及びアウトカメラ22が撮影した動画及び静止画をメモリ34に記憶させる。また、CPU28は、インカメラ20及びアウトカメラ22が撮影した動画及び静止画を無線通信部30又は外部入出力部40を通じてスマートフォン10の外部に出力してもよい。 Returning to the explanation of FIG. 3, the CPU 28 causes the memory 34 to store the moving images and still images taken by the in-camera 20 and the out-camera 22. Further, the CPU 28 may output the moving images and still images taken by the in-camera 20 and the out-camera 22 to the outside of the smartphone 10 through the wireless communication unit 30 or the external input/output unit 40.
 さらに、CPU28は、インカメラ20及びアウトカメラ22が撮影した動画及び静止画をタッチパネルディスプレイ14に表示する。CPU28は、インカメラ20及びアウトカメラ22が撮影した動画及び静止画をアプリケーションソフトウェア内で利用してもよい。 Further, the CPU 28 displays the moving images and still images taken by the in-camera 20 and the out-camera 22 on the touch panel display 14. The CPU 28 may use the moving images and still images taken by the in-camera 20 and the out-camera 22 within the application software.
 なお、CPU28は、アウトカメラ22による撮影の際に、ライト24を点灯させることで被写体に撮影補助光を照射してもよい。ライト24は、ユーザによるタッチパネルディスプレイ14のタッチ操作、又はスイッチ26の操作によって点灯及び消灯が制御されてもよい。 Note that the CPU 28 may illuminate the subject with shooting auxiliary light by turning on the light 24 when shooting with the out-camera 22. The lighting and extinguishing of the light 24 may be controlled by the user's touch operation on the touch panel display 14 or the operation of the switch 26 .
 無線通信部30は、CPU28の指示に従って、移動通信網に収容された基地局装置に対し無線通信を行う。スマートフォン10は、この無線通信を使用して、音声データ及び画像データ等の各種ファイルデータ、電子メールデータ等の送受信、Web(World Wide Webの略称)データ及びストリーミングデータ等の受信を行う。 The wireless communication unit 30 performs wireless communication with a base station device accommodated in a mobile communication network according to instructions from the CPU 28. The smartphone 10 uses this wireless communication to send and receive various file data such as audio data and image data, e-mail data, etc., and receive Web (abbreviation for World Wide Web) data, streaming data, and the like.
 通話部32は、スピーカ16及びマイクロフォン18が接続される。通話部32は、無線通信部30により受信された音声データを復号してスピーカ16から出力する。通話部32は、マイクロフォン18を通じて入力されたユーザの音声をCPU28が処理可能な音声データに変換してCPU28に出力する。 A speaker 16 and a microphone 18 are connected to the talking section 32 . The communication unit 32 decodes the audio data received by the wireless communication unit 30 and outputs it from the speaker 16. The communication unit 32 converts the user's voice input through the microphone 18 into voice data that can be processed by the CPU 28 and outputs the data to the CPU 28 .
 メモリ34は、CPU28に実行させるための命令を記憶する。メモリ34は、スマートフォン10に内蔵される内部記憶部36、及びスマートフォン10に着脱自在な外部記憶部38により構成される。内部記憶部36及び外部記憶部38は、公知の格納媒体を用いて実現される。 The memory 34 stores instructions for the CPU 28 to execute. The memory 34 includes an internal storage section 36 built into the smartphone 10 and an external storage section 38 that is detachable from the smartphone 10 . The internal storage section 36 and the external storage section 38 are realized using known storage media.
 メモリ34は、CPU28の制御プログラム、制御データ、アプリケーションソフトウェア、通信相手の名称及び電話番号等が対応付けられたアドレスデータ、送受信した電子メールのデータ、WebブラウジングによりダウンロードしたWebデータ、及びダウンロードしたコンテンツデータ等を記憶する。また、メモリ34は、ストリーミングデータ等を一時的に記憶してもよい。 The memory 34 stores the control program of the CPU 28, control data, application software, address data associated with the name and telephone number of the communication partner, data of sent and received e-mails, web data downloaded through web browsing, and downloaded content. Store data etc. Further, the memory 34 may temporarily store streaming data and the like.
 外部入出力部40は、スマートフォン10に連結される外部機器とのインターフェースの役割を果たす。スマートフォン10は、外部入出力部40を介して通信等により直接的又は間接的に他の外部機器に接続される。外部入出力部40は、外部機器から受信したデータをスマートフォン10の内部の各構成要素に伝達し、かつスマートフォン10の内部のデータを外部機器に送信する。 The external input/output unit 40 serves as an interface with an external device connected to the smartphone 10. The smartphone 10 is directly or indirectly connected to other external devices through communication or the like via the external input/output unit 40 . The external input/output unit 40 transmits data received from an external device to each component inside the smartphone 10, and transmits data inside the smartphone 10 to the external device.
 通信等の手段は、例えばユニバーサルシリアルバス(Universal Serial Bus:USB)、IEEE(Institute of Electrical and Electronics Engineers)1394、インターネット、無線LAN(Local Area Network)、Bluetooth(登録商標)、RFID(Radio Frequency Identification)、及び赤外線通信である。また、外部機器は、例えばヘッドセット、外部充電器、データポート、オーディオ機器、ビデオ機器、スマートフォン、PDA、パーソナルコンピュータ、及びイヤホンである。 Examples of communication methods include Universal Serial Bus (USB), IEEE (Institute of Electrical and Electronics Engineers) 1394, the Internet, wireless LAN (Local Area Network), Bluetooth (registered trademark), and RFID (Radio Frequency Identification). ), and infrared communication. Further, external devices include, for example, a headset, an external charger, a data port, an audio device, a video device, a smartphone, a PDA, a personal computer, and an earphone.
 GPS受信部42は、GPS衛星ST1,ST2,…,STnからの測位情報に基づいて、スマートフォン10の位置を検出する。 The GPS receiving unit 42 detects the position of the smartphone 10 based on positioning information from GPS satellites ST1, ST2, ..., STn.
 電源部44は、不図示の電源回路を介してスマートフォン10の各部に電力を供給する電力供給源である。電源部44は、リチウムイオン二次電池を含む。電源部44は、外部のAC電源からDC電圧を生成するA/D変換部を含んでもよい。 The power supply unit 44 is a power supply source that supplies power to each part of the smartphone 10 via a power supply circuit (not shown). Power supply section 44 includes a lithium ion secondary battery. The power supply section 44 may include an A/D conversion section that generates a DC voltage from an external AC power source.
 このように構成されたスマートフォン10は、タッチパネルディスプレイ14等を用いたユーザからの指示入力により撮影モードに設定され、インカメラ20及びアウトカメラ22によって動画及び静止画を撮影することができる。 The smartphone 10 configured in this manner is set to the shooting mode by inputting an instruction from the user using the touch panel display 14 or the like, and can shoot moving images and still images using the in-camera 20 and the out-camera 22.
 スマートフォン10が撮影モードに設定されると、撮影スタンバイ状態となり、インカメラ20又はアウトカメラ22によって動画が撮影され、撮影された動画がライブビュー画像としてタッチパネルディスプレイ14に表示される。 When the smartphone 10 is set to the shooting mode, it enters a shooting standby state, a moving image is shot by the in-camera 20 or the out-camera 22, and the shot moving image is displayed on the touch panel display 14 as a live view image.
 ユーザは、タッチパネルディスプレイ14に表示されるライブビュー画像を視認して、構図を決定したり、撮影したい被写体を確認したり、撮影条件を設定したりすることができる。 The user can visually check the live view image displayed on the touch panel display 14 to determine the composition, confirm the subject to be photographed, and set photographing conditions.
 スマートフォン10は、撮影スタンバイ状態においてタッチパネルディスプレイ14等を用いたユーザからの指示入力により撮影が指示されると、AF(Autofocus)及びAE(Auto Exposure)制御を行い、動画及び静止画の撮影及び記憶を行う。 When the smartphone 10 is in the shooting standby state and is instructed to shoot by inputting an instruction from the user using the touch panel display 14 or the like, the smartphone 10 performs AF (Autofocus) and AE (Auto Exposure) control to shoot and store videos and still images. I do.
 〔薬種識別装置の機能構成〕
 図5は、スマートフォン10によって実現される薬種識別装置100の機能構成を示すブロック図である。薬種識別装置100は、プロセッサ102と、記憶装置104とを含む。プロセッサ102はCPU28を含む。プロセッサ102は、GPU(Graphics Processing Unit)を含んでもよい。記憶装置104は非一時的な有体物であるコンピュータ可読媒体であり、メモリ34を含む。プロセッサ102は、タッチパネルディスプレイ14と接続されている。タッチパネルディスプレイ14は、表示装置(ディスプレイ)として機能する表示部14Aと、タッチ操作による入力を受け付ける入力装置として機能する入力部14Bとを含む。
[Functional configuration of drug type identification device]
FIG. 5 is a block diagram showing the functional configuration of the drug type identification device 100 realized by the smartphone 10. Drug type identification device 100 includes a processor 102 and a storage device 104. Processor 102 includes CPU 28. The processor 102 may include a GPU (Graphics Processing Unit). Storage device 104 is a non-transitory, tangible, computer-readable medium and includes memory 34 . Processor 102 is connected to touch panel display 14 . The touch panel display 14 includes a display section 14A that functions as a display device (display), and an input section 14B that functions as an input device that receives input by touch operation.
 薬種識別装置100は、画像取得部112、薬剤検出器114、領域修正部116、薬剤領域切出部118、薬剤識別器120、テキスト検索部122、表示制御部124、及び入力処理部126を含む。 The drug type identification device 100 includes an image acquisition section 112, a drug detector 114, a region correction section 116, a drug region cutting section 118, a drug identifier 120, a text search section 122, a display control section 124, and an input processing section 126. .
 画像取得部112は、識別対象の薬剤が撮影された撮影画像を取得する。撮影画像は、例えばインカメラ20又はアウトカメラ22によって撮影された画像である。撮影画像は、無線通信部30、外部記憶部38、又は外部入出力部40を介して他の装置から取得した画像であってもよい。撮影画像は、複数の識別対象薬剤が含まれていてよい。複数の識別対象薬剤は、同じ薬種の識別対象薬剤に限定されず、それぞれ異なる薬種の識別対象薬剤であってもよい。本実施形態では、異種の薬剤が混在している状態で複数の薬剤を一度にまとめて(1画像として)撮影した画像を処理する態様を例に説明する。 The image acquisition unit 112 acquires a captured image of the drug to be identified. The photographed image is, for example, an image photographed by the in-camera 20 or the out-camera 22. The photographed image may be an image acquired from another device via the wireless communication section 30, the external storage section 38, or the external input/output section 40. The photographed image may include a plurality of drugs to be identified. The plurality of drugs to be identified are not limited to drugs of the same drug type, but may be drugs of different drug types. In this embodiment, an example will be described in which an image in which a plurality of drugs are photographed together (as one image) is processed in a state where different types of drugs are mixed.
 撮影画像は、識別対象薬剤及びマーカが撮影された画像であってもよい。マーカは、例えば、ArUcoマーカ、円形マーカ、又は四角形マーカなどであってよい。撮影画像内に複数のマーカが含まれていることが好ましい。複数のマーカは、例えば、薬剤載置範囲の矩形領域の四隅に配置される。撮影画像は、識別対象薬剤及び基準となるグレーの色が撮影された画像であってもよい。 The photographed image may be an image in which the drug to be identified and the marker are photographed. The marker may be, for example, an ArUco marker, a circular marker, a square marker, or the like. Preferably, a plurality of markers are included in the captured image. The plurality of markers are arranged, for example, at the four corners of the rectangular area of the medicine placement range. The photographed image may be an image in which the drug to be identified and a reference gray color are photographed.
 撮影画像は、標準となる撮影距離及び撮影視点で撮影された画像であってもよい。撮影距離とは、識別対象薬剤及び撮影レンズ50の間の距離と撮影レンズ50の焦点距離とから表すことができる。また、撮影視点とは、マーカ印刷面と撮影レンズ50の光軸とが成す角度から表すことができる。 The photographed image may be an image photographed at a standard photographing distance and photographing viewpoint. The photographing distance can be expressed from the distance between the drug to be identified and the photographing lens 50, and the focal length of the photographing lens 50. Further, the photographing viewpoint can be expressed by the angle formed by the marker printing surface and the optical axis of the photographing lens 50.
 画像取得部112は、不図示の画像補正部を含む。画像補正部は、撮影画像にマーカが含まれる場合に、マーカに基づいて撮影画像の撮影距離及び撮影視点の標準化を行って標準化画像を取得する。標準化画像は、撮影画像について標準化処理が施された後、四隅のマーカを頂点とする矩形の内側の領域が切り出された画像であってよい。例えば、画像補正部は、マーカによって座標を特定した四角形の4つの頂点が撮影距離及び撮影視点の標準化後に行く先の座標を指定する。画像補正部は、これら4つの頂点が、それぞれ指定した座標の位置に変換されるような透視変換行列を求める。このような透視変換行列は、4点あれば一意に定まる。例えば、OpenCV(Open Source Computer Vision Library)のgetPerspectiveTransform関数によって、4点の対応関係があれば変換行列を求めることができる。 The image acquisition unit 112 includes an image correction unit (not shown). When the photographed image includes a marker, the image correction unit standardizes the photographing distance and photographing viewpoint of the photographed image based on the marker to obtain a standardized image. The standardized image may be an image obtained by performing standardization processing on a photographed image and then cutting out an area inside a rectangle having four corner markers as vertices. For example, the image correction unit specifies the coordinates to which the four vertices of the rectangle whose coordinates are specified by the marker go after standardization of the photographing distance and photographing viewpoint. The image correction unit obtains a perspective transformation matrix that transforms these four vertices into respective designated coordinate positions. Such a perspective transformation matrix is uniquely determined if there are four points. For example, if there is a correspondence between four points, a transformation matrix can be obtained using the getPerspectiveTransform function of OpenCV (Open Source Computer Vision Library).
 画像補正部は、求めた透視変換行列を用いて、元の撮影画像の全体を透視変換し、変換後の画像を取得する。このような透視変換は、OpenCVのwarpPerspective関数を用いることで実行することができる。この変換後の画像が、撮影距離及び撮影視点が標準化された標準化画像であってよい。 The image correction unit perspectively transforms the entire original captured image using the obtained perspective transformation matrix, and obtains a transformed image. Such perspective transformation can be executed by using the warpPerspective function of OpenCV. The image after this conversion may be a standardized image in which the photographing distance and photographing viewpoint are standardized.
 また、画像補正部は、撮影画像に基準となるグレーの色の領域が含まれる場合に、基準となるグレーの色に基づいて撮影画像の色調補正を行ってもよい。 Furthermore, when the captured image includes a reference gray color area, the image correction unit may perform color tone correction of the captured image based on the reference gray color.
 薬剤検出器114は、機械学習によって訓練された学習モデルである第1学習済みモデルTM1を含む。第1学習済みモデルTM1は、いわゆる物体検出のタスクを行うように訓練されたモデルである。第1学習済みモデルTM1は、画像(標準化前画像又は標準化画像)を入力として与えると、検出した物体の領域に対応する位置情報、物体のクラス、及び物体の確からしさの確率を示すスコアを出力する。第1学習済みモデルTM1は本開示における「第1の学習済みモデル」の一例である。 The drug detector 114 includes a first learned model TM1 that is a learning model trained by machine learning. The first trained model TM1 is a model trained to perform a so-called object detection task. When the first trained model TM1 receives an image (pre-standardized image or standardized image) as input, it outputs position information corresponding to the region of the detected object, the class of the object, and a score indicating the probability of the object's certainty. do. The first trained model TM1 is an example of a "first trained model" in the present disclosure.
 薬剤検出における物体のクラスは、少なくとも「薬剤」を含み、さらに「マーカ」を含んでもよい。薬剤検出器114は、画像取得部112が取得した撮影画像から薬剤を検出し、検出した薬剤の領域を示す情報を出力する。薬剤検出器114は、画像補正部によって標準化画像が取得された場合は、標準化画像から薬剤の領域を検出する。薬剤検出器114は、撮影画像に複数の薬剤が含まれている場合は、複数の薬剤のそれぞれの領域を検出する。 The class of objects in drug detection includes at least "drug" and may further include "marker." The drug detector 114 detects a drug from the captured image acquired by the image acquisition unit 112 and outputs information indicating the area of the detected drug. When the standardized image is acquired by the image correction unit, the drug detector 114 detects a drug area from the standardized image. If a plurality of drugs are included in the captured image, the drug detector 114 detects regions of each of the plurality of drugs.
 第1学習済みモデルTM1からの出力は、撮影画像内から検出された個々の薬剤の領域を示すバウンディングボックスの位置情報であってもよいし、個々の薬剤の領域を画素単位で塗りつぶしたセグメンテーションマスク画像であってもよい。第1学習済みモデルTM1を作成するための学習方法及び薬剤検出器114による検出処理の内容について詳細は後述する。薬剤検出器114は本開示における「検出器」の一例である。 The output from the first trained model TM1 may be position information of a bounding box indicating the region of each drug detected in the photographed image, or a segmentation mask that fills in the region of each drug pixel by pixel. It may be an image. Details of the learning method for creating the first trained model TM1 and the content of the detection process by the drug detector 114 will be described later. Drug detector 114 is an example of a "detector" in this disclosure.
 薬剤検出器114による検出処理の結果は、表示制御部124を介して表示部14Aに表示される。表示制御部124は、タッチパネルディスプレイ14における表示用の信号を生成し、表示制御を行う。表示制御部124は、表示部14Aに表示させる画像の表示倍率を変更する倍率変更部125を含む。タッチパネルディスプレイ14にてピンチアウト操作又はピンチイン操作が行われた場合など、表示倍率を変更する指示が入力されると、倍率変更部125は指示に応じて拡大又は縮小の処理を行う。入力処理部126は入力部14B又はマイクロフォン18からの入力を受け付け、受け付けた入力情報を対応する処理部へ送る。 The results of the detection process by the drug detector 114 are displayed on the display section 14A via the display control section 124. The display control unit 124 generates a signal for display on the touch panel display 14 and performs display control. The display control section 124 includes a magnification changing section 125 that changes the display magnification of the image displayed on the display section 14A. When an instruction to change the display magnification is input, such as when a pinch-out operation or a pinch-in operation is performed on the touch panel display 14, the magnification changing unit 125 performs enlargement or reduction processing according to the instruction. The input processing section 126 receives input from the input section 14B or the microphone 18, and sends the received input information to the corresponding processing section.
 領域修正部116は、薬剤検出器114が検出した薬剤の領域について、ユーザから修正の指示を受け付けて、受け付けた指示に応じて薬剤領域を修正する処理を行う。すなわち、領域修正部116は、入力部14Bから受け付けた領域修正の指示に従い、薬剤検出器114の検出結果に対して修正を加える。領域修正部116は、薬剤検出器114による誤検出あるいは検出漏れなどが発生した場合に、ユーザは入力部14Bから検出結果を修正する指示を入力して、識別対象の薬剤の正しい領域を指定することができる。 The area correction unit 116 receives a correction instruction from the user regarding the drug area detected by the drug detector 114, and performs a process of correcting the drug area according to the received instruction. That is, the region modification section 116 modifies the detection result of the drug detector 114 according to the region modification instruction received from the input section 14B. The area correction unit 116 allows the user to specify the correct area of the drug to be identified by inputting an instruction to correct the detection result from the input unit 14B when an erroneous detection or failure of detection occurs by the drug detector 114. be able to.
 薬剤領域切出部118は、薬剤検出器114の検出結果に基づき撮影画像から薬剤ごとに薬剤領域を切り出す処理を行う。領域修正部116によって薬剤領域の修正が行われた場合、薬剤領域切出部118は、修正後の薬剤領域を切り出す処理を行う。 The drug region cutting unit 118 performs a process of cutting out a drug region for each drug from the photographed image based on the detection result of the drug detector 114. When the medicine region is modified by the region modification unit 116, the medicine region cutting unit 118 performs a process of cutting out the modified medicine region.
 薬剤識別器120は、機械学習によって訓練された学習モデルである第2学習済みモデルTM2を含む。第2学習済みモデルTM2は、いわゆる物体認識のタスクを行うように訓練されたモデルである。薬剤識別器120は、薬剤領域切出部118によって切り出されたそれぞれの薬剤の領域画像(以下、薬剤画像という。)を取得し、該当する薬剤の種類又は薬剤が属するグループを推定してラベル付け(すなわち、多クラス分類)を行う。薬剤識別器120が行うクラス分類は、入力された画像に写っている薬剤が薬種特定困難薬剤であるか、薬種特定可能薬剤であるかによって、分類の細かさ(粒度)が異なるものとなる。薬剤画像は本開示における「物体画像」の一例である。第2学習済みモデルTM2は本開示における「第2の学習済みモデル」の一例である。 The drug identifier 120 includes a second learned model TM2 that is a learning model trained by machine learning. The second trained model TM2 is a model trained to perform a so-called object recognition task. The drug identifier 120 acquires each drug region image (hereinafter referred to as a drug image) cut out by the drug region cutting unit 118, estimates the type of the corresponding drug or the group to which the drug belongs, and labels it. (i.e., multi-class classification). The class classification performed by the drug identifier 120 differs in the fineness (granularity) of the classification depending on whether the drug in the input image is a drug whose drug type is difficult to identify or a drug whose drug type can be identified. The drug image is an example of an "object image" in the present disclosure. The second trained model TM2 is an example of a "second trained model" in the present disclosure.
 薬剤識別器120は、入力された薬剤画像が薬種特定困難薬剤の画像である場合には、その薬剤が属するグループを推定して推定結果を出力する。薬種特定困難薬剤が属するグループとしては、例えば、「カプセル薬剤」、「分割錠剤」あるいは「無地薬剤」などの種類があり得る。また、グループの定義は、さらに細かくカテゴリー分けしてもよく、階層構造の分類によりサブグループを定義してもよい。例えば、「白色単色カプセル薬剤」、「赤白二色カプセル薬剤」、「半錠剤」、「四分の一錠剤」、「白色無地薬剤、又は「透明無地薬剤」などのようにグループを定めてもよい。 If the input drug image is of a drug whose type is difficult to identify, the drug identifier 120 estimates the group to which the drug belongs and outputs the estimation result. Examples of the group to which drugs whose drug type is difficult to identify may include "capsule drugs," "divided tablets," or "plain drugs." Further, the group definition may be further divided into categories, and subgroups may be defined by hierarchical classification. For example, groups can be defined such as "white single-color capsule drugs," "red and white bicolor capsule drugs," "half tablets," "quarter tablets," "white plain drugs," or "transparent plain drugs." Good too.
 薬剤識別器120は、入力された薬剤画像が薬種特定可能薬剤の画像である場合には、その薬剤の種類(薬種)を識別して薬種の推定結果を出力する。薬剤識別器120によって出力させる薬種の識別情報は、例えば、薬種ごとに定義された固有の識別符号であってよい。第2学習済みモデルTM2を作成するための学習方法及び薬剤識別器120による識別処理の内容について詳細は後述する。薬剤識別器120は、推定した薬種に固有の識別符号から不図示の薬剤マスタデータベースを検索し、該当する薬剤又は類似する薬剤についての薬剤情報を取得する。薬剤識別器120は本開示における「識別器」の一例である。 If the input drug image is an image of a drug whose drug type can be identified, the drug identifier 120 identifies the type of drug (drug type) and outputs the estimation result of the drug type. The identification information of the drug type output by the drug identifier 120 may be, for example, a unique identification code defined for each drug type. Details of the learning method for creating the second learned model TM2 and the content of the identification process by the drug discriminator 120 will be described later. The drug identifier 120 searches a drug master database (not shown) based on the identification code unique to the estimated drug type, and obtains drug information about the corresponding drug or similar drugs. Drug identifier 120 is an example of a "discriminator" in the present disclosure.
 薬剤識別器120による識別処理の結果は表示制御部124を介して表示部14Aに表示される。ユーザは表示部14Aに表示される識別結果を確認後、識別結果を確定させたり、識別結果を修正したり、あるいは、別途、テキスト検索を行うなどの対応が可能である。 The results of the identification process by the drug identifier 120 are displayed on the display section 14A via the display control section 124. After confirming the identification result displayed on the display unit 14A, the user can take actions such as finalizing the identification result, modifying the identification result, or performing a separate text search.
 テキスト検索部122は、入力部14B又はマイクロフォン18から検索キーの入力を受け付け、刻印テキストマスタのデータベース130にアクセスして該当する情報を検索し、検索結果を出力する。刻印テキストマスタは、様々な薬剤について刻印あるいは印字されている文字記号のテキスト情報と薬剤の種別とが紐付けされているデータを含む。データベース130に保存されている文字記号のテキスト情報は本開示における「文字記号情報」の一例である。 The text search unit 122 receives input of a search key from the input unit 14B or the microphone 18, accesses the stamped text master database 130, searches for relevant information, and outputs the search results. The stamped text master includes data in which text information of character symbols stamped or printed for various drugs is linked to the type of drug. The text information of characters and symbols stored in the database 130 is an example of "characters and symbols information" in the present disclosure.
 記憶装置104には、刻印デキストマスタのデータベース130と、各種の薬剤のマスタ画像を含むマスタ画像データベース131と、不図示の薬剤マスタデータベースとが保存されている。マスタ画像データベース131は、薬剤マスタデータベースに含まれていてもよい。刻印テキストマスタ、マスタ画像及び薬剤マスタ等のデータは、図示せぬグラウドサーバなど、ネットワーク上に保存されていてもよい。 The storage device 104 stores an engraved dextrose master database 130, a master image database 131 including master images of various drugs, and a drug master database (not shown). Master image database 131 may be included in a drug master database. Data such as the stamped text master, master image, and drug master may be stored on a network such as a cloud server (not shown).
 テキスト検索部122による検索結果は、表示制御部124を介して表示部14Aに表示される。また、マスタ画像データベース131から読み出されたマスタ画像は、表示制御部124を介して表示部14Aに表示される。 The search results by the text search section 122 are displayed on the display section 14A via the display control section 124. Further, the master image read from the master image database 131 is displayed on the display section 14A via the display control section 124.
 ユーザは表示部14Aに表示される検索結果やマスタ画像を確認後、薬種の識別結果を確定させたり、さらなる絞り込み検索をしたり、あるいは、再検索を行うなどの対応が可能である。データベース130は本開示における「第1のデータベース」の一例である。マスタ画像データベース131は本開示における「第2のデータベース」の一例である。 After checking the search results and master image displayed on the display unit 14A, the user can take actions such as confirming the drug type identification results, further narrowing down the search, or re-searching. Database 130 is an example of a "first database" in the present disclosure. Master image database 131 is an example of a "second database" in the present disclosure.
 記憶装置104は、識別結果記憶部132を含む。識別結果記憶部132は、薬剤識別器120による薬種の識別結果、及びテキスト検索部122による検索結果などを基に特定された薬種の識別結果などが記憶される記憶領域である。 The storage device 104 includes an identification result storage section 132. The identification result storage unit 132 is a storage area that stores the identification results of drug types by the drug identifier 120, the identification results of drug types specified based on the search results by the text search unit 122, and the like.
 〔学習フェーズの説明〕
 本実施形態に係る薬種識別装置100は、薬剤検出器114及び薬剤識別器120のそれぞれを次のように機械学習ベースで学習させ、これらを組み合わせて薬種識別装置100を構成する。図6は、薬剤検出器114と薬剤識別器120とを含む薬種識別装置100を実現するための機械学習による学習フェーズの概要を示すフローチャートである。
[Explanation of learning phase]
The drug type identification device 100 according to this embodiment causes each of the drug detector 114 and the drug identifier 120 to learn based on machine learning as described below, and configures the drug type identification device 100 by combining them. FIG. 6 is a flowchart outlining a learning phase by machine learning for realizing the drug type identification device 100 including the drug detector 114 and the drug identifier 120.
 図6に示す各ステップの処理は、例えば、コンピュータがプログラムを実行することによって実施され得る。薬種識別装置100を得るための機械学習方法は、薬剤検出器114の訓練に用いる訓練データを作成する工程(ステップS1:第1訓練データ作成工程)と、訓練データを用いて機械学習を行うことにより薬剤検出器114を訓練する工程(ステップS2:第1訓練工程)と、薬剤識別器120の訓練に用いる訓練データを作成する工程(ステップS3:第2訓練データ作成工程)と、訓練データを用いて機械学習を行うことにより薬剤識別器120を訓練する工程(ステップS4)と、ステップS2によって学習済みの薬剤検出器114とステップS4によって学習済みの薬剤識別器120とを用いて薬種識別装置100を構成する工程(ステップS5)と、を含む。 The processing of each step shown in FIG. 6 can be performed, for example, by a computer executing a program. The machine learning method for obtaining the drug type identification device 100 includes a step of creating training data used for training the drug detector 114 (step S1: first training data creation step), and performing machine learning using the training data. A process of training the drug detector 114 (step S2: first training process), a process of creating training data used for training the drug identifier 120 (step S3: second training data creation process), A process of training the drug identifier 120 by performing machine learning using the drug detector 114 (step S4), and a drug type identification device using the drug detector 114 trained in step S2 and the drug identifier 120 trained in step S4. 100 (step S5).
 教師あり学習に用いられる訓練データは、入力用のデータと、正解のデータ(教師データ)とを含む。訓練データの作成には、入力用のデータに対応する正解のデータ(教師データ)を作成することが含まれる。 The training data used for supervised learning includes input data and correct answer data (supervised data). Creating training data includes creating correct answer data (teacher data) corresponding to input data.
 薬剤検出器114を作成する処理(ステップS1、ステップS2)と、薬剤識別器120を作成する処理(ステップS3、ステップS4)とは、並列に実行されてもよいし、順次に実行されてもよい。各ステップ1~5の実行タイミングは、特に制限されず、連続的に実行されてもよいし、個々のステップの処理を別々の時期に、また別々のコンピュータを用いて実行してもよい。例えば、第1のコンピュータが薬剤検出器114を作成する処理(ステップS1、ステップS2)を実行し、第1のコンピュータと異なる第2のコンピュータが薬剤識別器120を作成する処理(ステップS3、ステップS4)を実行してもよい。また、第1のコンピュータが訓練データを作成する処理(ステップS1、S3)を実行し、第2のコンピュータが学習の処理(ステップS2、ステップS4)を実行してもよい。 The process of creating the drug detector 114 (step S1, step S2) and the process of creating the drug identifier 120 (step S3, step S4) may be executed in parallel or sequentially. good. The execution timing of each step 1 to 5 is not particularly limited, and may be executed continuously, or the processing of each step may be executed at different times or using different computers. For example, a first computer executes the process of creating the drug detector 114 (step S1, step S2), and a second computer different from the first computer executes the process of creating the drug identifier 120 (step S3, step S2). S4) may also be executed. Alternatively, the first computer may execute the process of creating training data (steps S1 and S3), and the second computer may execute the learning process (steps S2 and S4).
 ステップS1では、訓練用の画像に対して、画像内に含まれる個々の薬剤の位置情報と、クラスとについて教師データ(正解データ)を付与する。教師データとして与える薬剤の位置情報は、薬剤を囲むバウンディングボックスの位置を特定する情報であってもよいし、薬剤の形状そのもので塗りつぶしたマスクであってもよい。また、教師データとして付与するクラスのラベルは、薬剤の種類(薬種)を問わず、一律に「薬剤」としてよい。つまり、薬種特定可能薬剤及び薬種特定困難薬剤の両者について、分類ラベルを全て同一の「薬剤」として付与する。 In step S1, teacher data (correct data) is added to the training image regarding the position information and class of each drug included in the image. The drug position information provided as teacher data may be information specifying the position of a bounding box surrounding the drug, or may be a mask filled with the shape of the drug itself. Further, the class label assigned as the teacher data may be uniformly set to "drug" regardless of the type of drug (drug type). In other words, the same classification label is given to both drugs whose drug type can be identified and drugs whose drug type is difficult to identify.
 [薬剤検出器114の学習]
 薬剤検出器114では、入力された撮影画像から個々の薬剤の位置を特定して、薬剤領域を背景から分離し、切り出しを行うことを目的として物体位置情報と、クラス情報と、検出した物体(ここでは薬剤)の確からしさ等を推定する。物体位置情報は、例えば、「薬剤を囲む回転なしのバウンディングボックスの4点の頂点座標」、「薬剤を囲む回転なしのバウンディングボックスの中心座標、高さ、及び幅」、「薬剤を囲む回転ありのバウンディングボックスの中心座標、高さ、幅、及び回転角」、又は「薬剤の形状そのもので塗りつぶしたマスク」等であってよい。
[Learning of drug detector 114]
The drug detector 114 uses object position information, class information, and detected objects ( Here, we estimate the probability of drug use. The object position information includes, for example, "coordinates of the four vertices of a non-rotated bounding box surrounding the drug,""center coordinates, height, and width of a non-rotated bounding box surrounding the drug," and "rotation surrounding the drug." ``center coordinates, height, width, and rotation angle of the bounding box'' or ``a mask filled with the shape of the drug itself.''
 薬剤は楕円体の形状のものが多く存在し、楕円体の薬剤が斜め方向に縦に並んだ場合には「薬剤を囲む回転なしのバウンディングボックス」だと一つのバウンディングボックスに複数の薬剤が含まれてしまうことがあるため、物体位置情報は、「薬剤を囲む回転ありのバウンディングボックスの中心座標、高さ、幅、及び回転角」又は「薬剤の形状そのもので塗りつぶしたマスク」が好ましい。 Many drugs exist in the shape of an ellipsoid, and when ellipsoidal drugs are arranged vertically in a diagonal direction, multiple drugs are included in one bounding box if the ``bounding box surrounding the drug without rotation'' is used. Therefore, the object position information is preferably "center coordinates, height, width, and rotation angle of a rotating bounding box surrounding the drug" or "a mask filled with the shape of the drug itself."
 ステップS2では、ステップS1によって作成された訓練データのデータセットを用いて薬剤検出器114に適用される学習モデル(以下、第1学習モデルという。)を訓練する機械学習が行われる。第1学習モデルは、例えば、ニューラルネットワークを用いて構成される。物体検出に好適なネットワークモデルとして、例えば、畳み込みニューラルネットワーク(Convolutional neural network:CNN)を用いることができる。薬剤検出器114は、画像の入力を受けて、画像内の個々の薬剤に対して物体位置情報を出力するように訓練される。 In step S2, machine learning is performed to train a learning model (hereinafter referred to as the first learning model) applied to the drug detector 114 using the dataset of training data created in step S1. The first learning model is configured using, for example, a neural network. For example, a convolutional neural network (CNN) can be used as a network model suitable for object detection. Drug detector 114 is trained to receive image input and output object position information for individual drugs within the image.
 なお、薬剤検出器114によってマーカの検出も行う場合、第1学習モデルの訓練には、マーカの領域を正解データ(教師データ)として与えた訓練データを含むデータセットが必要である。薬剤検出器114の学習に用いる訓練データは本開示における「第1の訓練データ」の一例である。 Note that when the drug detector 114 also detects a marker, training of the first learning model requires a dataset that includes training data in which the marker region is given as correct data (teacher data). The training data used for learning the drug detector 114 is an example of "first training data" in the present disclosure.
 [薬剤識別器120の学習]
 薬剤識別器120に対しては、個々の薬剤の画像単位で画像が入力され、薬剤の種類又は薬剤が属するグループのクラス情報と、識別したクラスの確からしさ等を推定するように訓練される。
[Learning of drug identifier 120]
The drug identifier 120 is input with images of individual drugs, and is trained to estimate the class information of the type of drug or the group to which the drug belongs, and the likelihood of the identified class.
 薬剤識別器120の訓練データを作成する際には、薬種特定可能薬剤については、各薬剤に定められた一意の識別コードを正解ラベルとして付与する。一方、薬種特定困難薬剤については、薬剤が属するグループに対して識別コードを付与する。例えば、薬種特定困難薬剤については、「カプセル薬剤」、「無地薬剤」、「半錠剤」、又は「4分の1錠剤」等、薬種特定フェーズで処理フローを分岐させたいグループ単位で正解ラベルを付与する。なお、「カプセル薬剤」について、さらに「硬カプセル薬剤」、「軟カプセル薬剤」などの細かいグループに分けて正解ラベルを付与してもよい。 When creating training data for the drug identifier 120, for drugs whose drug type can be identified, a unique identification code determined for each drug is given as a correct label. On the other hand, for drugs whose drug type is difficult to identify, an identification code is assigned to the group to which the drug belongs. For example, for drugs whose drug type is difficult to identify, correct labels can be added for groups such as "capsule drug," "plain drug," "half tablet," or "quarter tablet," for which you want to branch the processing flow in the drug type identification phase. Give. Note that "capsule drug" may be further divided into smaller groups such as "hard capsule drug" and "soft capsule drug" and correct labels may be assigned.
 グループに対する判別性能を高めるために、薬剤識別器120へ入力として、刻印抽出画像、薬剤の外形画像、及び薬剤のサイズ情報等のうち少なくとも1つ好ましくは複数を組み合わせて用いることが好ましい。刻印抽出画像とは、薬剤の刻印部又は印字部のみを抽出し、主に黒の背景の上に刻印部又は印字部を白で表した画像である。薬剤識別器120の学習に用いる訓練データは本開示における「第2の訓練データ」の一例である。 In order to improve the discrimination performance for groups, it is preferable to use at least one of a stamp extraction image, a drug external shape image, drug size information, etc., preferably in combination, as input to the drug identifier 120. The stamp extraction image is an image in which only the stamped part or printed part of the medicine is extracted, and the stamped part or printed part is represented in white on a mainly black background. The training data used for learning the drug identifier 120 is an example of "second training data" in the present disclosure.
 図7は、薬種特定可能薬剤について教師データとして付与する識別コードの例を示す図である。薬種特定可能薬剤については、それぞれの薬剤に対して、薬種ごとに相異なる識別コードが付与される。図7中の「P000001」、「P000002」・・・「P009999」は、それぞれ異なる薬種に対応して一意に定義された識別コードの例を表している。図7に示す識別コードは本開示における「種類単位」のラベルの一例である。 FIG. 7 is a diagram illustrating an example of an identification code provided as training data for a drug whose drug type can be identified. For drugs whose drug type can be identified, a different identification code is assigned to each drug type. “P000001”, “P000002”, . . . “P009999” in FIG. 7 represent examples of identification codes uniquely defined corresponding to different drug types. The identification code shown in FIG. 7 is an example of a "type unit" label in the present disclosure.
 図8は、薬種特定困難薬剤について教師データとして付与する識別コードの例を示す図である。薬種特定困難薬剤については、その薬剤が属するグループに対して識別コードを付与する。例えば、カプセル薬剤の画像に対しては、薬種によらず「カプセル薬剤」のグループを表す「G000001」の識別コードを付与する。また、無地薬剤の画像に対しては、薬種によらず「無地薬剤」のグループを表す「G000002」の識別コードを付与する。半錠剤(2分の1錠)の画像に対しては、薬種によらず「半錠剤」のグループを表す「G000003」の識別コードを付与する。4分の1錠剤の画像に対しては薬種によらず「4分の1錠剤」のグループを表す「G000004」の識別コードを付与する。なお、半錠剤と4分の1錠剤とを同じように取り扱いたい場合は、これらに対して同一の識別コードを付与してもよい。あるいはまた、半錠剤と4分の1錠剤とのそれぞれに別々の識別コードを付与し、プログラム側で「G000003」と「G000004」との識別コードに対して同一の処理を行ってもよい。 FIG. 8 is a diagram showing an example of an identification code provided as training data for a drug whose drug type is difficult to identify. For drugs that are difficult to identify, an identification code is assigned to the group to which the drug belongs. For example, an identification code of "G000001" representing the group of "capsule drugs" is assigned to an image of a capsule drug, regardless of the drug type. Furthermore, an identification code of "G000002" representing the "plain drug" group is assigned to images of plain drugs, regardless of the drug type. For images of half tablets (half tablets), an identification code of "G000003" representing the group of "half tablets" is assigned regardless of the drug type. For images of quarter tablets, an identification code of "G000004" representing the group of "quarter tablets" is assigned regardless of the drug type. Note that if it is desired to handle half tablets and quarter tablets in the same way, the same identification code may be given to them. Alternatively, separate identification codes may be assigned to each of the half tablet and quarter tablet, and the program may perform the same processing on the identification codes "G000003" and "G000004."
 また、グループに対して付与する識別コードについては、階層構造によりグループを細かく分類したサブグループの識別コードを定義してもよい。 Furthermore, regarding the identification code given to a group, identification codes of subgroups that are finely classified into groups according to a hierarchical structure may be defined.
 図9は、カプセル薬剤について教師データとして付与する識別コードの他の例を示す図である。例えば、カプセル薬剤について、カプセル色や印字文字色によって、より細かくグループ分けしておくことにより、薬剤識別器120の推論の精度向上が期待される。また、このような細かなグループ分けを行うことにより、カプセル検索の際に検索属性としてユーザビリティを向上するなど、鑑別処理に活用してもよい。図9においては、「カプセル薬剤」のグループにおいて、カプセル色が単色である場合と、2色の組み合わせである場合との分類(サブグループ)が定められた例が示されている。また、単色カプセルのグループに関しては、カプセルの色によってさらに分類分けされてよい。単色かつ白色のカプセル薬剤の画像に対しては、例えば、単色白色のカプセル薬剤のグループを表す「G000010」の識別コードを付与する。単色かつ青色のカプセル薬剤の画像に対しては、単色青色のカプセル薬剤のグループを表す「G000011」の識別コードを付与する。図9には示さないが、他の色の単色のカプセル薬剤の画像についても同様に、それぞれのグループを表す個別の識別コードを付与してよい。 FIG. 9 is a diagram showing another example of an identification code given as training data for a capsule drug. For example, it is expected that the inference accuracy of the drug identifier 120 will be improved by dividing capsule drugs into more finely divided groups based on capsule color or printed character color. Further, by performing such detailed grouping, usability may be improved as a search attribute during capsule search, and it may be utilized for discrimination processing. In FIG. 9, an example is shown in which classifications (subgroups) are defined for the group of "capsule drugs" into cases where the capsule color is a single color and cases where the capsule color is a combination of two colors. Furthermore, groups of single-color capsules may be further classified according to the color of the capsules. For example, an identification code of "G000010" representing a group of monochromatic and white capsule drugs is assigned to an image of monochrome and white capsule drugs. An identification code of "G000011" representing a group of monochrome blue capsule drugs is assigned to an image of monochrome blue capsule drugs. Although not shown in FIG. 9, individual identification codes representing each group may be similarly assigned to images of monochromatic capsule medicines of other colors.
 また、2色カプセルのグループに関しては、カプセルの色の組み合わせによってさらに分類分けされてよい。例えば、赤色と白色との2色のカプセル薬剤の画像に対しては、赤白2色のカプセル薬剤のグループを表す「G000100」の識別コードを付与する。青色と白色との2色のカプセル薬剤の画像に対しては、青白2色のカプセル薬剤のグループを表す「G000101」の識別コードを付与する。図9には示さないが、他の二色の組み合わせのカプセル薬剤の画像についても同様に、それぞれのグループを表す個別の識別コードを付与してよい。 Furthermore, the group of two-color capsules may be further classified based on the combination of capsule colors. For example, for an image of two-colored capsule medicines, red and white, an identification code of "G000100" representing a group of red and white two-color capsule medicines is assigned. An identification code of "G000101" representing a group of blue and white capsule medicines is assigned to an image of capsule medicines of two colors, blue and white. Although not shown in FIG. 9, individual identification codes representing each group may be similarly assigned to images of capsule medicines with other two-color combinations.
 図9では、カプセル薬剤の例を説明したが、無地錠剤についても同様に、色や形状によって細かくグループ分けして識別コードを付与してもよい。 In FIG. 9, an example of capsule medicine has been described, but plain tablets may also be divided into groups according to color or shape and identification codes may be assigned.
 図10は、無地薬剤について教師データとして付与する識別コードの他の例を示す図である。図10においては、無地薬剤の形状と色との組み合わせにより無地薬剤をさらに細かくグループ分けする場合の例を示す。図10では、無地薬剤の形状が円形である場合と、楕円体である場合との例が示されている。 FIG. 10 is a diagram showing another example of the identification code given as teacher data for plain drugs. FIG. 10 shows an example in which the plain drugs are further divided into groups based on the combination of the shape and color of the plain drugs. FIG. 10 shows examples in which the shape of the plain drug is circular and ellipsoidal.
 図10のように、薬剤の形状が円形で、かつ薬剤の色が白色の無地薬剤の画像に対しては、例えば、円形白色の無地薬剤のグループを表す「G001001」の識別コードを付与する。薬剤の形状が円形で、かつ薬剤の色が黄色の無地薬剤の画像に対しては、円形黄色の無地薬剤のグループを表す「G001002」の識別コードを付与する。図10には示さないが、薬剤の形状が円形で、他の色の無地薬剤の画像についても同様に、それぞれのグループを表す個別の識別コードを付与してよい。 As shown in FIG. 10, for an image of a plain medicine with a circular medicine shape and a white medicine color, for example, an identification code of "G001001" representing a group of circular white medicines is given. An identification code of "G001002" representing a group of circular yellow plain drugs is assigned to an image of a plain drug that is circular in shape and yellow in color. Although not shown in FIG. 10, individual identification codes representing the respective groups may be similarly assigned to images of plain drugs having circular shapes and other colors.
 また、薬剤の形状が楕円体で、かつ薬剤の色がオレンジ色の無地薬剤の画像に対しては、例えば、楕円体かつオレンジ色の無地薬剤のグループを表す「G002001」の識別コードを付与する。薬剤の形状が楕円体で、かつ薬剤の色が透明色の無地薬剤の画像に対しては、楕円体かつ透明色の無地薬剤のグループを表す「G002002」の識別コードを付与する。図10には示さないが、薬剤の形状が楕円体で、他の色の無地薬剤の画像についても同様に、それぞれのグループを表す個別の識別コードを付与してよい。また、図示しない形状と色との組み合わせの無地薬剤の画像についても同様に、それぞれのグループを表す個別の識別コードを付与してよい。 Furthermore, for an image of a plain drug with an ellipsoidal shape and an orange drug color, for example, an identification code of "G002001" representing a group of ellipsoidal and orange plain drugs is assigned. . An identification code of "G002002" representing a group of ellipsoidal and transparent plain drugs is assigned to an image of a plain drug whose shape is an ellipsoid and whose color is transparent. Although not shown in FIG. 10, individual identification codes representing the respective groups may be similarly assigned to images of plain drugs of other colors in which the drugs are ellipsoidal in shape. Similarly, individual identification codes representing each group may be assigned to images of plain medicines in combinations of shapes and colors (not shown).
 [薬剤識別器120への入力情報について]
 スマートフォン10を用いて様々な環境下で撮影を行う場合、撮影環境の影響により、色情報は必ずしも信頼できる情報源とならない場合がある。このため、薬種特定可能薬剤について薬剤単位で識別を行う場合には、色情報を排除した刻印抽出画像が重要になる場合が多い。薬剤識別器120においては、刻印抽出画像をより重視して識別を行うことが好ましい。元画像を入力し刻印抽出画像を出力する学習済みの機械学習モデルを使用し、元画像を入力し推論を行うことによって刻印抽出画像を取得してもよい。
[About input information to drug identifier 120]
When photographing is performed using the smartphone 10 under various environments, color information may not necessarily be a reliable information source due to the influence of the photographing environment. For this reason, when identifying drugs that can be identified by drug type, a stamp extraction image that excludes color information is often important. In the drug identifier 120, it is preferable to perform identification with more emphasis on the stamp extraction image. The stamp extracted image may be obtained by inputting the original image and performing inference using a trained machine learning model that inputs the original image and outputs the stamp extracted image.
 その一方で、撮影環境の影響を大きく受けたとしても、非常に珍しい色の薬剤等、色情報が参考になる場合もあり得る。また、薬剤の形状情報も、撮影環境の影響を受けにくい頑健な情報源となり得る。薬剤の外形画像は、有用な形状情報となり得る。 On the other hand, even if the image is greatly affected by the shooting environment, color information may still be helpful, such as when it comes to drugs with very rare colors. Furthermore, drug shape information can also be a robust information source that is not easily affected by the imaging environment. An image of the external shape of a drug can be useful shape information.
 また、非機械学習的な手法によって取得した薬剤の長径及び短径の大きさの情報(サイズ情報)も撮影環境の影響を受けにくい頑健な情報源となり得る。例えば、OpenCVなどを用いて、薬剤の長径及び短径を抽出し、その数値情報を用いることで撮影環境の影響を受け難い頑健な情報源となる。このように、撮影画像から薬剤ごとに計測されるサイズ情報は、薬種特定困難薬剤にとっても膨大な薬種を特定する重要な情報源となる。特に、識別記号等が印字されていないカプセル薬剤あるいは無地錠剤などの薬種特定困難薬剤にとっては、サイズ情報がグループ特定の非常に重要な情報源となり得る。 Furthermore, information on the length and breadth of the drug's major axis and minor axis (size information) obtained by non-machine learning methods can also be a robust information source that is not easily affected by the imaging environment. For example, by extracting the long axis and short axis of the drug using OpenCV and using the numerical information, it becomes a robust information source that is not easily affected by the imaging environment. In this way, the size information measured for each drug from the photographed image becomes an important information source for identifying a huge number of drug types, even for drugs that are difficult to identify. In particular, size information can be an extremely important source of information for group identification for drugs that are difficult to identify, such as capsule drugs without printed identification symbols or plain tablets.
 これらの事実を考慮すると、薬剤識別器120への入力としては、撮影画像から薬剤単位で切り出された領域画像(薬剤画像)である元画像と、元画像から抽出された刻印抽出画像と、外形画像と、サイズ情報とのうち1つ以上、好ましくは複数を組み合わせたものとすることが好ましい。なお、「刻印抽出画像」という用語は、刻印に限らず錠剤又はカプセルに付された印字を抽出した画像も含む。刻印抽出画像は文字記号抽出画像と言い換えてもよい。「刻印」という用語は、文脈から必要に応じて、錠剤又はカプセル薬剤についての「印字」、「印字記号」、「識別記号」又は「文字記号」などの概念を含む用語として理解してよい。 Considering these facts, the input to the drug identifier 120 is the original image, which is a region image (drug image) cut out for each drug from the captured image, the stamp extraction image extracted from the original image, and the external shape. It is preferable to use a combination of one or more of the image and size information, preferably a plurality of them. Note that the term "mark extraction image" includes not only a stamp but also an image obtained by extracting a print attached to a tablet or a capsule. The stamp extraction image may also be referred to as a character symbol extraction image. The term "imprint" may be understood as a term including concepts such as "printing", "print symbol", "identification symbol" or "letter symbol" on the tablet or capsule drug, depending on the context.
 色情報を含む元画像、刻印抽出画像、外形画像、及びサイズ情報の全ての情報を組み合わせて薬剤識別器120に入力する構成であってもよいし、これらのうちの一部の情報を組み合わせて薬剤識別器120に入力する構成であってもよい。 The configuration may be such that all of the information including the original image including color information, the stamp extraction image, the external shape image, and the size information is input into the drug identifier 120, or some of these information may be combined. The configuration may be such that the information is input to the drug identifier 120.
 図11は、薬剤識別器120に入力する情報の例を示す概念図である。元画像Orgは、薬剤単位の薬剤画像であり、撮影画像から薬剤ごとに切り出された個々の薬剤画像に相当する。刻印抽出画像Egmは、元画像Orgから刻印を抽出した画像である。刻印抽出画像Egmは、抽出された刻印の視認性を高める強調処理を施した画像であってもよい。外形画像Otwは、元画像Orgから抽出された薬剤の外形を示す画像である。なお、外形画像Otwは、薬剤の厳密な輪郭を示すものに限らず、輪郭に準じた概形を示すものであってもよい。サイズ情報は、例えば、元画像Org又は外形画像Otwを基に、薬剤の長径及び短径を計測することによって得られる数値情報である。 FIG. 11 is a conceptual diagram showing an example of information input to the drug identifier 120. The original image Org is a drug image for each drug, and corresponds to an individual drug image cut out for each drug from the photographed image. The stamp extraction image Egm is an image in which a stamp is extracted from the original image Org. The stamp extraction image Egm may be an image subjected to emphasis processing to increase the visibility of the extracted stamp. The external shape image Otw is an image showing the external shape of the drug extracted from the original image Org. Note that the external shape image Otw is not limited to an image showing a strict outline of the medicine, but may be an image showing an approximate shape according to the outline. The size information is, for example, numerical information obtained by measuring the major axis and minor axis of the drug based on the original image Org or the external image Otw.
 撮影環境に対して頑健なシステムを構築するために、これら複数の情報の組み合わせを薬剤識別器120への入力情報として用いる態様が好ましい。 In order to construct a system that is robust to the imaging environment, it is preferable to use a combination of these multiple pieces of information as input information to the drug identifier 120.
 薬剤識別器120に適用される学習モデルは、例えば、ニューラルネットワークを用いて構成される。画像認識に好適なネットワークモデルとして、例えば、CNNを用いることができる。ニューラルネットワークへの入力として、元画像、刻印抽出画像、及び外形画像のうち2つ以上の画像の組み合わせを入力する場合、これら複数の画像をチャンネル方向に結合して入力する方式と、画像上(画像の面内)で横方向に結合ないし縦方向に結合して合成画像として入力する方式とがあり得る。 The learning model applied to the drug identifier 120 is configured using, for example, a neural network. For example, CNN can be used as a network model suitable for image recognition. When inputting a combination of two or more images among the original image, stamp extraction image, and outline image as input to the neural network, there are two methods: combining these multiple images in the channel direction and inputting them ( There may be a method in which the images are combined horizontally or vertically (within the plane of the image) and input as a composite image.
 ニューラルネットワークにおいては、入力画像サイズは固定値となる制約を受ける場合があるため、入力画像の方式として下記の2つの方式があり得る。 In a neural network, the input image size may be subject to a fixed value constraint, so the following two methods may be available as input image methods.
 [方式1]第1の方式は、ニューラルネットワークの入力層が受け付ける入力画像サイズに合わせて画像を拡大又は縮小する方式である。図12に、第1の方式による入力情報の例を示す。 [Method 1] The first method is a method of enlarging or reducing the image according to the input image size accepted by the input layer of the neural network. FIG. 12 shows an example of input information according to the first method.
 第1の方式では、ニューラルネットワークが受け付ける入力画像サイズの上限まで各画像を拡大又は縮小して入力に投入する。この画像の拡大又は縮小の処理(以下、「リサイズ処理」という。)において使用した画像の拡大率又は縮小率の情報は、その後の処理で必要になった場合に備えて記憶しておく。第1の方式の場合、リサイズ処理に適用した倍率情報が記憶され、ニューラルネットワークの入力情報として、元画像Org1、刻印抽出画像Egm1、及び外形画像Otw1のうちの1つ以上の画像と、サイズ情報との組み合わせに加えて、必要に応じてリサイズ処理の倍率情報が用いられる。ここに示す元画像Org1は、撮影画像の標準化画像から切り出された薬剤単位の画像を、ニューラルネットワークの入力画像サイズに合わせてリサイズ処理したものである。また、元画像Org1から刻印を抽出する処理を行うことによって刻印抽出画像Egm1が得られる。元画像Org1から薬剤の外形を抽出する処理を行うことによって外形画像Otw1が得られる。 In the first method, each image is enlarged or reduced to the upper limit of the input image size accepted by the neural network and inputted. Information on the image enlargement or reduction ratio used in this image enlargement or reduction processing (hereinafter referred to as "resizing processing") is stored in case it is needed in subsequent processing. In the case of the first method, magnification information applied to the resizing process is stored, and one or more images of the original image Org1, the engraving extraction image Egm1, and the outer shape image Otw1, and size information are input to the neural network. In addition to the combination, magnification information for resizing processing is used as necessary. The original image Org1 shown here is obtained by resizing an image of each drug unit cut out from the standardized image of the captured image to match the input image size of the neural network. Furthermore, a stamp extraction image Egm1 is obtained by performing a process of extracting a stamp from the original image Org1. Outline image Otw1 is obtained by performing processing to extract the outer shape of the medicine from original image Org1.
 第1の方式によれば、例えば、小さい錠剤で刻印文字が小さい又は細かい場合に、画像が拡大されてニューラルネットワークに入力されるため推論(識別)精度が向上するという利点がある。また、第1の方式によれば、ニューラルネットワークの入力画像サイズを小さめに設計でき、実行時間の短縮が期待できる。つまり、世の中に実在する薬剤の最大のサイズに制約されず、ニューラルネットワークの入力画像サイズを認識性能に適切なサイズに設計できるため、無駄なデータの処理が抑制される。 According to the first method, for example, when the engraved characters are small or detailed on a small tablet, the image is enlarged and input to the neural network, which has the advantage of improving inference (identification) accuracy. Furthermore, according to the first method, the input image size of the neural network can be designed to be smaller, and a reduction in execution time can be expected. In other words, the input image size of the neural network can be designed to be an appropriate size for recognition performance without being constrained by the maximum size of drugs that exist in the world, thereby suppressing unnecessary data processing.
 その一方で、第1の方式の場合、ニューラルネットワークの入出力時に画像のリサイズ処理等が行われる点で、処理が多少煩雑になる。また、後の処理(錠剤の大きさに比例した画像付きでユーザに薬剤識別結果を提示する場合等)で必要になる場合に備えて、拡大/縮小率の情報(倍率情報)を記憶しておく必要がある。 On the other hand, in the case of the first method, processing is somewhat complicated in that image resizing processing is performed during input/output of the neural network. In addition, information on the enlargement/reduction ratio (magnification information) is stored in case it is needed in later processing (such as when presenting drug identification results to the user with an image proportional to the size of the tablet). It is necessary to keep it.
 [方式2]第2の方式は、ニューラルネットワークの入力層が受け付ける入力画像サイズの画像中心位置に、そのままの画像サイズで(拡大/縮小処理を行わずに)画像を貼り付けて入力する方式である。この場合、ニューラルネットワークに対する入力画像サイズを予め決めておき、その受け入れ可能な入力画像サイズの入力層に、撮影画像の標準化画像から切り出した元画像と同じものを入力する。標準化された元画像は、実際の薬剤の大きさと対応関係が把握されている画像である。 [Method 2] The second method is a method in which the image is pasted and input at the same image size (without enlarging/reducing processing) at the center position of the image of the input image size accepted by the input layer of the neural network. be. In this case, the input image size to the neural network is determined in advance, and the same original image cut out from the standardized image of the photographed image is input to the input layer of the acceptable input image size. The standardized original image is an image whose correspondence with the actual size of the drug is known.
 図13に、第2の方式による入力情報の例を示す。第2の方式によれば、画像のリサイズ処理が不要である。したがって、第2の方式の場合、拡大/縮小率を示す倍率情報の入力も不要である。第2の方式では、ニューラルネットワークの入力情報として、元画像Org2、刻印抽出画像Egm2、及び外形画像Otw2のうちの1つ以上の画像と、サイズ情報との組み合わせを用いることができる。また、第2の方式では、元画像Org2から抽出される外形画像Otw2自体に実質的に薬剤の大きさを示す情報も含まれるため、外形画像Otw2を入力に用いる場合、長径及び短径の数値情報は必ずしも必要でないという利点がある。 FIG. 13 shows an example of input information according to the second method. According to the second method, image resizing processing is not necessary. Therefore, in the case of the second method, there is no need to input magnification information indicating the enlargement/reduction ratio. In the second method, a combination of one or more of the original image Org2, the stamp extraction image Egm2, and the outline image Otw2 and size information can be used as input information to the neural network. In addition, in the second method, since the outline image Otw2 itself extracted from the original image Org2 includes information that substantially indicates the size of the drug, when the outline image Otw2 is used for input, the numerical values of the major axis and the minor axis are The advantage is that information is not always necessary.
 その一方で、第2の方式の場合、ニューラルネットワークが受け付ける入力画像サイズが世の中に存在する最大の薬剤サイズによって決定されるため、特に小さな錠剤等において、錠剤の周囲に余分な空間ができてしまい、処理に無駄が発生し得る。また、ニューラルネットワークの受け付け入力画像サイズが第1の方式よりも大きくなるため、第1の方式と比べて実行時間が長くなり得る。さらに、第2の方式の場合、小さな錠剤や刻印文字が細かい錠剤をそのままの大きさで処理するため、これらの錠剤の識別精度が第1の方式よりも低くなる可能性がある。 On the other hand, in the case of the second method, the input image size that the neural network accepts is determined by the largest drug size that exists in the world, so extra space is created around the tablet, especially for small tablets. , there may be waste in processing. Furthermore, since the input image size accepted by the neural network is larger than that of the first method, the execution time may be longer than that of the first method. Furthermore, in the case of the second method, small tablets and tablets with finely engraved characters are processed as they are, so the identification accuracy of these tablets may be lower than that of the first method.
 第1の方式と第2の方式とを比較すると、スマートフォン10を用いた薬種の識別には、第1の方式の方がより好ましい方式である。 Comparing the first method and the second method, the first method is a more preferable method for identifying drug types using the smartphone 10.
 〔薬種特定困難薬剤の入力情報の例〕
 図14~図16に、薬種特定困難薬剤についての入力情報の例を示す。ここでは、第1の方式によって薬種特定困難薬剤の情報をニューラルネットワークに入力する場合の例を示す。
[Example of input information for drugs whose drug type is difficult to identify]
FIGS. 14 to 16 show examples of input information regarding drugs whose drug type is difficult to identify. Here, an example will be shown in which information about a drug whose drug type is difficult to identify is input to the neural network using the first method.
 図14は、カプセルに識別記号が印字されているカプセル薬剤(識別記号有り)の場合における入力情報の例である。識別記号有りのカプセル薬剤では、図12と同様に、ニューラルネットワークへの入力として、元画像Org3と、刻印抽出画像Egm3と、外形画像Otw3とのうちの1つ以上の画像の組み合わせが入力される。また、画像の他に、元画像Org3から計測されたカプセル薬剤の大きさ(長径及び短径)の数値情報が入力され得る。さらに、これらの情報に加え、リサイズ処理の倍率情報が入力され得る。刻印抽出画像Egm3は、元画像Org3にから抽出された識別記号の画像である。 FIG. 14 is an example of input information in the case of a capsule drug (with identification symbol) in which an identification symbol is printed on the capsule. For capsule medicines with identification symbols, a combination of one or more of the original image Org3, the stamp extraction image Egm3, and the external shape image Otw3 is input to the neural network as in FIG. 12. . In addition to the image, numerical information on the size (longer axis and shorter axis) of the capsule medicine measured from the original image Org3 can be input. Furthermore, in addition to these pieces of information, magnification information for resizing processing may be input. The stamp extraction image Egm3 is an image of the identification symbol extracted from the original image Org3.
 図15は、識別記号が無いカプセル薬剤の場合の入力情報の例である。元画像Org4に識別記号が写っていない識別記号無しのカプセル薬剤は、もともとカプセルに識別記号が印字されていないカプセル薬剤である場合、又は、カプセルに識別記号があっても撮影の際に印字が隠れた状態で撮影されたことにより元画像Org4に識別記号が写っていない場合があり得る。 FIG. 15 is an example of input information for a capsule drug without an identification symbol. A capsule drug without an identification symbol that does not have an identification symbol in the original image Org4 is a capsule drug that does not originally have an identification symbol printed on the capsule, or even if there is an identification symbol on the capsule, the printing was not done at the time of photographing. There may be cases where the identification symbol is not captured in the original image Org4 because it was photographed in a hidden state.
 識別記号無しのカプセル薬剤では、元画像Org4と、刻印抽出画像Egm4と、外形画像Otw4とのうちの1つ以上の画像の組み合わせが入力される。ただし、識別記号無しのカプセル薬剤では、刻印抽出画像Egm4は識別記号についての情報を何も含んでいない画像となる。外形画像Otw4は元画像Org4に写るカプセル薬剤の形状を抽出した画像である。また、図14と同様に、これら画像の他に、元画像Org4から計測されたカプセル薬剤の大きさ(長径及び短径)の数値情報が入力され得る。さらに、これらの情報に加え、リサイズ処理の倍率情報が入力され得る。 For a capsule medicine without an identification symbol, a combination of one or more of the original image Org4, the stamp extraction image Egm4, and the external shape image Otw4 is input. However, in the case of a capsule medicine without an identification mark, the stamp extraction image Egm4 is an image that does not include any information about the identification mark. The external shape image Otw4 is an image obtained by extracting the shape of the capsule medicine shown in the original image Org4. Further, similarly to FIG. 14, in addition to these images, numerical information on the size (longer axis and shorter axis) of the capsule medicine measured from the original image Org4 can be input. Furthermore, in addition to these pieces of information, magnification information for resizing processing may be input.
 図16は、半錠剤の場合の入力情報の例である。半錠剤の場合も同様に、元画像Org5と、元画像Org5から抽出された刻印抽出画像Egm5と、外形画像Otw5とのうちの1つ以上の画像の組み合わせが入力される。また、画像の他に、元画像Org5から計測された半錠剤の大きさ(長径及び短径)の数値情報と、リサイズ処理の倍率情報との組み合わせが入力され得る。 FIG. 16 is an example of input information for half tablets. Similarly, in the case of a half tablet, a combination of one or more of the original image Org5, the stamp extraction image Egm5 extracted from the original image Org5, and the external shape image Otw5 is input. In addition to the image, a combination of numerical information on the size of the half tablet (longer axis and shorter axis) measured from the original image Org5 and magnification information for resizing processing can be input.
 図17は、機械学習システム150の機能的構成を示すブロック図である。ここでは、図12で説明した入力情報の組み合わせを学習モデル151に入力する場合の例を示す。 FIG. 17 is a block diagram showing the functional configuration of the machine learning system 150. Here, an example will be shown in which the combination of input information described in FIG. 12 is input to the learning model 151.
 機械学習システム150は、薬剤識別器120に適用される第2学習済みモデルTM2を生成する装置であり、1つ以上のコンピュータを含むコンピュータシステムを用いて実現される。機械学習システム150は、学習モデル151と、損失演算部152と、オプティマイザ154とを含む。学習モデル151には、CNNなどのニューラルネットワークが用いられる。 The machine learning system 150 is a device that generates a second trained model TM2 applied to the drug identifier 120, and is realized using a computer system including one or more computers. Machine learning system 150 includes a learning model 151, a loss calculation unit 152, and an optimizer 154. The learning model 151 uses a neural network such as CNN.
 学習モデル151は、入力情報として、薬剤DRjの領域画像である薬剤画像IMjと、刻印抽出画像IM1jと、外形画像IM2jと、薬剤の大きさ(サイズ)を示す数値情報であるサイズ情報SZjと、リサイズ処理の倍率情報MGjとを組み合わせた情報の入力を受け付け、薬剤DRjの種類又は薬剤DRjが属するグループの推論結果PRjを出力する。添字のjは、訓練データのインデックス番号を表す。 The learning model 151 receives, as input information, a drug image IMj that is a region image of the drug DRj, a stamp extraction image IM1j, an outline image IM2j, and size information SZj that is numerical information indicating the size of the drug. It accepts the input of information combined with the magnification information MGj of the resizing process, and outputs the inference result PRj of the type of drug DRj or the group to which the drug DRj belongs. The subscript j represents the index number of the training data.
 図17に示す機械学習システム150は、学習モデル151の前段に、刻印抽出部140と、外形抽出部142と、サイズ計測部144とを備える。刻印抽出部140は、薬剤画像IMjから刻印又は印字の文字記号を抽出し、抽出した文字記号の画像である刻印抽出画像IM1jを生成する。刻印抽出部140は、入力された画像の薬剤領域を処理して薬剤DRjの外形エッジ情報を排し、文字記号を抽出する。刻印抽出画像IM1jは、刻印部分又は印字部分の輝度が、刻印部分又は印字部分以外の部分の輝度よりも相対的に高く表現されることで、文字記号が強調された画像である。 The machine learning system 150 shown in FIG. 17 includes a stamp extraction section 140, an external shape extraction section 142, and a size measurement section 144 before the learning model 151. The stamp extracting unit 140 extracts a stamp or printed character symbol from the drug image IMj, and generates a stamp extraction image IM1j that is an image of the extracted character symbol. The stamp extraction unit 140 processes the drug region of the input image, eliminates external edge information of the drug DRj, and extracts character symbols. The stamp extraction image IM1j is an image in which the character symbol is emphasized by expressing the luminance of the stamped portion or the printed portion relatively higher than the luminance of the portion other than the stamped portion or the printed portion.
 外形抽出部142は、薬剤画像IMjから薬剤DRjの外形を抽出し、薬剤DRjの外形を示す画像である外形画像IM2jを生成する。サイズ計測部144は、薬剤画像IMj及び/又は外形画像IM2jから薬剤DRjの大きさを計測し、長径及び短径のそれぞれの寸法を示すサイズ情報SZjを生成する。 The outer shape extraction unit 142 extracts the outer shape of the drug DRj from the drug image IMj, and generates an outer shape image IM2j that is an image showing the outer shape of the drug DRj. The size measuring unit 144 measures the size of the drug DRj from the drug image IMj and/or the external shape image IM2j, and generates size information SZj indicating the respective dimensions of the major axis and the minor axis.
 機械学習システム150では、薬剤画像IMjからこれらの情報を生成して学習モデル151に入力する構成を採用しているが、予め訓練データを準備する段階で刻印抽出画像IM1j、外形画像IM2j、及びサイズ情報SZjの一部又は全部を作成しておき、訓練データのデータセットに含めておいてもよい。その場合、刻印抽出部140、外形抽出部142、及びサイズ計測部144の一部又は全部は、機械学習システム150において不要である。 The machine learning system 150 adopts a configuration in which this information is generated from the drug image IMj and input into the learning model 151. However, in the stage of preparing training data in advance, the engraving extraction image IM1j, the external shape image IM2j, and the size Part or all of the information SZj may be created in advance and included in the training data dataset. In that case, part or all of the stamp extraction section 140, the external shape extraction section 142, and the size measurement section 144 are unnecessary in the machine learning system 150.
 損失演算部152は、学習モデル151から出力される推論結果と、入力情報に対応付けされている正解データ(教師データ)GTjとを基に、両者間の損失値(ロス)を算出する。 The loss calculation unit 152 calculates a loss value (loss) between the inference result output from the learning model 151 and the correct data (teacher data) GTj associated with the input information.
 オプティマイザ154は、学習モデル151が出力する推論結果PRjが正解データGTjに近づくように、学習モデル151の出力と、正解の教師信号との誤差を示す損失値の演算結果に基づき、学習モデル151のパラメータの更新量を決定し、学習モデル151のパラメータの更新処理を行う。オプティマイザ154は、勾配降下法などのアルゴリズムに基づきパラメータの更新を行う。学習モデル151のパラメータは、ニューラルネットワークの各層の処理に用いるフィルタのフィルタ係数(ノード間の結合の重み)及びノードのバイアスなどを含む。機械学習システム150は、複数の訓練データをまとめたミニバッチの単位で訓練データの取得とパラメータの更新とを実施してもよい。 The optimizer 154 adjusts the learning model 151 based on the calculation result of the loss value indicating the error between the output of the learning model 151 and the correct teacher signal so that the inference result PRj output by the learning model 151 approaches the correct answer data GTj. The update amount of the parameters is determined, and the parameters of the learning model 151 are updated. The optimizer 154 updates parameters based on an algorithm such as gradient descent. The parameters of the learning model 151 include filter coefficients (weights of connections between nodes) of filters used for processing each layer of the neural network, node biases, and the like. The machine learning system 150 may acquire training data and update parameters in units of mini-batches that are a collection of a plurality of training data.
 こうして、多数の訓練データを用いて機械学習が行われることにより、学習モデル151のパラメータが最適化され、目的とする推論性能を持つ学習モデル151が生成される。許容される推論精度が確認された学習済み(訓練済み)の学習モデル151は、薬剤識別器120の第2学習済みモデルTM2として用いられる。 In this way, by performing machine learning using a large amount of training data, the parameters of the learning model 151 are optimized, and a learning model 151 having the desired inference performance is generated. The learned (trained) learning model 151 for which acceptable inference accuracy has been confirmed is used as the second trained model TM2 of the drug discriminator 120.
 この場合、薬種識別装置100は、撮影画像から刻印抽出画像、外形画像、及びサイズ情報を得るために、例えば、図5で説明した薬剤領域切出部118と薬剤識別器120との間に、刻印抽出部140、外形抽出部142、及びサイズ計測部144と同様の処理部を備える構成とする。薬種識別装置100は本開示における「物体識別装置」の一例である。 In this case, in order to obtain a stamp extraction image, an external shape image, and size information from the photographed image, the drug type identification device 100 may, for example, insert a link between the drug region cutting unit 118 and the drug identifier 120 described in FIG. The configuration includes a processing section similar to the stamp extraction section 140, the external shape extraction section 142, and the size measurement section 144. The drug type identification device 100 is an example of an “object identification device” in the present disclosure.
 〔薬種識別装置100の活用フェーズ〕
 図18は、本実施形態に係る薬種識別装置100の動作を示すフローチャートである。ここでは、薬種識別装置100の活用態様の一例として、ある患者の持参薬を鑑別する場合を例に説明する。
[Utilization phase of drug type identification device 100]
FIG. 18 is a flowchart showing the operation of the drug type identification device 100 according to this embodiment. Here, as an example of how the medicine type identification device 100 is used, a case will be described in which medicines brought by a certain patient are identified.
 ステップS11において、ユーザは、識別しようとする複数の薬剤を同時に撮影する。ユーザは、同一服用時点等、薬学的意味のある単位で複数の薬剤を撮影することができる。例えば、ユーザは、患者の持参薬に含まれる一包化された薬剤を袋から取り出し、スマートフォン10のカメラ機能を使ってこれら複数の薬剤を同時に(まとめて)撮影する。プロセッサ102は、撮影によって得られた撮影画像を取得する。このとき撮影される複数の薬剤には、薬種特定可能薬剤及び薬種特定困難薬剤が混在する可能性がある。薬種特定可能薬剤は本開示における「種類特定可能物体」の一例であり、薬種特定困難薬剤は本開示における「種類特定困難物体」の一例である。 In step S11, the user simultaneously photographs multiple drugs to be identified. The user can take pictures of a plurality of drugs in pharmaceutically meaningful units, such as when the drug is taken at the same time. For example, the user takes out a package of medicines included in the patient's medicines from a bag, and uses the camera function of the smartphone 10 to simultaneously (collectively) photograph the plurality of medicines. The processor 102 acquires a photographed image obtained by photographing. There is a possibility that the plurality of drugs photographed at this time include drugs whose drug types can be identified and drugs whose drug types are difficult to identify. A drug whose drug type can be specified is an example of a "type-identifiable object" in the present disclosure, and a drug whose drug type is difficult to specify is an example of an "object whose type is difficult to specify" in the present disclosure.
 次いで、ステップS12において、プロセッサ102は、薬剤検出器114によって撮影画像から個々の薬剤を検出する。薬剤検出器114は、撮影画像から個々の薬剤単位で薬種特定可能薬剤及び薬種特定困難薬剤の検出を行う。薬剤検出器114は、例えば、「薬剤を囲む回転ありのバウンディングボックスの中心座標、高さ、幅、及び回転角」、又は「薬剤の形状そのもので薬剤領域を塗りつぶしたセグメンテーションマスク」を推定し、推定結果を出力する。薬剤検出器114による推定(検出)結果は、タッチパネルディスプレイ14に表示され、ユーザによる確認に供される。プロセッサ102は、タッチパネルディスプレイ14の入力部14B等から検出結果の修正の指示、又は検出結果を承認する(確定させる)指示の入力を受け付ける。薬剤検出器114の検出結果に過検出又は検出失敗(検出漏れ)などがある場合、ユーザはタッチパネルディスプレイ14の入力部14B等から検出結果を修正する指示を入力し、個々の薬剤の正しい領域を指定することができる。なお、検出結果の修正は、検出された領域単位又は薬剤単位で行うことができる。薬剤単位は本開示における「物体単位」の一例である。 Next, in step S12, the processor 102 uses the drug detector 114 to detect individual drugs from the captured image. The drug detector 114 detects drugs whose drug type can be identified and drugs whose drug type is difficult to identify on an individual drug basis from the captured image. The drug detector 114 estimates, for example, "the center coordinates, height, width, and rotation angle of a bounding box with rotation surrounding the drug" or "a segmentation mask that fills the drug area with the shape of the drug itself", Output the estimation results. The estimation (detection) result by the drug detector 114 is displayed on the touch panel display 14 for confirmation by the user. The processor 102 receives an input from the input unit 14B of the touch panel display 14 or the like for an instruction to modify the detection result or an instruction to approve (confirm) the detection result. If the detection results of the drug detector 114 include over-detection or detection failure (missing detection), the user inputs an instruction to correct the detection results from the input section 14B of the touch panel display 14, etc., and selects the correct area for each drug. Can be specified. Note that the detection results can be corrected for each detected area or for each drug. A drug unit is an example of an "object unit" in the present disclosure.
 ステップS13において、プロセッサ102は、薬剤検出器114による検出結果に過検出又は検出失敗があるか否かを判定する。薬剤検出器114による検出結果に過検出又は検出失敗があり、ステップS13の判定結果がYes判定である場合、プロセッサ102はステップS14に進み、ユーザから受け付けた指示に従い、薬剤の領域を修正する処理を行う。例えば、過検出した領域が含まれている場合、その領域を削除する処理が行われる。また、薬剤があるのに領域が検出されない検出失敗がある場合は、当該薬剤についての新規領域を追加する処理などが行われる。ステップS14の後、プロセッサ102は、ステップS15に進む。 In step S13, the processor 102 determines whether the detection results by the drug detector 114 include over-detection or detection failure. If there is overdetection or detection failure in the detection result by the drug detector 114 and the determination result in step S13 is Yes, the processor 102 proceeds to step S14 and corrects the drug area according to the instruction received from the user. I do. For example, if an overdetected area is included, processing is performed to delete that area. Furthermore, if there is a detection failure in which a region is not detected even though there is a drug, a process such as adding a new region for the drug is performed. After step S14, the processor 102 proceeds to step S15.
 また、ステップS13の判定結果がNo判定である場合、つまり、薬剤検出器114による検出結果に過検出又は検出失敗がない場合、プロセッサ102は、ステップS15に進む。ステップS15において、プロセッサ102は、画像内の薬剤毎に薬剤識別器120を用いて識別を行う。プロセッサ102は、検出された薬剤単位で薬剤画像の切り出しを行い、個々の薬剤画像を薬剤識別器120に投入して、薬剤の識別を行う。 Further, if the determination result in step S13 is No, that is, if there is no overdetection or detection failure in the detection result by the drug detector 114, the processor 102 proceeds to step S15. In step S15, the processor 102 uses the drug identifier 120 to identify each drug in the image. The processor 102 cuts out drug images for each detected drug, inputs each drug image into a drug identifier 120, and identifies the drug.
 ステップS15の処理内容については、図19を用いて後述するが、概要は次のとおりである。すなわち、薬種特定可能薬剤については、薬剤識別器120によって薬剤種類(薬種)単位での推論がなされることが期待される。薬剤識別器120によって得られた薬種の識別結果に対して、目視で薬剤が正しいことを確認できた場合は、推論した結果を確定する。その一方で、薬剤識別器120が間違って薬種特定困難薬剤のグループ単位で推論された場合は、他の上位推論候補に提示されている薬剤から選択するか、音声検索若しくはテキスト検索等によって薬種を特定する。 The processing content of step S15 will be described later using FIG. 19, but the outline is as follows. That is, for drugs whose drug type can be specified, it is expected that the drug identifier 120 will make inferences on a drug type (drug type) basis. If it is confirmed visually that the drug is correct based on the drug type identification result obtained by the drug identifier 120, the inferred result is confirmed. On the other hand, if the drug identifier 120 mistakenly infers a group of drugs whose drug type is difficult to identify, the drug type can be selected from among the drugs presented as other high-rank inference candidates, or the drug type can be selected by voice search, text search, etc. Identify.
 また、薬種特定可能薬剤については、薬剤識別器120によって薬剤が属するグループ単位での推論がなされることが期待される。薬種特定困難薬剤としてグループ単位で推論された場合は、当該薬剤の撮影画像の目視でその推論が正しいことを確認できた場合は、そのグループに対応して規定された薬種特定フローへと進む。例えば「カプセル薬剤」のグループであればカプセルに付された文字記号を撮影画像上で目視して、文字及び/又は記号のテキストをテキスト入力ないし音声入力し、刻印テキストマスタのデータベースを検索して、識別対象薬剤とマスタデータとを照合することにより、薬種を特定するなどの薬種特定フローに移行する。 Furthermore, for drugs whose drug type can be identified, it is expected that the drug identifier 120 will make inferences in units of groups to which the drug belongs. If it is inferred for each group as a drug that is difficult to identify, and if the inference is confirmed to be correct by visual inspection of the photographed image of the drug, the process proceeds to the drug type identification flow defined for that group. For example, if it is a group of "capsule medicines", you can visually check the character symbols attached to the capsules on the photographed image, input the text of the characters and/or symbols by text or voice, and search the engraving text master database. Then, by comparing the drug to be identified with the master data, the process moves to a drug type identification flow in which the drug type is specified.
 その一方で、薬剤識別器120の薬種特定困難薬剤に対する推論結果が間違っていた場合は、ユーザが推論結果を適宜修正し、適切な薬種特定フローへと進む(図19参照)。 On the other hand, if the inference result of the drug identifier 120 for a drug whose drug type is difficult to identify is wrong, the user appropriately corrects the inference result and proceeds to the appropriate drug type identification flow (see FIG. 19).
 ステップS16において、プロセッサ102は、画像内の全ての薬剤について薬種を確定したか否かを判定する。ステップS16の判定結果がNo判定である場合、プロセッサ102はステップS15に戻り、識別対象薬剤を変えて処理を継続する。ステップS16の判定結果がYes判定である場合、プロセッサ102は図18のフローチャートを終了する。 In step S16, the processor 102 determines whether the drug types for all drugs in the image have been determined. If the determination result in step S16 is No, the processor 102 returns to step S15, changes the drug to be identified, and continues the process. If the determination result in step S16 is Yes, the processor 102 ends the flowchart of FIG.
 図19は、図18のステップS15及びステップS16に適用されるループ処理の例を示すフローチャートである。 FIG. 19 is a flowchart illustrating an example of loop processing applied to steps S15 and S16 in FIG. 18.
 ステップS15の処理が開始されると、ステップS21において、プロセッサ102は、薬剤識別器120を用いて薬剤の識別を行い、その識別結果が薬種特定可能薬剤に属する薬剤であるか否かを判定する。薬剤識別器120による識別結果は、タッチパネルディスプレイ14を通じてユーザに提供される。プロセッサ102は、タッチパネルディスプレイ14の入力部14B等から薬種を確定させる指示、識別結果の修正の指示、又はテキスト検索等の他の処理に移行する指示など各種の指示の入力を受け付ける。ユーザは、提示される識別結果を確認し、タッチパネルディスプレイ14の入力部等から薬種を確定させる指示を入力したり、識別結果の修正又は刻印テキスト検索への移行などの指示を入力したりすることができる。 When the process in step S15 is started, in step S21, the processor 102 uses the drug identifier 120 to identify the drug, and determines whether the identification result is a drug belonging to a drug whose drug type can be specified. . The identification result by the drug identifier 120 is provided to the user through the touch panel display 14. The processor 102 receives input of various instructions from the input unit 14B of the touch panel display 14, such as an instruction to confirm the drug type, an instruction to correct the identification result, or an instruction to proceed to other processing such as text search. The user confirms the presented identification results and inputs an instruction to confirm the drug type from the input section of the touch panel display 14, or inputs an instruction to modify the identification results or move to an engraved text search. I can do it.
 ステップS21の判定結果がYes判定である場合、プロセッサ102はステップS22に進む。ステップS22において、プロセッサ102は、薬剤識別器120による薬種特定可能薬剤という結果が正しいか否かを判定する。ステップS22の判定結果がYes判定である場合、プロセッサ102はステップS23に進み、薬剤識別器120で特定(推論)された薬種が正しいか否かを判定する。ユーザが目視で正しい薬種であることを確認できた場合には、ユーザが薬種を確定させる指示を入力することができる。 If the determination result in step S21 is Yes, the processor 102 proceeds to step S22. In step S22, the processor 102 determines whether the result of the medicine identifier 120 that the medicine can be identified is correct. If the determination result in step S22 is Yes, the processor 102 proceeds to step S23 and determines whether the drug type specified (inferred) by the drug identifier 120 is correct. If the user can visually confirm that the drug type is correct, the user can input an instruction to confirm the drug type.
 ステップS23の判定結果がYes判定である場合、プロセッサ102はステップS29に進み、薬種を確定させる。 If the determination result in step S23 is Yes, the processor 102 proceeds to step S29 and determines the drug type.
 ステップS23の判定結果がNo判定である場合、プロセッサ102はステップS28に進む。ステップS28において、プロセッサ102は、刻印テキスト等による非機械学習ベースの薬種特定フローを実施する。ステップS28の後、プロセッサ102はステップS29に進む。 If the determination result in step S23 is No, the processor 102 proceeds to step S28. In step S28, the processor 102 executes a non-machine learning-based drug type identification flow using stamped text or the like. After step S28, the processor 102 proceeds to step S29.
 ステップS21の判定結果がNo判定である場合、プロセッサ102はステップS24に進む。ステップS24において、プロセッサ102は、薬剤識別器120によって識別された薬種特定困難薬剤という結果が正しいか否かを判定する。ステップS24の判定結果がNo判定である場合、プロセッサ102はステップS28に進む。 If the determination result in step S21 is No, the processor 102 proceeds to step S24. In step S24, the processor 102 determines whether or not the result of the drug being difficult to identify by drug type identified by the drug identifier 120 is correct. If the determination result in step S24 is No, the processor 102 proceeds to step S28.
 ステップS24の判定結果がYes判定である場合、プロセッサ102はステップS25に進み、薬剤識別器120で特定(推論)された識別結果の薬種特定困難薬剤の属するグループの種類が正しいか否かを判定する。ステップS25の判定結果がNo判定である場合、又はステップS22の判定結果がNo判定である場合、プロセッサ102はステップS26に進む。ステップS26において、プロセッサ102は、その薬剤の所属する薬種特定困難薬剤のグループを特定する。ステップS26では、プロセッサ102は、タッチパネルディスプレイ14の入力部14B等から当該薬剤の所属するグループの種類を指定する指示の入力を受け付け、受け付けた指示に従いグループを特定する。 If the determination result in step S24 is Yes, the processor 102 proceeds to step S25, and determines whether the type of group to which the difficult-to-identify drug belongs, which is the identification result identified (inferred) by the drug identifier 120, is correct. do. If the determination result in step S25 is No, or if the determination result in step S22 is No, the processor 102 proceeds to step S26. In step S26, the processor 102 identifies the group of difficult-to-identify drugs to which the drug belongs. In step S26, the processor 102 receives an input from the input unit 14B of the touch panel display 14 or the like to specify the type of group to which the drug belongs, and specifies the group according to the received instruction.
 ステップS26の後、プロセッサ102はステップS27に進む。また、ステップS25の判定結果がYes判定である場合、プロセッサ102はステップS27に進む。ステップS27において、プロセッサ102は、当該薬種特定困難薬剤のグループで定義された薬種特定フローを実施する。ステップS27の後、プロセッサ102はステップS29に進み、薬種を確定する。 After step S26, the processor 102 proceeds to step S27. Further, if the determination result in step S25 is Yes, the processor 102 proceeds to step S27. In step S27, the processor 102 executes the drug type identification flow defined for the group of drugs that are difficult to identify. After step S27, the processor 102 proceeds to step S29 and determines the drug type.
 画像内に含まれる全ての薬剤について薬種が確定したら、図19のループ処理を終了する。図18及び図19のフローチャートを用いて説明した薬剤識別方法は本開示における「物体識別方法」の一例である。 Once the drug types for all drugs included in the image have been determined, the loop processing in FIG. 19 ends. The drug identification method described using the flowcharts of FIGS. 18 and 19 is an example of the "object identification method" in the present disclosure.
 〔薬種識別装置100のGUI(Graphical User Interface)の例〕
 [検出結果表示GUI]
 図20は、タッチパネルディスプレイ14に表示される画面の例を示す図である。図20には、薬剤検出器114によって検出された薬剤領域の検出結果を表示する検出結果表示GUIの例が示されている。薬種識別装置100によって提供される画面SC1は、大きく分けて、全体画像表示部EDAと、候補表示部CDAと、ボタン表示部BDAとの3つのエリアから構成される。全体画像表示部EDAには、取得された撮影画像から生成された標準化画像が表示される。なお、全体画像表示部EDAには、マーカを含む撮影画像の全体を表示させてもよい。全体画像表示部EDAは本開示における「撮影画像表示部」の一例である。
[Example of GUI (Graphical User Interface) of drug type identification device 100]
[Detection result display GUI]
FIG. 20 is a diagram showing an example of a screen displayed on the touch panel display 14. FIG. 20 shows an example of a detection result display GUI that displays the detection results of the drug area detected by the drug detector 114. The screen SC1 provided by the drug type identification device 100 is roughly divided into three areas: an entire image display area EDA, a candidate display area CDA, and a button display area BDA. A standardized image generated from the acquired captured image is displayed on the entire image display section EDA. Note that the entire captured image including the marker may be displayed on the entire image display section EDA. The entire image display section EDA is an example of a "photographed image display section" in the present disclosure.
 全体画像表示部EDAは、ピンチアウト又はピンチインの操作によって画像の部分を拡大又は縮小表示させることができる。このため、薬剤に付された文字記号等が小さくて見難い場合などは、各薬剤を拡大して表示させることができる。 The entire image display section EDA can enlarge or reduce a portion of the image by pinching out or pinching in. Therefore, if the characters and symbols attached to drugs are too small to be seen, each drug can be enlarged and displayed.
 全体画像表示部EDAには、薬剤検出器114による検出結果が表示される。撮影後、薬剤検出器114が検出した各薬剤の領域が矩形の枠(バウンディングボックス)で表示される。図20では、3つの薬剤DR1、DR2、DR3を含む撮影画像の例が示されている。薬剤検出器114によって検出された薬剤DR1、DR2に対して、それぞれ枠BX1、BX2が表示される。図20に示す例では、薬剤DR3について検出が失敗しており、薬剤DR3に対する枠が表示されていないものとなっている。また、図20に示す例では、薬剤が存在していない領域Absに対して過検出があり、誤検出に基づく枠BX3が表示されている。 The detection result by the drug detector 114 is displayed on the entire image display section EDA. After photographing, the area of each drug detected by the drug detector 114 is displayed in a rectangular frame (bounding box). In FIG. 20, an example of a captured image including three drugs DR1, DR2, and DR3 is shown. Frames BX1 and BX2 are displayed for drugs DR1 and DR2 detected by drug detector 114, respectively. In the example shown in FIG. 20, detection has failed for drug DR3, and the frame for drug DR3 is not displayed. Furthermore, in the example shown in FIG. 20, there is overdetection in the region Abs where no drug is present, and a frame BX3 based on erroneous detection is displayed.
 枠BX1、BX2、BX3で囲まれた各領域はユーザが選択可能であり、例えば、選択された領域は赤枠、選択されていない領域は青枠など枠線の色を変えて表示される。もちろん、別の色であっても良い。領域を示す枠BX1、BX2、BX3は、領域の選択/非選択の状態に応じて枠線の色を異ならせて表示させることが好ましい。 Each area surrounded by frames BX1, BX2, and BX3 can be selected by the user, and for example, the selected area is displayed with a red frame, and the unselected area is displayed with a blue frame, changing the color of the frame line. Of course, another color may be used. It is preferable that the frames BX1, BX2, and BX3 indicating the regions are displayed with different border colors depending on the selected/unselected state of the region.
 各枠BX1、BX2、BX3には、チェックボックスCBが付されている。チェックボックスCBは、「薬種確定済み」であるか、「未確定状態」であるかなどのステータスに応じたマーク表示又は空白となる。 A check box CB is attached to each frame BX1, BX2, and BX3. The check box CB may be marked or left blank depending on the status, such as "drug type confirmed" or "undetermined state."
 全体画像表示部EDAの最下部には領域編集スイッチSW1と、領域追加ボタンBT2と、領域削除ボタンBT3とが表示される。領域編集スイッチSW1は、薬剤の領域の検出結果を修正したい場合に操作されるスイッチである。領域編集スイッチSW1を画面の右方向にスライドすると、全体画像表示部EDAの画面上で薬剤の領域の編集が可能な状態となる。領域編集スイッチSW1をオンにすると、領域追加ボタンBT2と領域削除ボタンBT3とが押下可能な状態となり、領域修正GUIへ移行する。領域編集スイッチSW1を画面の左方向にスライドすると、領域の編集ができない状態になる。編集できない状態の場合、領域追加ボタンBT2及び領域削除ボタンBT3はグレーアウトの状態となる。 At the bottom of the entire image display section EDA, a region editing switch SW1, a region addition button BT2, and a region deletion button BT3 are displayed. The region editing switch SW1 is a switch operated when it is desired to modify the detection result of the drug region. When the area editing switch SW1 is slid to the right of the screen, the drug area can be edited on the screen of the entire image display section EDA. When the area editing switch SW1 is turned on, the area addition button BT2 and the area deletion button BT3 become pressable, and the screen shifts to the area correction GUI. When the area editing switch SW1 is slid to the left of the screen, the area becomes unable to be edited. If editing is not possible, the area addition button BT2 and area deletion button BT3 are grayed out.
 なお、領域の編集可能のオン/オフは、図20に例示の領域編集スイッチSW1に限らず、例えば、全体画像表示部EDAの長押し、又はダブルタップ等で実装されてもよい。領域追加ボタンBT2を押すと、全体画像表示部EDAにおいて領域を指定して、薬剤の領域を追加できる状態となる。また、領域削除ボタンBT3は、過検出された領域などを削除する場合に使用される。 Note that turning on/off the editability of a region is not limited to the region editing switch SW1 illustrated in FIG. 20, and may be implemented by, for example, a long press or a double tap on the entire image display section EDA. When the region addition button BT2 is pressed, a state is created in which a region can be specified on the entire image display section EDA and a drug region can be added. Further, the area deletion button BT3 is used when deleting an over-detected area.
 領域編集がオフの状態で各領域をタップして選択すると、その領域で切り出した薬剤画像に対して薬剤識別器120を用いた識別処理を実行し、下の候補表示部CDAに候補薬剤の薬剤情報を表示する。また、各領域に対して、長径と短径の寸法が表示される。この寸法表示のオン/オフは別途スイッチなどで切替可能な構成としてもよい。候補薬剤は本開示における「候補物体」の一例である。 When you tap and select each area with area editing turned off, the drug image cut out in that area is subjected to identification processing using the drug discriminator 120, and the candidate drug is displayed in the candidate display area CDA below. Display information. Additionally, the dimensions of the major axis and minor axis are displayed for each area. The dimension display may be turned on/off using a separate switch or the like. A candidate drug is an example of a "candidate object" in this disclosure.
 候補表示部CDAは、主に候補薬剤の薬剤情報などを表示するエリアである。候補表示部CDAには、薬剤識別器120によって推定された識別結果を基に、候補薬剤の薬剤情報が表示される。候補薬剤の薬剤情報は、例えば、薬剤のマスタ画像と、薬剤の識別コードと、薬剤面と、薬効分類と、薬剤が所属するグループの情報と、を含む。図20では、薬剤DR1に対する候補薬剤の薬剤情報の例が示されている。なお、候補表示部CDAにおいてもピンチアウト又はピンチインの操作により画像の拡大/縮小表示が可能である。 The candidate display section CDA is an area that mainly displays drug information of candidate drugs. The candidate display section CDA displays drug information of candidate drugs based on the identification results estimated by the drug identifier 120. The drug information of the candidate drug includes, for example, a master image of the drug, an identification code of the drug, a drug surface, a drug efficacy classification, and information on a group to which the drug belongs. In FIG. 20, an example of drug information of a candidate drug for drug DR1 is shown. Note that it is also possible to enlarge/reduce the image in the candidate display section CDA by pinching out or pinching in.
 グループの情報を表示する表示欄は選択ボックスSLB1として構成される。また、候補表示部CDAには、刻印テキスト検索ボタンBT4が表示される。 The display field that displays group information is configured as a selection box SLB1. Further, an engraved text search button BT4 is displayed in the candidate display area CDA.
 ボタン表示部BDAには、例えば、薬種確定ボタンBT5、薬種確定保留ボタンBT6、再撮影ボタンBT7、及び完了ボタンBT8などを含む各種ボタンが配置される。これらのボタンは、状況に応じて押下可能状態又は押下不可能状態に変化し得る。再撮影ボタンBT7は、撮影画像がブレた場合など、撮影画像に問題があった場合に押下して再撮影を行う場合に使用される。 Various buttons are arranged in the button display area BDA, including, for example, a drug type confirmation button BT5, a drug type confirmation hold button BT6, a reshoot button BT7, and a completion button BT8. These buttons can change to a pressable state or a non-pressable state depending on the situation. The re-photographing button BT7 is used to perform re-photographing by pressing the button when there is a problem with the photographed image, such as when the photographed image is blurred.
 [領域編集GUI]
 図21は、薬剤の領域編集を行う場合の画面表示の例である。図20で例示したように、薬剤検出器114の検出結果に過検出及び/又は検出失敗などが確認された場合、ユーザは領域編集スイッチSW1を画面右方向にスライドさせて領域編集可能な状態にする。
[Area editing GUI]
FIG. 21 is an example of a screen display when editing a drug area. As illustrated in FIG. 20, when overdetection and/or detection failure is confirmed in the detection results of the drug detector 114, the user slides the area editing switch SW1 to the right of the screen to enable area editing. do.
 この状態で、例えば、薬剤DR1の領域を選択すると、選択状態になっている領域は、ドラッグ、タップ等の操作で領域の位置、形状、及び回転角などを調整することができる。例えば、図22に示すように、枠BXの辺をドラッグして領域を拡縮したり、領域をドラッグして領域を平行移動させたり、領域を二本指で回転方向につまむように回して領域を回転させたりすることができる。また、枠BXのコーナ部分をドラッグすることにより、アスペクト比を一定に保ったまま領域を拡縮させることができる。 In this state, for example, if the area of the drug DR1 is selected, the position, shape, rotation angle, etc. of the selected area can be adjusted by dragging, tapping, etc. For example, as shown in Fig. 22, you can enlarge or reduce the area by dragging the sides of frame BX, move the area in parallel by dragging the area, or pinch the area with two fingers in the rotation direction to enlarge or reduce the area. can be rotated. Furthermore, by dragging the corner portion of the frame BX, the area can be expanded or contracted while keeping the aspect ratio constant.
 図21に示す画面SC2の場合、薬剤が存在しない領域Absに対して過検出により領域抽出(薬剤として検出)されているため、ユーザは枠BX3で示された領域Absを選択し、領域削除ボタンBT3を押下することで、領域Absを削除することができる。なお、「領域削除」の機能は、領域削除ボタンBT3に限らず、該当する領域を長押しして不図示のプルダウンメニューを表示させ、プルダウンメニューから「領域削除」を選択することで削除が行われるようにGUIを実装してもよい。 In the case of the screen SC2 shown in FIG. 21, since the area Abs where no drug is present is extracted (detected as a drug) due to overdetection, the user selects the area Abs indicated by the frame BX3 and clicks the area delete button. By pressing BT3, the area Abs can be deleted. Note that the "area deletion" function is not limited to the area deletion button BT3; deletion can also be performed by long-pressing the relevant area to display a pull-down menu (not shown), and selecting "area deletion" from the pull-down menu. A GUI may be implemented so that the
 また、図21に示す例の場合、薬剤DR3について、撮影画像内に薬剤DR3があるのに領域が検出されていないため、ユーザは領域追加ボタンBT2を押下し、領域を選択して領域を追加できる。領域を追加する操作は、例えば、任意の一点をタップ後、そのまま右下へドラッグして矩形領域を追加作成し、図22で説明した方法などにより、矩形の横幅、縦幅、及び回転角度などを調整する。 In addition, in the case of the example shown in FIG. 21, regarding the drug DR3, although the drug DR3 is present in the photographed image, the region is not detected, so the user presses the region addition button BT2, selects the region, and adds the region. can. To add an area, for example, tap any point, drag it to the bottom right to create an additional rectangular area, and use the method explained in Figure 22 to change the rectangle's width, height, rotation angle, etc. Adjust.
 または、全体画像表示部EDAの画面上の一点を長押ししてデフォルトの領域不確定の矩形を表示させて領域追加し、本矩形を適切な位置に平行移動、矩形の横幅、縦幅、回転角度を調整して修正するように実装してもよい。 Alternatively, press and hold a point on the screen of the entire image display section EDA to display the default rectangle with an undefined area, add an area, move this rectangle in parallel to an appropriate position, change the width and height of the rectangle, and rotate it. It may be implemented to correct by adjusting the angle.
 [領域確定済みの検出結果表示GUI]
 図23は、薬剤についての識別を確定させた状態の画面表示の例である。図23に示す画面SC3のように、薬種確定済みの薬剤DR1、DR3のそれぞれの枠BX1、BX4についてのチェックボックスCBには「薬種確定済み」のステータスを示すチェックマークが入る。チェックボックスCBを長押しするなどして、プルダウンメニューを表示させ、プルダウンメニューからステータスを変更することが可能である。例えば、「薬種確定済み」のステータスから「未確定状態」などに変更することができる。
[GUI for displaying detection results with area confirmed]
FIG. 23 is an example of a screen display in a state where the identification of the drug has been determined. As shown in the screen SC3 shown in FIG. 23, a check mark indicating the status of "drug type confirmed" is entered in the check box CB for each of the frames BX1 and BX4 for drugs DR1 and DR3 whose drug type has been confirmed. By long-pressing the check box CB, a pull-down menu is displayed, and the status can be changed from the pull-down menu. For example, the status can be changed from "drug type confirmed" to "undetermined state."
 また、薬種特定困難薬剤などについては、必ずしも薬種を特定できるわけではないので、「薬種確定保留」のステータスがあってもよい。例えば、薬種の確定を保留する薬剤DR2のチェックボックスCBには「薬種確定保留」のステータスを示す「×」マークを表示させてもよい。なお、薬種確定も薬種確定保留もしていない「未確定状態」の場合、チェックボックスCBには何も表示されない(図22参照)。チェックボックスCBのデフォルトは「未確定状態」を示す空白である。 Additionally, for drugs that are difficult to identify, the drug type may not necessarily be identified, so the status may be "drug type determination pending." For example, an "x" mark indicating the status of "drug type determination pending" may be displayed in the check box CB of the drug DR2 for which determination of the drug type is pending. Note that in the case of an "unconfirmed state" in which neither the drug type has been determined nor the drug type determination pending, nothing is displayed in the check box CB (see FIG. 22). The default of check box CB is blank indicating "undefined state".
 全ての薬剤の識別ステータスを決定したら、ユーザは完了ボタンBT8を押下して、本撮影画像に対する識別作業を完了する。 After determining the identification status of all drugs, the user presses the completion button BT8 to complete the identification work for the main photographed image.
 [識別結果確認GUI(薬種特定可能薬剤の場合)]
 図24は、識別結果確認GUIの画面表示の例である。図24には、薬種特定可能薬剤」のグループに属する薬剤についての薬剤情報を表示するGUIの例を示す。なお、図24では全体画像表示部EDAの図示を省略しているが、図24に示す画面SC4の候補表示部CDAの上に全体画像表示部EDAが存在している(図23参照)。
[Identification result confirmation GUI (for drugs whose drug type can be identified)]
FIG. 24 is an example of a screen display of the identification result confirmation GUI. FIG. 24 shows an example of a GUI that displays drug information about drugs belonging to the group ``Drugs that can be identified by drug type.'' Although the illustration of the entire image display section EDA is omitted in FIG. 24, the entire image display section EDA exists above the candidate display section CDA of the screen SC4 shown in FIG. 24 (see FIG. 23).
 候補表示部CDAには、全体画像表示部EDAで選択した領域の薬剤切出画像に対して薬剤識別器120が推定した薬剤のマスタ画像の表と裏、薬剤コード、薬剤名、及び大きさ(長径、短径の寸法)等の薬剤情報が表示される。また、これらの薬剤情報が表示される薬剤情報表示部の下部に、選択に係る薬剤が属するグループの種類が表示される。グループの種類は選択ボックスSLB1に表示される形式となっている。 The candidate display section CDA displays the front and back sides of the master image of the drug, the drug code, the drug name, and the size ( Drug information such as major axis and minor axis dimensions is displayed. Furthermore, the type of group to which the selected drug belongs is displayed at the bottom of the drug information display section where the drug information is displayed. The type of group is displayed in the selection box SLB1.
 画面SC4の右端の右矢印ボタンBT9を押下又は左スワイプすると、よりスコア下位の候補薬剤が順に、候補表示部CDAの薬剤情報表示部に表示される。また、画面左端の左矢印ボタンBT10を押下又は右スワイプすると、よりスコア上位の候補薬剤が順に、候補表示部CDAの薬剤情報表示部に表示される。 When the right arrow button BT9 at the right end of the screen SC4 is pressed or swiped to the left, candidate drugs with lower scores are displayed in order on the drug information display section of the candidate display section CDA. Furthermore, when the left arrow button BT10 at the left end of the screen is pressed or swiped right, candidate drugs with higher scores are displayed in order on the drug information display section of the candidate display section CDA.
 また、推論されたグループが間違いの場合、選択ボックスSLB1のプルダウンボタンの押下によってプルダウンメニューPDMを表示させ、プルダウンメニューPDMの中から正しいグループを選択して各グループに特有のGUIへ遷移することができる。 Furthermore, if the inferred group is incorrect, the pull-down menu PDM can be displayed by pressing the pull-down button of the selection box SLB1, the correct group can be selected from the pull-down menu PDM, and the transition can be made to a GUI specific to each group. can.
 薬剤識別器120が出力した候補薬剤の中に正解の薬剤が見当たらない場合などに、薬剤識別器120の薬種推定によらないテキストベースの方法で検索を行う際に、刻印テキスト検索ボタンBT4を押下することにより、刻印テキスト検索GUIへ遷移する。 When performing a search using a text-based method that does not rely on drug type estimation by the drug identifier 120, such as when the correct drug is not found among the candidate drugs output by the drug identifier 120, the stamped text search button BT4 is pressed. By doing so, the screen transitions to the engraved text search GUI.
 薬種確定ボタンBT5は、候補表示部CDAに表示又は選択された薬剤で薬種を確定する場合に押下される。薬種確定ボタンBT5が押されると、薬種が確定された状態となり、全体画像表示部EDAの該当薬剤のチェックボックスCBにチェックマークが表示される。薬種確定保留ボタンBT6は、選択した薬剤について薬種を判断しないで鑑別完了する場合に押下される。薬種確定保留ボタンBT6が押されると、全体画像表示部EDAの該当薬剤のチェックボックスCBに「×」マークが表示される。 The drug type confirmation button BT5 is pressed to confirm the drug type with the drug displayed or selected in the candidate display area CDA. When the drug type confirmation button BT5 is pressed, the drug type is confirmed and a check mark is displayed in the check box CB of the corresponding drug on the entire image display section EDA. The drug type confirmation hold button BT6 is pressed when the discrimination of the selected drug is completed without determining the drug type. When the drug type confirmation hold button BT6 is pressed, an "x" mark is displayed in the check box CB of the corresponding drug on the entire image display section EDA.
 候補表示部CDAの右上の矢印ボタンBT11が押下されると、候補一覧表示GUI(図25参照)へ遷移する。 When the arrow button BT11 at the top right of the candidate display section CDA is pressed, the screen transitions to the candidate list display GUI (see FIG. 25).
 [候補一覧表示GUI]
 図25は、候補一覧表示GUIの画面表示の例である。候補一覧表示GUIは、選択に係る薬剤が「薬種特定可能薬剤」のグループに属する場合に、薬剤識別器120による推論のスコア上位の薬剤を一覧表示するGUIである。図25のように、複数の候補薬剤が一覧表示されるため、比較検討が可能になる。なお、図25では全体画像表示部EDAとボタン表示部BDAとの図示を省略しているが、図25に示す候補表示部CDAの画面SC5の上に全体画像表示部EDAが存在しており、候補表示部CDAの画面の下にボタン表示部BDAが存在している(図23参照)。図26~図29の各図についても同様である。
[Candidate list display GUI]
FIG. 25 is an example of a screen display of the candidate list display GUI. The candidate list display GUI is a GUI that displays a list of drugs with high scores based on inference by the drug identifier 120 when the selected drug belongs to the group of "drugs that can be identified by drug type." As shown in FIG. 25, since a plurality of candidate drugs are displayed in a list, comparative study becomes possible. Although the illustration of the entire image display section EDA and the button display section BDA is omitted in FIG. 25, the entire image display section EDA is present on the screen SC5 of the candidate display section CDA shown in FIG. A button display section BDA exists below the screen of the candidate display section CDA (see FIG. 23). The same applies to each of the figures in FIGS. 26 to 29.
 図25では、スコア上位の4つの薬剤についての薬剤情報が一覧表示されている例が示されている。画面SC5の右端のスクロールバーSRBのノブを下方に操作又は画面をスワイプすると、より下位の候補も表示可能となる。この候補画像一覧の画面SC5上で、いずれかの薬剤を選択し、ボタン表示部BDAの「薬種確定ボタンBT5」を押下することにより、薬種を確定できる。 FIG. 25 shows an example in which drug information about the four drugs with the highest scores is displayed in a list. By operating the knob of the scroll bar SRB at the right end of the screen SC5 downward or by swiping the screen, lower-level candidates can also be displayed. The drug type can be confirmed by selecting any drug on the candidate image list screen SC5 and pressing the "drug type confirmation button BT5" on the button display section BDA.
 一覧表示における表示順は、薬剤識別器120による推論のスコア順の他、例えば薬剤識別器120によるスコア一位だった薬剤の刻印テキストに類似している薬剤を刻印テキストデータベースから検索して、その類似スコア順に表示してもよい。 The display order in the list display may be determined by the score of the inference by the drug discriminator 120, or by, for example, searching the stamp text database for drugs that are similar to the stamp text of the drug with the highest score by the drug discriminator 120. They may be displayed in order of similarity score.
 また、一覧表示の表示形態については、図25のように縦一列に並べて表示する形式に限らず、より画面を広く使って多行多列表示にしてもよい。 Furthermore, the display format of the list display is not limited to the display format in which the items are arranged vertically in a single column as shown in FIG. 25, but may be displayed in multiple rows and multiple columns by using a wider screen.
 候補画像一覧においては、各薬剤の薬剤情報として、マスタ画像(表裏)と、薬剤名を示す文字情報と、大きさの数値情報とに加えて、刻印テキストデータベースに登録されている刻印テキスト情報(マスタ文字情報)を表示することが好ましい。図25では図示の便宜上「マスタ文字情報」という表記をしているが、実際の画面表示では各薬剤について登録されている刻印テキスト情報が表示されることになる。 In the candidate image list, the drug information for each drug includes the master image (front and back), text information indicating the drug name, and numerical size information, as well as stamp text information registered in the stamp text database ( It is preferable to display master character information). In FIG. 25, "master text information" is used for convenience of illustration, but in actual screen display, stamp text information registered for each drug will be displayed.
 候補表示部CDAの右上の矢印ボタンBT11が押されると、識別結果確認GUI(図24参照)へ戻る。 When the arrow button BT11 at the top right of the candidate display area CDA is pressed, the screen returns to the identification result confirmation GUI (see FIG. 24).
 [刻印テキスト検索GUI]
 図26は、刻印テキストGUIの画面表示の例である。刻印テキストGUIは、選択に係る薬剤が「薬種特定可能薬剤」のグループに属する場合に、検索ボックスSBX1に入力したテキストに類似したテキストの薬剤を一覧表示するGUIである。図24又は図25の画面で刻印テキスト検索ボタンBT4が押されると、図26に示すように、検索ボックスSBX1を含む刻印テキストGUIの画面SC6が表示される。
[Engraving text search GUI]
FIG. 26 is an example of a screen display of the engraved text GUI. The stamped text GUI is a GUI that displays a list of drugs with text similar to the text input in the search box SBX1 when the selected drug belongs to the group of "drugs that can be identified by drug type." When the engraved text search button BT4 is pressed on the screen of FIG. 24 or 25, a engraved text GUI screen SC6 including a search box SBX1 is displayed as shown in FIG.
 ユーザは、検索ボックスSBX1にキーボード入力又は音声入力でテキスト入力して、検索ボタンSBT1を押すことにより、刻印文字で検索することができる。検索結果は、図25と同様に、一覧表示される。候補薬剤の一覧表示の表示形式についても図25と同様である。検索ボックスSBX1に一文字入力する毎に類似スコア判定を行い、即時に候補一覧表示を更新してもよい。 The user can search by engraved characters by inputting text into the search box SBX1 using a keyboard or voice input and pressing the search button SBT1. The search results are displayed in a list as in FIG. 25. The display format for displaying a list of candidate drugs is also the same as that in FIG. 25. The similarity score may be determined every time a character is input into the search box SBX1, and the candidate list display may be updated immediately.
 [カプセル検索GUI]
 図27は、カプセル検索GUIの画面表示の例である。カプセル検索GUIは、薬剤識別器120によって「カプセル薬剤」と識別された場合、又はグループの選択ボックスSLB1のプルダウンメニューPDMで「カプセル」が選択された場合に、候補表示部CDAに表示されるGUIである。
[Capsule search GUI]
FIG. 27 is an example of a screen display of the capsule search GUI. The capsule search GUI is a GUI displayed on the candidate display section CDA when the medicine identifier 120 identifies "capsule medicine" or when "capsule" is selected from the pull-down menu PDM of the group selection box SLB1. It is.
 カプセル検索の画面SC7は、テキスト検索ボックスSBX2と、サイズ検索ボックスSZBと、カプセル色の選択ボックスSLB2、SLB3と、文字色の選択ボックスSLB4と、カプセル画像表示部SRDと、グループの選択ボックスSLB1と、カプセル一覧ボタンBT13とを含む。 The capsule search screen SC7 includes a text search box SBX2, a size search box SZB, capsule color selection boxes SLB2 and SLB3, a font color selection box SLB4, a capsule image display area SRD, and a group selection box SLB1. , capsule list button BT13.
 テキスト検索ボックスSBX2に、キーボード入力又は音声入力でテキスト入力して、検索ボタンSBT2を押すことにより、カプセルの印字文字で検索することができる。また、薬剤名のテキストでも検索することができる。 By entering text into the text search box SBX2 using a keyboard or voice input and pressing the search button SBT2, you can search using the characters printed on the capsule. You can also search by text of the drug name.
 サイズ検索ボックスSZBは、長径の数値を入力する入力ボックスIB1と、短径の数値を入力する入力ボックスIB2と、検索ボタンBT12とを含む。入力ボックスIB1、IB2にキーボード入力又は音声入力で数値を入力して、検索ボタンBT12を押すことにより、カプセル薬剤の大きさ(サイズ)で検索することができる。 The size search box SZB includes an input box IB1 for inputting a numerical value of the major axis, an input box IB2 for inputting a numerical value for the minor axis, and a search button BT12. By inputting numerical values into the input boxes IB1 and IB2 by keyboard or voice input and pressing the search button BT12, it is possible to search by the size of the capsule drug.
 検索結果はカプセル画像表示部SRDに表示される。テキスト検索の場合は、テキスト類似スコアの高い順にマスタ画像の表裏を上から表示する。テキスト検索ボックスSBX2に一文字入力する毎に類似スコア判定を行い、即時に候補一覧表示を更新してもよい。カプセル検索においては、カプセルに限定してテキスト検索する。一方、大きさ(サイズ)で検索する場合には、入力された長径及び短径の値と一致度の高い順にマスタ画像の表裏を上から表示する。この場合も検索範囲はカプセルに限定して検索が行われる。 The search results are displayed on the capsule image display section SRD. In the case of text search, the front and back sides of the master image are displayed from the top in descending order of text similarity score. The similarity score may be determined every time a character is input into the text search box SBX2, and the candidate list display may be updated immediately. In capsule search, text search is limited to capsules. On the other hand, when searching by size, the front and back sides of the master image are displayed from the top in descending order of degree of matching with the input length and breadth values. In this case as well, the search range is limited to capsules.
 また、カプセル画像表示部SRDに表示させるカプセル薬剤のマスタ画像の表示順については、過去の鑑別履歴データを参照し、鑑別履歴ありのカプセルを優先的に表示してもよい。画面SC7右端のスクロールバーSRBのノブを下方に操作又は画面SC7をスワイプすると、より下位の候補も表示可能となる。 Furthermore, regarding the display order of master images of capsule medicines to be displayed on the capsule image display section SRD, past discrimination history data may be referred to, and capsules with a discrimination history may be displayed preferentially. By operating the knob of the scroll bar SRB at the right end of the screen SC7 downward or by swiping the screen SC7, lower-level candidates can also be displayed.
 候補表示の形態については、図27のように縦一列に並べて表示する形式に限らず、多行多列表示にしてもよい。 The form of candidate display is not limited to the form in which candidates are displayed in a single column vertically as shown in FIG. 27, but may be displayed in multiple rows and in multiple columns.
 画面SC7右下のカプセル一覧ボタンBT13が押されると、カプセル画像表示部SRDが右側に拡大し、一度により多くのカプセル薬剤の候補が一覧表示される。この場合、カプセル一覧ボタンBT13は不図示の「戻るボタン」に差し替わり、戻るボタンが押されると、元のカプセル候補画面(図27)に戻る。 When the capsule list button BT13 at the bottom right of the screen SC7 is pressed, the capsule image display section SRD expands to the right, and more capsule drug candidates are displayed as a list at once. In this case, the capsule list button BT13 is replaced with a "back button" (not shown), and when the back button is pressed, the screen returns to the original capsule candidate screen (FIG. 27).
 カプセル画像表示部SRDに表示されているカプセル画像の中から、いずれかのカプセルを選択し、ボタン表示部BDAの「薬種確定ボタンBT5」を押下することにより、薬種を確定できる。 The drug type can be determined by selecting one of the capsules from among the capsule images displayed on the capsule image display section SRD and pressing the "drug type confirmation button BT5" on the button display section BDA.
 カプセル色の選択ボックスSLB2、SLB3、及び文字色の選択ボックスSLB4を用いて、カプセルの色及び印字文字の色を指定して候補を絞れるようにしてもよい。また、撮影画像からカプセル色を自動で認識して予め候補を絞って、選択ボックスSLB2、SLB3をデフォルト表示するようにしてもよい。カプセルの候補画像一覧においては、各薬剤の薬剤情報として、マスタ画像(表裏)と、薬剤名を示す文字情報と、大きさの数値情報とに加えて、刻印テキストデータベースに登録されている刻印テキスト情報(マスタ文字情報)を表示することが好ましい。 Capsule color selection boxes SLB2 and SLB3 and text color selection box SLB4 may be used to narrow down the candidates by specifying the capsule color and printed text color. Alternatively, the capsule color may be automatically recognized from the photographed image, the candidates may be narrowed down in advance, and the selection boxes SLB2 and SLB3 may be displayed by default. In the capsule candidate image list, the drug information for each drug includes the master image (front and back), text information indicating the drug name, numerical information about the size, and the stamp text registered in the stamp text database. It is preferable to display information (master character information).
 [無地薬剤検索GUI]
 図28は、無地薬剤検索GUIの画面表示の例である。無地薬剤検索GUIは、薬剤識別器120によって「無地薬剤」と識別された場合、又はグループの選択ボックスSLB1のプルダウンメニューPDMで「無地薬剤」が選択された場合に、候補表示部CDAに表示されるGUIである。
[Plain drug search GUI]
FIG. 28 is an example of a screen display of the plain drug search GUI. The plain drug search GUI is displayed in the candidate display area CDA when the drug is identified as "plain drug" by the drug identifier 120 or when "plain drug" is selected in the pull-down menu PDM of the group selection box SLB1. This is a GUI.
 無地薬剤検索の画面SC8は、色の選択ボックスSLB5と、無地薬剤画像表示部SRD2と、グループの選択ボックスSLB1と、無地薬剤一覧ボタンBT14とを含む。 The plain drug search screen SC8 includes a color selection box SLB5, a plain drug image display section SRD2, a group selection box SLB1, and a plain drug list button BT14.
 無地薬剤画像表示部SRD2は、全体画像表示部EDAで選択されている薬剤の長径及び短径の値と一致度の高い順に、マスタ画像の表裏を上から表示する。この場合、検索範囲は、無地錠剤に限定して検索が行われる。 The plain drug image display section SRD2 displays the front and back sides of the master image from top to bottom in order of degree of agreement with the values of the major axis and minor axis of the drug selected in the entire image display section EDA. In this case, the search range is limited to plain tablets.
 無地薬剤画像表示部SRD2に表示させる無地薬剤のマスタ画像の表示順については、過去の鑑別履歴データを参照し、鑑別履歴ありの無地薬剤を優先的に表示してもよい。画面右端のスライダバーのノブを下方に操作又は画面をスワイプすると、より下位の候補も表示可能となる。 Regarding the display order of master images of plain drugs to be displayed on the plain drug image display section SRD2, past discrimination history data may be referred to, and plain drugs with a discrimination history may be displayed preferentially. By operating the slider bar knob at the right end of the screen downward or by swiping the screen, lower-level candidates can also be displayed.
 候補表示の形態については、図27のように縦一列に並べて表示する形式に限らず、多行多列表示にしてもよい。 The form of candidate display is not limited to the form in which candidates are displayed in a single column vertically as shown in FIG. 27, but may be displayed in multiple rows and in multiple columns.
 画面SC8右下の無地薬剤一覧ボタンBT14が押されると、無地薬剤画像表示部SRD2が右側に拡大し、一度により多くの無地薬剤の候補が一覧表示される。この場合、無地薬剤一覧ボタンBT14は不図示の「戻るボタン」に差し替わり、戻るボタンが押されると、元の無地薬剤候補画面(図28)に戻る。 When the plain drug list button BT14 at the bottom right of the screen SC8 is pressed, the plain drug image display section SRD2 expands to the right, and more plain drug candidates are displayed as a list at once. In this case, the plain drug list button BT14 is replaced with a "back button" (not shown), and when the back button is pressed, the screen returns to the original plain drug candidate screen (FIG. 28).
 色の選択ボックスSLB5を用いて、無地薬剤の色を指定して候補を絞れるようにしてもよい。また、撮影画像から無地薬剤の色を自動で認識して予め候補を絞って、選択ボックスSLB5をデフォルト表示するようにしてもよい。 A color selection box SLB5 may be used to specify the color of the plain drug to narrow down the candidates. Alternatively, the color of the plain drug may be automatically recognized from the photographed image, the candidates narrowed down in advance, and the selection box SLB5 may be displayed by default.
 ユーザは、カプセル画像表示部SRDに表示されているカプセル画像の中から、いずれかのカプセルを選択し、ボタン表示部BDAの薬種確定ボタンBT5を押下することにより、薬種を確定できる。 The user can confirm the drug type by selecting any capsule from among the capsule images displayed on the capsule image display section SRD and pressing the drug type confirmation button BT5 on the button display section BDA.
 [分割錠剤検索GUI]
 図29は、分割錠剤検索GUIの画面表示の例である。分割錠剤検索GUIは、薬剤識別器120によって「分割錠剤」と識別された場合、又はグループの選択ボックスSLB1のプルダウンメニューから「分割錠剤」が選択された場合に、候補表示部CDAに表示されるGUIである。
[Divided tablet search GUI]
FIG. 29 is an example of a screen display of the divided tablet search GUI. The split tablet search GUI is displayed in the candidate display area CDA when the drug is identified as "split tablet" by the drug identifier 120, or when "split tablet" is selected from the pull-down menu of the group selection box SLB1. It is a GUI.
 分割錠剤検索の画面SC9は、分割錠剤画像表示部LS1と、分割錠剤呼出ボタンBT15と、検索ボックスSBX3と、候補薬剤画像表示部LS2と、グループの選択ボックスSLB1と、を含む。 The divided tablet search screen SC9 includes a divided tablet image display section LS1, a divided tablet call button BT15, a search box SBX3, a candidate drug image display section LS2, and a group selection box SLB1.
 分割錠剤画像表示部LS1には、全体画像表示部EDAで選択した分割錠剤画像及び分割錠剤呼出ボタンBT15の押下によって呼び出した分割錠剤画像が一覧表示される。例えば、全体画像表示部EDAで選択した分割錠剤画像は、分割錠剤画像表示部LS1における一覧表示の最上位に表示される。分割錠剤画像表示部LS1は、分割錠剤呼出ボタンBT15の押下によって呼び出した分割錠剤画像を表示させる表示部と、全体画像表示部EDAで選択した分割錠剤画像を表示させる表示部とを明確に区別して表示する構成であってもよい。 The divided tablet image display section LS1 displays a list of the divided tablet images selected in the entire image display section EDA and the divided tablet images called up by pressing the divided tablet call button BT15. For example, the divided tablet image selected in the entire image display section EDA is displayed at the top of the list display in the divided tablet image display section LS1. The divided tablet image display section LS1 clearly distinguishes between a display section that displays the divided tablet image called up by pressing the divided tablet call button BT15 and a display section that displays the divided tablet image selected in the entire image display section EDA. It may be configured to display the information.
 ユーザが分割錠剤呼出ボタンBT15を押下すると、過去に登録した分割錠剤撮影画像一覧から1つ又は複数の分割錠剤画像を選択して分割錠剤画像表示部LS1の一覧表示に追加することができる。分割錠剤画像の登録方法として、例えば、次のような実装が考えられる。すなわち、全体画像表示部EDAで選択した薬剤のグループが「分割錠剤」の状態である場合に、全体画像表示部EDA上で当該選択領域を長押しするとプルダウンメニューが表示され、このプルダウンメニューから「分割錠剤画像登録」の項目を選択することができる。「分割錠剤画像登録」が選択されると、該当する分割錠剤画像が共有部に保管され、本画面の分割錠剤呼出ボタンBT15の押下により、画像を呼び出すことができる状態になる。共有部は、記憶装置104の記憶領域の一部であり、鑑別の作業単位を超えて薬種識別装置100における処理において共有されるデータ等が記憶される記憶領域である。分割錠剤画像の登録方法は、この例に限らず、他の方法であってもよい。 When the user presses the divided tablet call button BT15, one or more divided tablet images can be selected from the list of previously registered divided tablet photographed images and added to the list displayed in the divided tablet image display section LS1. As a method for registering divided tablet images, the following implementation may be considered, for example. That is, when the drug group selected on the entire image display section EDA is in the state of "divided tablets", if you press and hold the selected area on the entire image display section EDA, a pull-down menu will be displayed, and from this pull-down menu, you can select " ``Divided tablet image registration'' item can be selected. When "Register divided tablet image" is selected, the corresponding divided tablet image is stored in the shared section, and the image can be called by pressing the divided tablet call button BT15 on this screen. The shared unit is a part of the storage area of the storage device 104, and is a storage area in which data and the like that are shared in the processing in the drug type identification device 100 beyond the work unit of discrimination are stored. The method for registering divided tablet images is not limited to this example, and other methods may be used.
 検索ボックスSBX3にキーボード入力又は音声入力でテキスト入力して右端の検索ボタンSBT3を押すことにより刻印文字で検索が可能である。 You can search by engraved characters by entering text into the search box SBX3 using a keyboard or voice input and pressing the search button SBT3 at the right end.
 候補薬剤画像表示部LS2は、テキスト類似スコアの高い順にマスタ画像の表裏を上から表示する。検索ボックスSBX3に一文字入力する毎に類似スコア判定を行い、即時に候補一覧表示を更新してもよい。候補薬剤画像表示部LS2に表示させる薬剤のマスタ画像の表示順については、過去の鑑別履歴データを参照し、鑑別履歴ありの分割錠剤に対応する薬剤を優先的に表示してもよい。画面右端のスライダバーのノブを下方に操作又は画面をスワイプすると、より下位の候補も表示可能となる。 The candidate drug image display section LS2 displays the front and back sides of the master image in descending order of text similarity score from top to bottom. The similarity score may be determined every time one character is input into the search box SBX3, and the candidate list display may be updated immediately. Regarding the display order of master images of drugs to be displayed on the candidate drug image display section LS2, past discrimination history data may be referred to, and drugs corresponding to divided tablets with a discrimination history may be displayed preferentially. By operating the slider bar knob at the right end of the screen downward or by swiping the screen, lower-level candidates can also be displayed.
 候補表示の形態については、図27のように縦一列に並べて表示する形式に限らず、多行多列表示にしてもよい。 The form of candidate display is not limited to the form in which candidates are displayed in a single column vertically as shown in FIG. 27, but may be displayed in multiple rows and in multiple columns.
 ユーザは、候補薬剤画像表示部LS2に表示されている薬剤の中から、いずれかの薬剤を選択し、ボタン表示部BDAの「薬種確定ボタンBT5」を押下することにより、薬種を確定できる。 The user can confirm the drug type by selecting any drug from among the drugs displayed on the candidate drug image display section LS2 and pressing the "drug type confirmation button BT5" on the button display section BDA.
 図29の候補薬剤画像一覧においても、各薬剤の薬剤情報として、マスタ画像(表裏)と、薬剤名を示す文字情報と、大きさの数値情報とに加えて、刻印テキストデータベースに登録されている刻印テキスト情報(マスタ文字情報)を表示することが好ましい。 In the list of candidate drug images in FIG. 29, drug information for each drug includes the master image (front and back), text information indicating the drug name, and numerical size information, which are registered in the stamp text database. It is preferable to display stamped text information (master character information).
 また、図29には示されていないが、色の選択ボックスを用いて、薬剤の色を指定して候補を絞れるようにしてもよい。この場合、撮影画像から分割錠剤の色を自動で認識して予め候補を絞って、色の選択ボックスをデフォルト表示するようにしてもよい。 Although not shown in FIG. 29, a color selection box may be used to specify the color of the drug to narrow down the candidates. In this case, the color of the divided tablet may be automatically recognized from the photographed image, the candidates narrowed down in advance, and the color selection box may be displayed by default.
 [各検索GUIにおけるユーザビリティ向上の工夫]
 図20~図29を用いて例示した検索画面において、さらに、典型的な薬剤の形状を表す複数のアイコンを配置し、ユーザが1つ又は複数のアイコンを選択すると、該当する形状の薬剤のみが候補画面に表示されるようにしてもよい。
[Improvements to improve usability in each search GUI]
In the search screen illustrated using FIGS. 20 to 29, multiple icons representing typical drug shapes are further arranged, and when the user selects one or more icons, only drugs with the corresponding shape are displayed. It may also be displayed on the candidate screen.
 図30に、典型的な薬剤の形状を表すアイコンの例を示す。薬剤の典型的な形状として、円形、長円形、楕円形、五角形、及び六角形があり得る。図30に示すように、これら典型的な各形状に対応する図形のアイコンと「その他」のボタンとを検索画面に配置して、アイコンの選択によって形状の指定を受け付ける構成であってもよい。 FIG. 30 shows an example of an icon representing the shape of a typical drug. Typical shapes for agents can be circular, oval, oval, pentagonal, and hexagonal. As shown in FIG. 30, graphic icons corresponding to each of these typical shapes and an "other" button may be arranged on the search screen, and the designation of the shape may be accepted by selecting the icon.
 色の選択についても、プルダウンメニューから選択する構成に限らず、アイコンによって色の選択肢を提供してもよい。 Regarding color selection, the configuration is not limited to selection from a pull-down menu, and color options may be provided using icons.
 図31に、色の選択に用いられるアイコンの例を示す。図31において、左から、白色、黄色、オレンジ色、茶色、赤色、青色、緑色、及び透明の各色のアイコンと「その他」のボタンとが配置された例を示す。もちろん、色の配列順及びアイコンとして表示する色の種類及び色の数については適宜設計可能である。 FIG. 31 shows an example of icons used for color selection. FIG. 31 shows an example in which, from the left, icons of white, yellow, orange, brown, red, blue, green, and transparent colors and an "other" button are arranged. Of course, the arrangement order of colors, the types of colors displayed as icons, and the number of colors can be designed as appropriate.
 各色に対応するアイコンと「その他」のボタンとを検索画面に配置して、アイコンの選択によって色の指定を受け付ける構成であってもよい。ユーザが1つ又は複数のアイコンを選択すると、該当する色の薬剤のみが候補画面に表示されるようにしてもよい。 A configuration may also be adopted in which icons corresponding to each color and an "other" button are arranged on the search screen, and the designation of the color is accepted by selecting the icon. When the user selects one or more icons, only drugs of the corresponding color may be displayed on the candidate screen.
 〔グループ特有の薬種特定処理を実施する構成の例〕
 図32は、実施形態に係る薬種識別装置100において薬種特定困難薬剤の種類を特定するため機能的構成の例を示すブロック図である。薬種識別装置100は、薬剤識別器120によって推定された情報に基づいて処理内容を制御する薬種特定処理制御部160と、薬種推定結果提示処理部170と、カプセル薬剤特定処理部172と、無地薬剤特定処理部174と、分割錠剤特定処理部176と、を含む。
[Example of a configuration that performs group-specific drug type identification processing]
FIG. 32 is a block diagram illustrating an example of a functional configuration for identifying the type of drug that is difficult to identify in the drug type identification device 100 according to the embodiment. The drug type identification device 100 includes a drug type identification processing control section 160 that controls processing content based on information estimated by the drug identifier 120, a drug type estimation result presentation processing section 170, a capsule drug identification processing section 172, and a plain drug identification processing section 170. It includes a specific processing section 174 and a divided tablet specific processing section 176.
 薬剤識別器120は、識別対象薬剤が薬種特定可能薬剤である場合は薬剤の種類を推定した薬種推定情報を出力し、識別対象薬剤が薬種特定困難薬剤である場合は薬剤が属するグループを推定したグループ推定情報を出力する。薬種特定処理制御部160は、薬剤識別器120から出力される推定情報を取得し、推定情報に応じてその後の処理を振り分ける。 The drug identifier 120 outputs drug type estimation information in which the type of the drug is estimated when the drug to be identified is a drug whose drug type can be specified, and if the drug to be identified is a drug whose drug type is difficult to identify, it estimates the group to which the drug belongs. Output group estimation information. The drug type identification processing control unit 160 acquires the estimated information output from the drug identifier 120, and distributes subsequent processing according to the estimated information.
 薬種特定処理制御部160は、薬剤識別器120から薬種推定情報を取得すると、薬種推定結果提示処理部170の処理を実行させる。薬種推定結果提示処理部170は、薬剤識別器120によって推定された薬剤推定情報に基づき、候補薬剤の薬剤情報を候補表示部CDAに表示させる処理を行う。薬種推定結果提示処理部170の処理により、図24及び図25で説明した画面表示が実現される。薬種推定結果提示処理部170は、テキスト検索部122と連携し、刻印テキスト検索ボタンBT4の押下により、刻印テキスト検索の処理へと遷移し得る(図26参照)。 When the drug type identification processing control unit 160 acquires the drug type estimation information from the drug identifier 120, it causes the drug type estimation result presentation processing unit 170 to execute the process. The drug type estimation result presentation processing section 170 performs a process of displaying drug information of a candidate drug on the candidate display section CDA based on the drug estimation information estimated by the drug discriminator 120. Through the processing of the drug type estimation result presentation processing unit 170, the screen display described with reference to FIGS. 24 and 25 is realized. The drug type estimation result presentation processing section 170 cooperates with the text search section 122 and can transition to the process of searching for stamped text by pressing the stamped text search button BT4 (see FIG. 26).
 薬種特定処理制御部160は、グループ判別部162を含む。グループ判別部162は、薬剤識別器120から出力された推定情報がグループ推定情報である場合に、推定されているグループのラベルを判別する。ここでは、「カプセル薬剤」、「無地薬剤」、及び「分割錠剤」のうち、いずれのグループであるかを判別する例を示す。 The drug type identification processing control section 160 includes a group discrimination section 162. The group determining unit 162 determines the label of the estimated group when the estimated information output from the drug discriminator 120 is group estimated information. Here, an example will be shown in which it is determined which group it belongs to among "capsule drugs," "plain drugs," and "divided tablets."
 薬種特定処理制御部160は、薬剤識別器120から取得したグループ推定情報が「カプセル薬剤」のグループを示すものである場合、カプセル薬剤特定処理部172の処理を実行させる。カプセル薬剤特定処理部172は、カプセル薬剤についての薬種の特定を支援するためのカプセル検索GUI(図27参照)を提供する処理を行う。カプセル薬剤特定処理部172は、カプセル薬剤検索部173を含む。カプセル薬剤検索部173は、検索条件の入力を受け付け、受け付けた検索条件に基づいて検索処理を実行し、検索結果を出力する。 If the group estimation information acquired from the drug identifier 120 indicates a group of "capsule drugs," the drug type identification processing control section 160 causes the capsule drug identification processing section 172 to execute the process. The capsule drug identification processing unit 172 performs processing to provide a capsule search GUI (see FIG. 27) for supporting identification of the drug type of a capsule drug. The capsule drug identification processing section 172 includes a capsule drug search section 173. The capsule drug search unit 173 receives input of search conditions, executes a search process based on the received search conditions, and outputs search results.
 薬種特定処理制御部160は、薬剤識別器120から取得したグループ推定情報が「無地薬剤」のグループを示すものである場合、無地薬剤特定処理部174の処理を実行させる。無地薬剤特定処理部174は、無地薬剤についての薬種の特定を支援するための無地薬剤検索GUI(図28参照)を提供する処理を行う。無地薬剤特定処理部174は、無地薬剤検索部175を含む。無地薬剤検索部175は、検索条件の入力を受け付け、受け付けた検索条件に基づいて検索処理を実行し、検索結果を出力する。 If the group estimation information acquired from the drug identifier 120 indicates a "plain drug" group, the drug type identification processing control unit 160 causes the plain drug identification processing unit 174 to execute the process. The plain drug identification processing unit 174 performs processing to provide a plain drug search GUI (see FIG. 28) for supporting identification of drug types for plain drugs. The plain drug identification processing section 174 includes a plain drug search section 175. The plain drug search unit 175 receives input of search conditions, executes a search process based on the received search conditions, and outputs search results.
 薬種特定処理制御部160は、薬剤識別器120から取得したグループ推定情報が「分割薬剤」のグループを示すものである場合、分割錠剤特定処理部176の処理を実行させる。分割錠剤特定処理部176は、分割錠剤についての薬種の特定を支援するための分割錠剤検索GUI(図29参照)を提供する処理を行う。分割錠剤特定処理部176は、分割錠剤検索部177と分割錠剤画像登録部178とを含む。分割錠剤検索部177は、検索条件の入力を受け付け、受け付けた検索条件に基づいて検索処理を実行し、検索結果を出力する。分割錠剤画像登録部178は、図29において説明した分割錠剤画像の登録処理及び読み出し処理を行う処理部である。 If the group estimation information obtained from the drug identifier 120 indicates a group of "split medicines", the drug type identification processing control unit 160 causes the split tablet identification processing unit 176 to execute the processing. The split tablet identification processing unit 176 performs processing to provide a split tablet search GUI (see FIG. 29) for supporting identification of drug types for split tablets. The split tablet identification processing unit 176 includes a split tablet search unit 177 and a split tablet image registration unit 178. Divided tablet search unit 177 receives input of search conditions, executes search processing based on the received search conditions, and outputs search results. The divided tablet image registration unit 178 is a processing unit that performs the registration process and readout process of the divided tablet image described in FIG. 29.
 なお、グループのラベルが階層構造で定義されている場合、カプセル薬剤検索部173、無地薬剤検索部175、及び分割錠剤検索部177のそれぞれは、推定されたグループのラベルに基づき、検索条件を絞り込むことができる。 Note that when the group labels are defined in a hierarchical structure, each of the capsule drug search section 173, the plain drug search section 175, and the divided tablet search section 177 narrows down the search conditions based on the estimated group labels. be able to.
 カプセル薬剤特定処理部172、無地薬剤特定処理部174、及び分割錠剤特定処理部176のそれぞれによって実行されるグループ特有の検索GUIの提供を含む処理は、各グループにおける薬剤の種類の特定につながる処理(グループ特有の処理)の一例である。 The process including the provision of a group-specific search GUI executed by each of the capsule medicine identification processing unit 172, the plain medicine identification processing unit 174, and the divided tablet identification processing unit 176 is a process that leads to identification of the type of medicine in each group. This is an example of (group-specific processing).
 <撮影補助装置>
 図33は、薬種識別装置100に入力する撮影画像を撮影するための撮影補助装置70の上面図である。また、図34は、図33の34-34線における断面図である。図34には、撮影補助装置70を用いて薬剤の画像を撮影するスマートフォン10も示している。
<Photography assistance device>
FIG. 33 is a top view of the photographing auxiliary device 70 for photographing a photographed image to be input to the drug type identification device 100. Further, FIG. 34 is a sectional view taken along line 34-34 in FIG. 33. FIG. 34 also shows the smartphone 10 that takes an image of the drug using the photographing auxiliary device 70.
 図33及び図34に示すように、撮影補助装置70は、筐体72、薬剤載置台74、主光源75、及び補助光源78を有する。図33では形状を正方形をベースとして記載しているが、筐体72、薬剤載置台74、及び補助光源78は長方形であってもよい。 As shown in FIGS. 33 and 34, the photographing auxiliary device 70 includes a housing 72, a medicine table 74, a main light source 75, and an auxiliary light source 78. In FIG. 33, the shape is shown based on a square, but the housing 72, the medicine table 74, and the auxiliary light source 78 may have a rectangular shape.
 筐体72は、水平に支持された正方形の底面板72Aと、底面板72Aの各辺の端部にそれぞれ垂直に固定された4枚の長方形の側面板72B、72C、72D、及び72Eとから構成される。 The casing 72 includes a square bottom plate 72A supported horizontally, and four rectangular side plates 72B, 72C, 72D, and 72E vertically fixed to the ends of each side of the bottom plate 72A. configured.
 薬剤載置台74は、筐体72の底面板72Aの上面に固定されている。薬剤載置台74は、薬剤を載置する面を有する部材であり、ここでは上面視が正方形のプラスチック製、又は紙製の薄板状部材であり、識別対象薬剤が載置される載置面は基準となるグレーの色を有している。基準となるグレーの色とは、0(黒)~255(白)の256の階調値で表現すると、例えば130~220の範囲の階調値であり、より好ましくは150~190の範囲の階調値である。 The drug mounting table 74 is fixed to the upper surface of the bottom plate 72A of the housing 72. The drug placement table 74 is a member having a surface on which a drug is placed, and here, it is a thin plate-like member made of plastic or paper that is square in top view, and the placement surface on which the drug to be identified is placed. It has a standard gray color. The standard gray color is expressed by 256 gradation values from 0 (black) to 255 (white), for example, in the range of 130 to 220, and more preferably in the range of 150 to 190. It is a gradation value.
 一般的に、白背景又は黒背景で薬剤をスマートフォン10で撮影すると、自動露出調整機能によって色が飛んでしまい、十分な刻印情報を得ることができない場合がある。薬剤載置台74によれば、載置面がグレーの色であるので、色が飛ばずに刻印も詳細を捉えることができる。また、撮影画像に写ったグレーのピクセル値を取得し、真のグレーの階調値に対して補正すると、撮影画像の色調補正又は露光補正を実現することができる。 Generally, when a drug is photographed with a smartphone 10 against a white background or a black background, the colors may be washed out due to the automatic exposure adjustment function, and sufficient marking information may not be obtained. According to the drug placement table 74, since the placement surface is gray in color, the details of the markings can be captured without color scattering. Further, by acquiring the gray pixel values appearing in the photographed image and correcting them to the true gray gradation values, it is possible to realize tone correction or exposure correction of the photographed image.
 薬剤載置台74の載置面の四隅には、それぞれ黒色及び白色からなる基準マーカ74A、74B、74C、及び74Dが貼り付け、又は印刷により配置されている。基準マーカ74A、74B、74C、及び74Dは、何を用いてもよいが、ここでは検出のロバスト性が高く、シンプルな円形マーカを用いている。 Reference markers 74A, 74B, 74C, and 74D made of black and white are placed at the four corners of the placement surface of the drug placement table 74 by pasting or printing. Although any reference markers 74A, 74B, 74C, and 74D may be used, simple circular markers are used here because they have high detection robustness.
 基準マーカ74A、74B、74C、及び74Dは、縦方向及び横方向に3~30mmの大きさであることが好ましく、5~15mmの大きさであることがより好ましい。 The reference markers 74A, 74B, 74C, and 74D preferably have a size of 3 to 30 mm in the vertical and horizontal directions, and more preferably a size of 5 to 15 mm.
 また、基準マーカ74Aと基準マーカ74Bとの間の距離、及び基準マーカ74Aと基準マーカ74Dとの間の距離は、それぞれ20~100mmであることが好ましく、20~60mmであることがより好ましい。 Further, the distance between the reference marker 74A and the reference marker 74B and the distance between the reference marker 74A and the reference marker 74D are each preferably 20 to 100 mm, more preferably 20 to 60 mm.
 さらに、図33に示すように、4つの基準マーカ74A、74B、74C、及び74Dを直線で結んで四角形の薬剤載置範囲を明示してもよい。図33では、4つの基準マーカ74A、74B、74C、及び74Dが正方形の頂点に配置される例を示すが、基準マーカ74A、74B、74C、及び74Dの配置形態は図33の例に限らない。例えば、4つの基準マーカ74A、74B、74C、及び74Dは長方形の頂点に配置されてもよい。 Furthermore, as shown in FIG. 33, the four reference markers 74A, 74B, 74C, and 74D may be connected with a straight line to clearly define a rectangular drug placement range. Although FIG. 33 shows an example in which four reference markers 74A, 74B, 74C, and 74D are arranged at the vertices of a square, the arrangement form of the reference markers 74A, 74B, 74C, and 74D is not limited to the example in FIG. 33. . For example, four fiducial markers 74A, 74B, 74C, and 74D may be placed at the vertices of a rectangle.
 撮影対象の薬剤は、4つの基準マーカ74A、74B、74C、及び74Dを頂点とする四角形の領域(薬剤載置範囲)の内側に置かれる。図32では、5つの薬剤T1、T2、T3、T4、及びT5が撮影される例が示されている。 The drug to be photographed is placed inside a rectangular area (drug placement range) with four reference markers 74A, 74B, 74C, and 74D as vertices. FIG. 32 shows an example in which five drugs T1, T2, T3, T4, and T5 are imaged.
 なお、薬剤載置台74は、筐体72の底面板72Aが兼ねていてもよい。 Note that the bottom plate 72A of the casing 72 may also serve as the drug placement table 74.
 主光源75、及び補助光源78は、識別対象薬剤の撮影画像を撮影するために使用される照明装置を構成する。主光源75は、識別対象薬剤の刻印を抽出するために使用される。補助光源78は、識別対象薬剤の色及び形状を正確に出すために使用される。撮影補助装置70は、補助光源78を備えなくてもよい。 The main light source 75 and the auxiliary light source 78 constitute an illumination device used to capture an image of the drug to be identified. The main light source 75 is used to extract the stamp of the drug to be identified. Auxiliary light source 78 is used to accurately bring out the color and shape of the drug to be identified. The photographing auxiliary device 70 does not need to include the auxiliary light source 78.
 図35は、補助光源78を取り外した状態の撮影補助装置70の上面図である。 FIG. 35 is a top view of the photographing auxiliary device 70 with the auxiliary light source 78 removed.
 主光源75は、複数のLED76から構成される。LED76は、それぞれ発光部が直径10mm以内の白色光源である。ここでは、LED76は、4枚の長方形の側面板72B、72C、72D、及び72Eにそれぞれ6個ずつ、一定の高さに水平方向に並べて配置されている。これにより、主光源75は、識別対象薬剤に対して少なくとも4方向から照明光を照射する。なお、主光源75は、識別対象薬剤に対して少なくとも2方向から照明光を照射できればよい。 The main light source 75 is composed of a plurality of LEDs 76. The LEDs 76 are white light sources each having a light emitting portion within 10 mm in diameter. Here, six LEDs 76 are arranged horizontally at a constant height on each of four rectangular side plates 72B, 72C, 72D, and 72E. Thereby, the main light source 75 irradiates the identification target drug with illumination light from at least four directions. Note that the main light source 75 only needs to be able to irradiate the identification target drug with illumination light from at least two directions.
 LED76が照射する照射光と識別対象薬剤の上面(水平面)とが成す角度θは、刻印を抽出するために10°から20°の範囲内であることが好ましい。なお、主光源75は、4枚の長方形の側面板72B、72C、72D、及び72Eにそれぞれ水平に配置された10mm幅以下の棒状の光源から構成されてもよい。 The angle θ formed by the irradiation light emitted by the LED 76 and the upper surface (horizontal surface) of the drug to be identified is preferably within the range of 10° to 20° in order to extract the stamp. Note that the main light source 75 may be composed of rod-shaped light sources each having a width of 10 mm or less and arranged horizontally on each of the four rectangular side plates 72B, 72C, 72D, and 72E.
 主光源75は常時点灯していてもよい。これにより、撮影補助装置70は、識別対象薬剤に全方向から照明光を照射することが可能である。全てのLED76が点灯された状態で撮影された画像を全照明画像と呼ぶ。全照明画像によれば、印字が付加された識別対象薬剤の印字の抽出が容易になる。 The main light source 75 may be lit all the time. Thereby, the photographing auxiliary device 70 can irradiate the identification target drug with illumination light from all directions. An image taken with all the LEDs 76 turned on is called a fully illuminated image. According to the full illumination image, it becomes easy to extract the print of the identification target drug to which the print is added.
 主光源75は、タイミングによって点灯及び消灯するLED76が切り替えられてもよいし、不図示のスイッチにより点灯及び消灯するLED76が切り替えられてもよい。これにより、撮影補助装置70は、複数の主光源75により識別対象薬剤にそれぞれ異なる複数の方向から照明光を照射することが可能である。 In the main light source 75, the LED 76 may be turned on and off depending on the timing, or the LED 76 may be turned on and off by a switch (not shown). Thereby, the photographic assisting device 70 can irradiate the identification target drug with illumination light from a plurality of different directions using the plurality of main light sources 75.
 例えば、側面板72Bに設けられた6個のLED76のみを点灯させた状態で撮影された画像を部分照明画像と呼ぶ。同様に、側面板72Cに設けられた6個のLED76のみを点灯させた状態で撮影された部分照明画像、側面板72Dに設けられた6個のLED76のみを点灯させた状態で撮影された部分照明画像、及び側面板72Eに設けられた6個のLED76のみを点灯させた状態で撮影された部分照明画像を撮影することで、それぞれ異なる方向から照明光が照射された4枚の部分照明画像を取得することができる。それぞれ異なる複数の方向から照射光を照射した複数の部分照明画像によれば、刻印が付加された識別対象薬剤の刻印の抽出が容易になる。 For example, an image taken with only the six LEDs 76 provided on the side plate 72B lit is called a partially illuminated image. Similarly, a partial illumination image photographed with only the six LEDs 76 provided on the side plate 72C lit, and a portion photographed with only the six LEDs 76 provided on the side plate 72D lit. By photographing the illumination image and the partial illumination image photographed with only the six LEDs 76 provided on the side plate 72E turned on, four partial illumination images each illuminated with illumination light from different directions can be obtained. can be obtained. According to a plurality of partial illumination images in which irradiation light is irradiated from a plurality of different directions, it becomes easy to extract the stamp of the identification target drug to which the stamp has been added.
 補助光源78は、外形が正方形であり、その中心部に正方形の開口を有している平板状の平面白色光源である。補助光源78は、主光源75の照射光を拡散反射する無彩色の反射板であってもよい。補助光源78は、撮影方向(カメラの光軸方向)から均一に識別対象薬剤に照射光が照射されるように、スマートフォン10と薬剤載置台74との間に配置される。識別対象薬剤に照射される補助光源78の照射光の照度は、識別対象薬剤に照射される主光源75の照射光の照度よりも相対的に低い。 The auxiliary light source 78 is a flat white light source with a square outer shape and a square opening in the center. The auxiliary light source 78 may be an achromatic reflector that diffusely reflects the light emitted from the main light source 75. The auxiliary light source 78 is arranged between the smartphone 10 and the medicine table 74 so that the identification target medicine is uniformly irradiated with light from the photographing direction (optical axis direction of the camera). The illuminance of the irradiation light from the auxiliary light source 78 that irradiates the identification target drug is relatively lower than the illuminance of the irradiation light from the main light source 75 that irradiates the identification target drug.
 図36は、他の実施形態に係る撮影補助装置80の上面図である。図37は、図36の37-37線における断面図である。図37には、撮影補助装置80を用いて薬剤の画像を撮影するスマートフォン10も示している。なお、図36及び図37について、図33及び図34と共通する部分には同一の符号を付し、その詳細な説明は省略する。図36及び図37に示すように、撮影補助装置80は、筐体82、主光源84、及び補助光源86を有する。撮影補助装置80は、補助光源86を備えなくてもよい。 FIG. 36 is a top view of a photographic assisting device 80 according to another embodiment. FIG. 37 is a sectional view taken along line 37-37 in FIG. 36. FIG. 37 also shows the smartphone 10 that takes an image of the drug using the photographing auxiliary device 80. Note that in FIGS. 36 and 37, parts common to those in FIGS. 33 and 34 are given the same reference numerals, and detailed explanation thereof will be omitted. As shown in FIGS. 36 and 37, the photographic assisting device 80 includes a housing 82, a main light source 84, and an auxiliary light source 86. The photographing auxiliary device 80 does not need to include the auxiliary light source 86.
 筐体82は円筒形状を有し、水平に支持された円形の底面板82Aと、底面板82Aに垂直に固定された側面板82Bとから構成される。底面板82Aの上面には、薬剤載置台74が固定されている。 The housing 82 has a cylindrical shape and is composed of a circular bottom plate 82A supported horizontally and a side plate 82B fixed perpendicularly to the bottom plate 82A. A drug mounting table 74 is fixed to the upper surface of the bottom plate 82A.
 主光源84、及び補助光源86は、識別対象薬剤の撮影画像を撮影するために使用される照明装置を構成する。図38は、補助光源86を取り外した状態の撮影補助装置80の上面図である。 The main light source 84 and the auxiliary light source 86 constitute an illumination device used to capture an image of the drug to be identified. FIG. 38 is a top view of the photographing auxiliary device 80 with the auxiliary light source 86 removed.
 主光源84は、側面板82Bに24個のLED85が一定の高さに水平方向に一定間隔にリング状に配置されて構成される。主光源84は常時点灯していてもよいし、点灯及び消灯するLED85が切り替えられてもよい。 The main light source 84 is composed of 24 LEDs 85 arranged in a ring shape at constant intervals in the horizontal direction at a constant height on the side plate 82B. The main light source 84 may be lit all the time, or the LED 85 may be switched on and off.
 補助光源86は、外形が円形であり、その中心部に円形の開口を有している平板状の平面白色光源である。補助光源86は、主光源84の照射光を拡散反射する無彩色の反射板であってもよい。識別対象薬剤に照射される補助光源86の照射光の照度は、識別対象薬剤に照射される主光源84の照射光の照度よりも相対的に低い。 The auxiliary light source 86 is a flat white light source with a circular outer shape and a circular opening in the center. The auxiliary light source 86 may be an achromatic reflector that diffusely reflects the light emitted from the main light source 84. The illuminance of the irradiation light from the auxiliary light source 86 that irradiates the identification target drug is relatively lower than the illuminance of the irradiation light from the main light source 84 that irradiates the identification target drug.
 撮影補助装置70、及び撮影補助装置80は、識別対象薬剤を撮影するスマートフォン10を、標準となる撮影距離及び撮影視点の位置で固定する不図示の固定機構を備えてもよい。固定機構は、スマートフォン10の撮影レンズ50の焦点距離に応じて識別対象薬剤及びカメラの間の距離を変更可能に構成されてもよい。 The photographing auxiliary device 70 and the photographing auxiliary device 80 may include a fixing mechanism (not shown) that fixes the smartphone 10 that photographs the drug to be identified at a standard photographing distance and photographing viewpoint position. The fixing mechanism may be configured to be able to change the distance between the identification target drug and the camera according to the focal length of the photographing lens 50 of the smartphone 10.
 〔照明装置〕
 図39は、他の実施形態に係る撮影補助装置としての照明装置81の構成を示す断面図である。図39に示す照明装置81は、図37及び図38で説明した撮影補助装置80の構成から底面板82Aと薬剤載置台74とを削除した構成となっている。その他の構成は、撮影補助装置80の構成と同様であってよい。なお、側面のLED85を覆う不図示の拡散板カバーなどを配置してもよい。
[Lighting device]
FIG. 39 is a cross-sectional view showing the configuration of an illumination device 81 as a photographic assistance device according to another embodiment. The illumination device 81 shown in FIG. 39 has a configuration in which the bottom plate 82A and the drug mounting table 74 are removed from the configuration of the photographic assistance device 80 described in FIGS. 37 and 38. The other configuration may be the same as the configuration of the photographic assisting device 80. Note that a diffuser cover (not shown) or the like may be arranged to cover the LED 85 on the side surface.
 <基準マーカの例>
 図40は、円形の円形マーカMC1を用いた薬剤載置台74の上面図である。図40に示すように、薬剤載置台74には、基準マーカ74A、74B、74C、及び74Dとして、円形の円形マーカMC1が四隅に配置されている。図40の左図F40Aは、基準マーカ74A、74B、74C、及び74Dの中心が正方形の4つの頂点を構成する例を示しており、図40の右図F40Bは、基準マーカ74A、74B、74C、及び74Dの中心が長方形の4つの頂点を構成する例を示している。基準マーカを4つ配置する理由は、標準化のための透視変換行列を決定するのに4点の座標が必要になるためである。
<Example of reference marker>
FIG. 40 is a top view of the medicine mounting table 74 using the circular marker MC1. As shown in FIG. 40, circular markers MC1 are arranged at the four corners of the medicine table 74 as reference markers 74A, 74B, 74C, and 74D. The left diagram F40A in FIG. 40 shows an example in which the centers of the reference markers 74A, 74B, 74C, and 74D constitute four vertices of a square, and the right diagram F40B in FIG. , and 74D constitute four vertices of a rectangle. The reason for arranging four reference markers is that the coordinates of four points are required to determine a perspective transformation matrix for standardization.
 ここでは、4つの基準マーカ74A、74B、74C、及び74Dは同じ大きさ、及び同じ色であるが、大きさ、及び色は異なっていてもよい。なお、大きさが異なる場合は、隣り合う基準マーカ74A、74B、74C、及び74Dの中心が正方形、又は長方形の4つの頂点を構成するように配置されることが好ましい。基準マーカの大きさ、又は色を異ならせることで、撮影方向の特定が容易になる。 Here, the four reference markers 74A, 74B, 74C, and 74D have the same size and the same color, but may have different sizes and colors. Note that when the sizes are different, it is preferable that the centers of the adjacent reference markers 74A, 74B, 74C, and 74D are arranged so as to constitute four vertices of a square or a rectangle. By making the reference markers different in size or color, it becomes easier to specify the shooting direction.
 また、円形マーカMC1は、少なくとも4つ配置されればよく、5つ以上配置されてもよい。5つ以上配置される場合、4つの円形マーカMC1の中心が正方形、又は長方形の4つの頂点を構成し、さらに追加される円形マーカMC1の中心が、正方形、又は長方形の辺上に配置されることが好ましい。5つ以上の基準マーカを配置することで、撮影方向の特定が容易になる。また、5つ以上の基準マーカを配置することで、いずれかの基準マーカの検出が失敗した場合であっても、標準化のための透視変換行列を求めるのに必要な最低4点を同時検出する確率を高めることができ、再撮影する手間を減らす等のメリットがある。 Furthermore, at least four circular markers MC1 may be arranged, and five or more circular markers MC1 may be arranged. When five or more circular markers MC1 are arranged, the centers of the four circular markers MC1 constitute four vertices of a square or rectangle, and the centers of the additional circular markers MC1 are arranged on the sides of the square or rectangle. It is preferable. By arranging five or more reference markers, the photographing direction can be easily identified. Additionally, by arranging five or more reference markers, even if detection of one of the reference markers fails, at least four points necessary to obtain the perspective transformation matrix for standardization can be detected simultaneously. This has the advantage of increasing the probability and reducing the time and effort required to re-photograph.
 円形マーカMC1は、直径が相対的に大きい外側の第1真円と、第1真円と同心状に配置され、第1真円よりも直径が相対的に小さい内側の第2真円とを備える。すなわち、第1真円及び第2真円は、同一の中心に配置された半径が異なる円である。また、円形マーカMC1は、第2真円の内側が白色であり、第1真円の内側、かつ第2真円の外側の領域が黒色に塗り潰されている。 The circular marker MC1 includes an outer first perfect circle with a relatively large diameter and an inner second perfect circle that is arranged concentrically with the first perfect circle and has a relatively smaller diameter than the first perfect circle. Be prepared. That is, the first perfect circle and the second perfect circle are circles that are arranged at the same center but have different radii. Further, in the circular marker MC1, the inside of the second perfect circle is white, and the area inside the first perfect circle and outside the second perfect circle is filled in black.
 第1真円の直径は、3ミリメートル~20ミリメートルであることが好ましい。また、第2真円の直径は、0.5ミリメートル~5ミリメートルであることが好ましい。さらに、第1真円と第2真円の直径の比率(第1真円の直径/第2真円の直径)は、2~10であることが好ましい。 The diameter of the first perfect circle is preferably 3 mm to 20 mm. Further, the diameter of the second perfect circle is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the diameters of the first perfect circle and the second perfect circle (diameter of the first perfect circle/diameter of the second perfect circle) is preferably 2 to 10.
 標準化前画像における真の物体の中心点と、機械学習において推定した中心点の座標とは、ずれる可能性がある。円形マーカMC1のように、内側の第2真円の中心点の座標を教師データとして与えることにより、機械学習に真の物体の中心座標の推定を正確かつ容易にさせることができる。また、外側の相対的に大きな第1真円の存在効果により、円形マーカMC1に付着したゴミ等による誤検出の可能性も大幅に少なくすることができる。 There is a possibility that the true center point of the object in the pre-standardization image and the coordinates of the center point estimated by machine learning may deviate. By giving the coordinates of the center point of the inner second perfect circle like the circular marker MC1 as training data, machine learning can accurately and easily estimate the true center coordinates of the object. Further, due to the effect of the presence of the relatively large first perfect circle on the outside, the possibility of erroneous detection due to dust or the like attached to the circular marker MC1 can be significantly reduced.
 図41は、変形例に係る円形マーカを用いた薬剤載置台74の上面図である。図41の左図F41Aは、基準マーカ74A、74B、74C、及び74Dとして円形マーカMC2を用いた例を示す図である。円形マーカMC2は、黒く塗り潰された真円の内側に、互いに直交する2本の白い直線からなるクロス型(十字型)の図形が、2本の直線の交点が真円の中心と一致するように配置されている。円形マーカMC2の基準マーカ74A、74B、74C、及び74Dは、それぞれの中心が正方形の4つの頂点を構成するように配置され、円形マーカMC2のクロス型の図形の直線は、この正方形の辺と平行に配置される。円形マーカMC2の基準マーカ74A、74B、74C、及び74Dは、それぞれの中心が長方形の4つの頂点を構成するように配置されてもよい。円形マーカMC2のクロス型の図形の線の太さは、適宜決めることができる。 FIG. 41 is a top view of a medicine placement table 74 using a circular marker according to a modification. The left diagram F41A in FIG. 41 is a diagram showing an example in which the circular marker MC2 is used as the reference markers 74A, 74B, 74C, and 74D. The circular marker MC2 has a cross-shaped figure made up of two white straight lines perpendicular to each other inside a black filled perfect circle so that the intersection of the two straight lines coincides with the center of the perfect circle. It is located in The reference markers 74A, 74B, 74C, and 74D of the circular marker MC2 are arranged so that their respective centers constitute four vertices of a square, and the straight lines of the cross-shaped figure of the circular marker MC2 are connected to the sides of this square. arranged in parallel. The reference markers 74A, 74B, 74C, and 74D of the circular marker MC2 may be arranged such that their centers constitute four vertices of a rectangle. The thickness of the line of the cross-shaped figure of the circular marker MC2 can be determined as appropriate.
 一方、図41の右図F40Bは、基準マーカ74A、74B、74C、及び74Dとして円形マーカMC3を用いた例を示す図である。円形マーカMC3は、同一の中心に配置された半径が異なる2つの真円を備え、内側の真円の内側が白色であり、外側の真円の内側、かつ内側の真円の外側の領域が黒色に塗り潰されている。さらに、円形マーカMC3は、内側の真円の内側に、互いに直交する2本の黒い直線からなるクロス型の図形が、2本の直線の交点が真円の中心と一致するように配置されている。円形マーカMC3の基準マーカ74A、74B、74C、及び74Dは、それぞれの中心が正方形の4つの頂点を構成するように配置され、円形マーカMC3のクロス型の図形の直線は、この正方形の辺と平行に配置される。円形マーカMC3の基準マーカ74A、74B、74C、及び74Dは、それぞれの中心が長方形の4つの頂点を構成するように配置されてもよい。円形マーカMC3のクロス型の図形の線の太さは、適宜決めることができる。 On the other hand, the right diagram F40B in FIG. 41 is a diagram showing an example in which the circular marker MC3 is used as the reference markers 74A, 74B, 74C, and 74D. The circular marker MC3 has two perfect circles with different radii placed at the same center, the inside of the inner perfect circle is white, and the area inside the outer perfect circle and outside the inner perfect circle is white. It is painted black. Further, in the circular marker MC3, a cross-shaped figure consisting of two black straight lines orthogonal to each other is arranged inside the inner perfect circle so that the intersection of the two straight lines coincides with the center of the perfect circle. There is. The reference markers 74A, 74B, 74C, and 74D of the circular marker MC3 are arranged so that their centers constitute four vertices of a square, and the straight lines of the cross-shaped figure of the circular marker MC3 are connected to the sides of this square. arranged in parallel. The reference markers 74A, 74B, 74C, and 74D of the circular marker MC3 may be arranged such that their centers constitute four vertices of a rectangle. The thickness of the line of the cross-shaped figure of the circular marker MC3 can be determined as appropriate.
 円形マーカMC2、及びMC3によれば、中心点座標の推定精度を高めることができる。また、円形マーカMC2、及びMC3によれば、薬剤と見た目が異なるので、マーカを認識しやすくなる。 According to the circular markers MC2 and MC3, it is possible to improve the estimation accuracy of the center point coordinates. Further, since the circular markers MC2 and MC3 have a different appearance from the medicine, the markers can be easily recognized.
 図42は、外形が四角形の基準マーカの具体例を示す図である。図41の左図F42Aは、四角形マーカMS1を示している。四角形マーカMS1は、一辺の長さが相対的に大きい外側の正方形SQ1と、正方形SQ1と同心状に配置され、正方形SQ1よりも一辺の長さが相対的に小さい内側の正方形SQ2を備える。すなわち、正方形SQ1及びSQ2は、同一の中心(重心)に配置された一辺の長さが異なる四角形である。また、四角形マーカMS1は、正方形SQ2の内側が白色であり、正方形SQ1の内側、かつ正方形SQ2の外側の領域が黒色に塗り潰されている。 FIG. 42 is a diagram showing a specific example of a reference marker having a rectangular outer shape. The left diagram F42A in FIG. 41 shows the rectangular marker MS1. The rectangular marker MS1 includes an outer square SQ1 with a relatively large side length and an inner square SQ2 that is arranged concentrically with the square SQ1 and has a relatively smaller side length than the square SQ1. That is, the squares SQ1 and SQ2 are quadrilaterals arranged at the same center (center of gravity) but having different lengths on one side. In addition, in the rectangular marker MS1, the inside of the square SQ2 is white, and the area inside the square SQ1 and outside the square SQ2 is filled in black.
 正方形SQ1の一辺の長さは、3ミリメートル~20ミリメートルであることが好ましい。また、正方形SQ2の一辺の長さは、0.5ミリメートル~5ミリメートルであることが好ましい。さらに、正方形SQ1と正方形SQ2の一辺の長さの比率(正方形SQ1の一辺の長さ/正方形SQ2の一辺の長さ)は、2~10であることが好ましい。より中心座標の推定精度を高める目的で、正方形SQ2の内側に正方形SQ2よりも一辺の長さが相対的に小さい不図示の黒色の矩形(例えば正方形)を同心状に配置してもよい。 The length of one side of the square SQ1 is preferably 3 mm to 20 mm. Further, the length of one side of the square SQ2 is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the lengths of one side of square SQ1 and square SQ2 (length of one side of square SQ1/length of one side of square SQ2) is preferably from 2 to 10. In order to further improve the accuracy of estimating the center coordinates, a black rectangle (for example, a square), not shown, whose side length is relatively smaller than that of the square SQ2 may be concentrically arranged inside the square SQ2.
 図42の右図F42Bは、四角形の四角形マーカMS1を用いた薬剤載置台74の上面図を示している。右図F41Bに示すように、薬剤載置台74には、基準マーカ74A、74B、74C、及び74Dとして、四角形の四角形マーカMS1が四隅に配置されている。ここでは、隣り合う基準マーカ74A、74B、74C、及び74Dの中心を結ぶ線が正方形を構成する例を示しているが、隣り合う基準マーカ74A、74B、74C、及び74Dの中心を結ぶ線が長方形を構成してもよい。 The right view F42B of FIG. 42 shows a top view of the medicine mounting table 74 using the rectangular square marker MS1. As shown in the right figure F41B, on the medicine table 74, rectangular markers MS1 are arranged at the four corners as reference markers 74A, 74B, 74C, and 74D. Here, an example is shown in which a line connecting the centers of adjacent reference markers 74A, 74B, 74C, and 74D forms a square. It may also be rectangular.
 図43は、他の変形例に係る円形マーカを用いた薬剤載置台74の上面図である。図42の左図F43Aは、基準マーカ74A、74B、74C、及び74Dとして円形マーカMC4を用いた例を示す図である。円形マーカMC4は、直径が相対的に大きい外側の第1真円と、第1真円と同心状に配置され、第1真円よりも直径が相対的に小さい内側の第2真円と、第2真円の内側に第2真円と同心状に配置され、第2真円よりも直径が相対的に小さい黒色の円(第3真円)とを備える。円形マーカMC4は、第2真円の内側が白色であり、第1真円の内側、かつ第2真円の外側の領域が黒色に塗り潰されている。 FIG. 43 is a top view of a medicine placement table 74 using a circular marker according to another modification. The left diagram F43A in FIG. 42 is a diagram showing an example in which circular marker MC4 is used as the reference markers 74A, 74B, 74C, and 74D. The circular marker MC4 includes an outer first perfect circle with a relatively large diameter, an inner second perfect circle that is arranged concentrically with the first perfect circle and has a relatively smaller diameter than the first perfect circle, and A black circle (third perfect circle) that is arranged concentrically with the second perfect circle inside the second perfect circle and has a diameter that is relatively smaller than the second perfect circle. In the circular marker MC4, the inside of the second perfect circle is white, and the area inside the first perfect circle and outside the second perfect circle is filled in black.
 第1真円の直径は、3ミリメートル~20ミリメートルであることが好ましい。また、第2真円の直径は、5ミリメートル~18ミリメートルであることが好ましい。第3真円の直径は0.5ミリメートル~5ミリメートルであることが好ましい。さらに、第1真円と第2真円の直径の比率(第1真円の直径/第2真円の直径)は、1.1~3であることが好ましい。さらに、第2真円と第3真円の直径の比率(第2真円の直径/第3真円の直径)は、2~10であることが好ましい。 The diameter of the first perfect circle is preferably 3 mm to 20 mm. Further, the diameter of the second perfect circle is preferably 5 mm to 18 mm. The diameter of the third perfect circle is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the diameters of the first perfect circle and the second perfect circle (diameter of the first perfect circle/diameter of the second perfect circle) is preferably 1.1 to 3. Furthermore, the ratio of the diameters of the second perfect circle and the third perfect circle (diameter of the second perfect circle/diameter of the third perfect circle) is preferably 2 to 10.
 図43の左図F43Aは、基準マーカ74A、74B、74C、及び74Dの中心が正方形の4つの頂点を構成する例を示しており、図43の右図F43Bは、基準マーカ74A、74B、74C、及び74Dの中心が長方形の4つの頂点を構成する例を示している。4つの円形マーカMC4を縦方向及び横方向に結ぶ直線が表示される。円形マーカMC4によれば、中心点座標の推定精度を高めることができる。また、円形マーカMC4を直線で結ぶことにより、マーカ及び薬剤載置範囲を認識しやすくなり、撮影画像に写る直線によって撮影画像の歪みを補正したり、標準化画像の切り出し範囲を特定したりするなどの対応も可能である。なお、これらの直線はなくてもよい。 The left diagram F43A in FIG. 43 shows an example in which the centers of the reference markers 74A, 74B, 74C, and 74D constitute four vertices of a square, and the right diagram F43B in FIG. , and 74D constitute four vertices of a rectangle. A straight line connecting the four circular markers MC4 in the vertical and horizontal directions is displayed. According to the circular marker MC4, it is possible to improve the estimation accuracy of the center point coordinates. In addition, by connecting the circular markers MC4 with straight lines, it becomes easier to recognize the marker and drug placement range, and the straight lines appearing in the captured image can be used to correct distortion of the captured image, specify the cropping range of the standardized image, etc. It is also possible to deal with Note that these straight lines may not be provided.
 図44は、四角形の基準マーカの他の具体例を示す図である。図44の左図F44Aは、四角形マーカMS2を示している。四角形マーカMS2は、一辺の長さが相対的に大きい外側の正方形SQ1と、正方形SQ1と同心状に配置され、正方形SQ1よりも一辺の長さが相対的に小さい内側の正方形SQ2と、正方形SQ2の内側に正方形SQ2と同心状に配置され、正方形SQ2よりも一辺の長さが相対的に小さい黒色の正方形SQ3と、を備える。正方形SQ1の一辺の長さは、3ミリメートル~20ミリメートルであることが好ましい。また、正方形SQ2の一辺の長さは、5ミリメートル~18ミリメートルであることが好ましい。正方形SQ3の一辺の長さは、0.5ミリメートル~5ミリメートルであることが好ましい。さらに、正方形SQ1と正方形SQ2の一辺の長さの比率(正方形SQ1の一辺の長さ/正方形SQ2の一辺の長さ)は、1.1~3であることが好ましい。正方形SQ2と正方形SQ3の一辺の長さの比率(正方形SQ2の一辺の長さ/正方形SQ3の一辺の長さ)は、2~10であることが好ましい。 FIG. 44 is a diagram showing another specific example of a rectangular reference marker. The left diagram F44A in FIG. 44 shows the rectangular marker MS2. The quadrilateral marker MS2 includes an outer square SQ1 whose side length is relatively large, an inner square SQ2 which is arranged concentrically with the square SQ1 and whose side length is relatively smaller than the square SQ1, and a square SQ2. A black square SQ3, which is arranged concentrically with the square SQ2 inside the square SQ2 and whose length on one side is relatively smaller than the square SQ2. The length of one side of the square SQ1 is preferably 3 mm to 20 mm. Further, the length of one side of the square SQ2 is preferably 5 mm to 18 mm. The length of one side of the square SQ3 is preferably 0.5 mm to 5 mm. Furthermore, the ratio of the lengths of one side of square SQ1 and square SQ2 (length of one side of square SQ1/length of one side of square SQ2) is preferably 1.1 to 3. The ratio of the lengths of one side of square SQ2 and square SQ3 (length of one side of square SQ2/length of one side of square SQ3) is preferably from 2 to 10.
 図44の右図F44Bは、四角形の四角形マーカMS2を用いた薬剤載置台74の上面図を示している。右図F44Bに示すように、薬剤載置台74には、基準マーカ74A、74B、74C、及び74Dとして、四角形の四角形マーカMS2が四隅に配置されている。ここでは、隣り合う基準マーカ74A、74B、74C、及び74Dの中心を結ぶ線が正方形を構成する例を示しているが、隣り合う基準マーカ74A、74B、74C、及び74Dの中心を結ぶ線が長方形を構成してもよい。また、図43と同様に、4つの四角形マーカMS2を縦方向及び横方向に結ぶ直線が表示されている。 The right diagram F44B in FIG. 44 shows a top view of the medicine mounting table 74 using the rectangular square marker MS2. As shown in the right figure F44B, quadrangular markers MS2 are arranged at the four corners of the medicine table 74 as reference markers 74A, 74B, 74C, and 74D. Here, an example is shown in which a line connecting the centers of adjacent reference markers 74A, 74B, 74C, and 74D forms a square. It may also be rectangular. Also, similar to FIG. 43, straight lines connecting the four rectangular markers MS2 in the vertical and horizontal directions are displayed.
 四角形マーカMS2によれば、中心点座標の推定精度を高めることができる。また、四角形マーカMS2を直線で結ぶことにより、マーカ及び薬剤載置範囲を認識しやすくなる。なお、これらの直線はなくてもよい。 According to the rectangular marker MS2, it is possible to improve the estimation accuracy of the center point coordinates. Furthermore, by connecting the rectangular markers MS2 with straight lines, it becomes easier to recognize the marker and the medicine placement range. Note that these straight lines may not be provided.
 薬剤載置台74には、円形マーカMCと四角形マーカMSとが混在していてもよい。円形マーカMCと四角形マーカMSとを混在させることで、撮影方向の特定が容易になる等の効果が期待できる。 The medicine mounting table 74 may include a mixture of circular markers MC and square markers MS. By mixing circular markers MC and square markers MS, effects such as easier identification of the photographing direction can be expected.
 さらに、四角形マーカよりも円形マーカを採用することが好ましい。基準マーカの検出をスマートフォン等の携帯端末装置で行う場合、下記の(a)~(c)の制約が存在するためである。
(a)携帯端末装置ではアプリに容量制限があるケースがあるため、マーカ検出と薬剤検出を同一の学習済みモデルで行うことが望ましい。
(b)薬剤検出では、楕円錠剤の切り抜き画像に他の薬剤の一部が入らないよう、回転ありのバウンディングボックスを使用するのが望ましい。この場合、要請(a)より、マーカ検出に対しても回転角度についての合理的な教師データを用意する必要がある。
(c)四角形マーカの場合、4回対称性によるバウンディングボックスの回転角度決定の任意性が存在するために、マーカ検出時の入力画像である標準化前画像における四角形マーカの回転角度に対する合理的な教師データ作成が困難である。対して、円形マーカであれば常に回転角度を0度とした合理的な教師データ作成が可能である。
Further, it is preferable to use a circular marker rather than a rectangular marker. This is because when detecting a reference marker using a mobile terminal device such as a smartphone, the following constraints (a) to (c) exist.
(a) Since applications in mobile terminal devices may have capacity limitations, it is desirable to perform marker detection and drug detection using the same trained model.
(b) In drug detection, it is desirable to use a bounding box with rotation so that part of another drug does not enter the cutout image of the oval tablet. In this case, according to request (a), it is necessary to prepare reasonable training data regarding the rotation angle for marker detection as well.
(c) In the case of a rectangular marker, there is an arbitrariness in determining the rotation angle of the bounding box due to 4-fold symmetry, so there is no reasonable teacher for the rotation angle of the rectangular marker in the pre-standardization image, which is the input image at the time of marker detection. Data creation is difficult. On the other hand, if a circular marker is used, it is possible to create rational training data with the rotation angle always being 0 degrees.
 また、円形マーカを同心状にすることで、マーカの中心座標の推定精度を高めることができる。標準化前画像では単純な円形マーカは形が歪み、中心座標推定に誤差が生じやすいが、同心円の内円はより範囲が狭い為、歪んだ標準化前画像であっても学習済みモデルが中心座標を特定しやすい。さらに、同心円の外円は、構造が大きく学習済みモデルが見つけやすい、ノイズ・ゴミに対して頑健になる、等のメリットがある。なお、四角形マーカについても、同心状とすることによりマーカの中心点座標の推定精度を高めることが可能である。 Furthermore, by making the circular markers concentric, it is possible to improve the accuracy of estimating the center coordinates of the markers. In pre-standardized images, a simple circular marker is distorted in shape and tends to cause errors in estimating the center coordinates, but since the inner circles of concentric circles have a narrower range, the trained model can easily estimate the center coordinates even in distorted pre-standardized images. Easy to identify. Furthermore, the outer circles of concentric circles have the advantage of having a large structure, making it easier to find trained models, and being robust against noise and dirt. Note that the accuracy of estimating the center point coordinates of the rectangular markers can also be improved by making them concentric.
 <薬剤載置台の他の態様>
 撮影補助装置の薬剤載置台の載置面は、薬剤を載置するくぼみ構造が設けられていてもよい。くぼみ構造は、くぼみ、溝、凹み、及び穴を含む。
<Other aspects of drug placement table>
The placement surface of the drug placement table of the photographic assistance device may be provided with a recessed structure on which the drug is placed. Indentation structures include depressions, grooves, depressions, and holes.
 図45は、薬剤載置台74(図33参照)に代えて、又は薬剤載置台74に加えて使用される薬剤載置台であって、くぼみ構造が設けられた薬剤載置台410を示す図である。薬剤載置台410は、紙、合成樹脂、繊維、ゴム、又はガラスによって構成される。図45の左図F45Aは、薬剤載置台410の上面図である。左図F45Aに示すように、薬剤載置台410の載置面は、グレーの色を有し、四隅には基準マーカ74A、74B、74C、及び74Dが配置されている。図45ではマーカの形状を円形マーカMC1を用いて示しているが、円形マーカMC1に限らず、円形マーカMC2、MC3、MC4、四角形マーカMS1、又はMS2であってもよい。 FIG. 45 is a diagram showing a drug mounting table 410 that is used in place of or in addition to the drug mounting table 74 (see FIG. 33) and is provided with a recessed structure. . The drug mounting table 410 is made of paper, synthetic resin, fiber, rubber, or glass. The left view F45A of FIG. 45 is a top view of the medicine mounting table 410. As shown in the left figure F45A, the placement surface of the drug placement table 410 has a gray color, and reference markers 74A, 74B, 74C, and 74D are arranged at the four corners. In FIG. 45, the shape of the marker is shown using a circular marker MC1, but it is not limited to the circular marker MC1, and may be a circular marker MC2, MC3, MC4, a square marker MS1, or MS2.
 さらに、薬剤載置台410の載置面には、くぼみ構造として3行×3列の計9つのくぼみ410A、410B、410C、410D、410E、410F、410G、410H、及び410Iが設けられている。くぼみ410A~410Iは、上面視においてそれぞれ同じ大きさの円形である。 Furthermore, a total of nine depressions 410A, 410B, 410C, 410D, 410E, 410F, 410G, 410H, and 410I are provided on the placement surface of the drug placement table 410 as a depression structure. The depressions 410A to 410I are circular in shape and have the same size when viewed from above.
 図45の右図F45Bは、薬剤載置台410の44-44線における断面図である。右図F45Bに示すように、くぼみ410A、410B、及び410Cは、半球状の底面を有し、それぞれ同じ深さである。くぼみ410D~410Iについても同様である。底面は完全な半球状である必要はなく、一定の曲率半径を持つ凹状の曲面あるいは緩やかに変化する曲率半径を持つ凹状の曲面であってもよい。 The right view F45B of FIG. 45 is a cross-sectional view of the drug mounting table 410 taken along the line 44-44. As shown in the right figure F45B, the depressions 410A, 410B, and 410C have hemispherical bottom surfaces and each have the same depth. The same applies to the depressions 410D to 410I. The bottom surface does not need to be perfectly hemispherical, and may be a concave curved surface with a constant radius of curvature or a concave curved surface with a gradually changing radius of curvature.
 また、右図F45Bには、くぼみ410A、410B、及び410Cにそれぞれ載置された錠剤T51、T52、及びT53を示している。錠剤T51、及びT52は、それぞれ上面視において円形であり、側面視において矩形の薬剤である。また、錠剤T53は、上面視において円形であり、側面視において楕円形の薬剤である。上面視において、錠剤T51、及び錠剤T53は同じ大きさであり、錠剤T52は錠剤T51、及び錠剤T53よりも相対的に小さい。右図F45Bに示すように、錠剤T51~T53は、くぼみ410A~410Cに嵌ることで、静置される。錠剤T51~T53は、上面視において円形であればよく、側面視において左右が直線状で上下が円弧状であってもよい。 In addition, right diagram F45B shows tablets T51, T52, and T53 placed in depressions 410A, 410B, and 410C, respectively. Tablets T51 and T52 are each medicines that are circular in top view and rectangular in side view. Moreover, the tablet T53 is a drug that is circular in top view and oval in side view. In a top view, tablet T51 and tablet T53 have the same size, and tablet T52 is relatively smaller than tablet T51 and tablet T53. As shown in the right figure F45B, the tablets T51 to T53 are placed in the recesses 410A to 410C and left still. The tablets T51 to T53 may have a circular shape when viewed from above, or may have a straight line on the left and right sides and an arc shape on the top and bottom when viewed from the side.
 このように、薬剤載置台410によれば、載置面に半球状のくぼみ構造を備えたことで、上面視において円形の薬剤が移動することを防止し、静置することができる。また、薬剤の撮影時の位置をくぼみ構造の位置に決定することができるので、薬剤の領域の検出が容易になる。 In this way, according to the drug placement table 410, by providing the placement surface with a hemispherical recessed structure, the circular drug can be prevented from moving when viewed from above and can be left stationary. Furthermore, since the position of the medicine at the time of photographing can be determined to be the position of the depression structure, it becomes easy to detect the medicine area.
 薬剤載置台は、カプセル薬剤のような、転がるタイプの薬剤向けのくぼみ構造を有してもよい。図46は、カプセル薬剤向けのくぼみ構造が設けられた薬剤載置台412を示す図である。なお、図45と共通する部分には同一の符号を付し、その詳細な説明は省略する。 The medicine table may have a recessed structure for rolling type medicines such as capsule medicines. FIG. 46 is a diagram showing a drug mounting table 412 provided with a recessed structure for capsule drugs. Note that parts common to those in FIG. 45 are given the same reference numerals, and detailed explanation thereof will be omitted.
 図46の左図F46Aは、薬剤載置台412の上面図である。左図F46Aに示すように、薬剤載置台412の載置面には、くぼみ構造として3行×2列の計6つのくぼみ412A、412B、412C、412D、412E、及び412Fが設けられている。くぼみ412A~412Fは、それぞれ上面視において同じ大きさの長方形である。くぼみは完全な半球状である必要はなく、一定の曲率半径を持つ凹状の曲面あるいは緩やかに変化する曲率半径を持つ凹状の曲面であってもよい。 The left view F46A in FIG. 46 is a top view of the medicine mounting table 412. As shown in the left figure F46A, a total of six depressions 412A, 412B, 412C, 412D, 412E, and 412F are provided on the placement surface of the drug placement table 412 as a depression structure in 3 rows and 2 columns. The depressions 412A to 412F are each rectangular in size when viewed from above. The recess need not be perfectly hemispherical, but may be a concave curved surface with a constant radius of curvature or a concave curved surface with a gradually changing radius of curvature.
 図46の右図F46Bは、薬剤載置台412の46-46線における断面図である。右図F46Bに示すように、くぼみ412A、412B、及び412Cは、半円筒状の底面を有し、それぞれ同じ深さである。くぼみ412D~412Fについても同様である。また、F63Bには、くぼみ412A、412B、及び412Cにそれぞれ載置されたカプセル薬剤CP1、CP2、及びCP3を示している。カプセル薬剤CP1~CP3は、両端(両底面)が半球状の円柱形であり、それぞれ直径が異なる。右図F46Bに示すように、カプセル薬剤CP1~CP3は、くぼみ412A~412Cに嵌ることで、静置される。 The right view F46B of FIG. 46 is a cross-sectional view of the drug mounting table 412 taken along the line 46-46. As shown in right figure F46B, depressions 412A, 412B, and 412C have semi-cylindrical bottoms and are each of the same depth. The same applies to the depressions 412D to 412F. Furthermore, F63B shows capsule medicines CP1, CP2, and CP3 placed in recesses 412A, 412B, and 412C, respectively. Capsule drugs CP1 to CP3 have a cylindrical shape with hemispherical ends (bottom surfaces), and have different diameters. As shown in the right figure F46B, the capsule medicines CP1 to CP3 are placed in the recesses 412A to 412C and left still.
 このように、薬剤載置台412によれば、載置面に半円筒状のくぼみ構造を備えたことで、円柱形のカプセル薬剤が移動したり転がったりすることを防止し、静置することができる。また、薬剤の撮影時の位置をくぼみ構造の位置に決定することができるので、薬剤の領域の検出が容易になる。 In this way, according to the drug placement table 412, by providing the placement surface with the semi-cylindrical recessed structure, the cylindrical capsule drug can be prevented from moving or rolling, and can be left still. can. Furthermore, since the position of the medicine at the time of photographing can be determined to be the position of the depression structure, it becomes easy to detect the medicine area.
 また、薬剤載置台は、楕円形の錠剤向けのくぼみ構造を有してもよい。図47は、楕円形の錠剤向けのくぼみ構造が設けられた薬剤載置台414を示す図である。なお、図46と共通する部分には同一の符号を付し、その詳細な説明は省略する。 Additionally, the drug mounting table may have a recessed structure for elliptical tablets. FIG. 47 is a diagram showing a medicine platform 414 provided with a concave structure for oval tablets. Note that parts common to those in FIG. 46 are denoted by the same reference numerals, and detailed explanation thereof will be omitted.
 図47の左図F47Aは、薬剤載置台414の上面図である。左図F47Aに示すように、薬剤載置台414の載置面には、くぼみ構造として3行×2列の計6つのくぼみ414A、414B、414C、414D、414E、及び414Fが設けられている。くぼみ414A~414Fは、それぞれ上面視において長方形である。 The left view F47A of FIG. 47 is a top view of the medicine mounting table 414. As shown in the left figure F47A, a total of six depressions 414A, 414B, 414C, 414D, 414E, and 414F are provided on the placement surface of the drug placement table 414 as a depression structure in 3 rows and 2 columns. Each of the recesses 414A to 414F is rectangular when viewed from above.
 くぼみ414A、及び414Bは同じ大きさである。くぼみ414C、及び414Dは同じ大きさであり、くぼみ414A、及び414Bより相対的に小さい。くぼみ414E、及び414Fは同じ大きさであり、くぼみ414C、及び414Dより相対的に小さい。 The recesses 414A and 414B have the same size. Recesses 414C and 414D have the same size and are relatively smaller than recesses 414A and 414B. Recesses 414E and 414F have the same size and are relatively smaller than recesses 414C and 414D.
 また、左図F47Aには、くぼみ414B、414D、及び414Fにそれぞれ載置された錠剤T61、T62、及びT63を示している。左図F47Aに示すように、くぼみ414B、414D、及び414Fは、それぞれ錠剤T61、T62、及びT63に対応した大きさである。 In addition, the left diagram F47A shows tablets T61, T62, and T63 placed in the recesses 414B, 414D, and 414F, respectively. As shown in the left diagram F47A, the depressions 414B, 414D, and 414F have sizes corresponding to the tablets T61, T62, and T63, respectively.
 図47の右図F47Bは、薬剤載置台414の47-47線における断面図である。右図F47Bに示すように、くぼみ414A、及び414Bは、平坦な底面を有する。右図F47Bに示すように、錠剤T61は、くぼみ414Bに嵌ることで、静置される。錠剤T62、及びT63についても同様である。 The right view F47B in FIG. 47 is a cross-sectional view of the drug mounting table 414 taken along the line 47-47. As shown in the right figure F47B, the recesses 414A and 414B have flat bottom surfaces. As shown in the right figure F47B, the tablet T61 is placed in the depression 414B and left still. The same applies to tablets T62 and T63.
 このように、薬剤載置台414によれば、載置面に直方体状のくぼみ構造を備えたことで、楕円形の錠剤が移動することを防止し、静置することができる。また、薬剤の撮影時の位置をくぼみ構造の位置に決定することができるので、薬剤の領域の検出が容易になる。 In this way, according to the drug placement table 414, by providing the placement surface with the rectangular parallelepiped-shaped recessed structure, it is possible to prevent the oval-shaped tablet from moving and to allow it to stand still. Furthermore, since the position of the medicine at the time of photographing can be determined to be the position of the depression structure, it becomes easy to detect the medicine area.
 なお、くぼみ構造の形状、数、及び配置は、図45~図47に示した態様に限定されず、適宜組み合わせてもよいし、拡大、又は縮小してもよい。 Note that the shape, number, and arrangement of the recess structures are not limited to the embodiments shown in FIGS. 45 to 47, and may be appropriately combined, enlarged, or reduced.
 <各処理部及び制御部のハードウェア構成について>
 図5で説明した画像取得部112、薬剤検出器114、領域修正部116、薬剤領域切出部118、薬剤識別器120、テキスト検索部122、表示制御部124、倍率変更部125、入力処理部126、図17で説明した刻印抽出部140、外形抽出部142、サイズ計測部144、損失演算部152、オプティマイザ154、図32で説明した薬種特定処理制御部160、グループ判別部162、薬種推定結果提示処理部170、カプセル薬剤特定処理部172、カプセル薬剤検索部173、無地薬剤特定処理部174、無地薬剤検索部175,分割錠剤特定処理部176、分割錠剤検索部177、及び分割錠剤画像登録部178などの各種の処理を実行する処理部(processing unit)のハードウェア的な構造は、次に示すような各種のプロセッサ(processor)である。
<About the hardware configuration of each processing unit and control unit>
The image acquisition unit 112, drug detector 114, area correction unit 116, drug area extraction unit 118, drug identifier 120, text search unit 122, display control unit 124, magnification change unit 125, and input processing unit described in FIG. 5 126, the stamp extraction unit 140, the outer shape extraction unit 142, the size measurement unit 144, the loss calculation unit 152, the optimizer 154, which were explained in FIG. Presentation processing unit 170, capsule medicine identification processing unit 172, capsule medicine search unit 173, plain medicine identification processing unit 174, plain medicine search unit 175, split tablet identification processing unit 176, split tablet search unit 177, and split tablet image registration unit The hardware structure of a processing unit that executes various processes such as 178 is the following various processors.
 各種のプロセッサには、プログラムを実行して各種の処理部として機能する汎用的なプロセッサであるCPU(Central Processing Unit)、画像処理に特化したプロセッサであるGPU(Graphics Processing Unit)、FPGA(Field Programmable Gate Array)などの製造後に回路構成を変更可能なプロセッサであるプログラマブルロジックデバイス(Programmable Logic Device:PLD)、ASIC(Application Specific Integrated Circuit)などの特定の処理を実行させるために専用に設計された回路構成を有するプロセッサである専用電気回路などが含まれる。 Various types of processors include the CPU (Central Processing Unit), which is a general-purpose processor that executes programs and functions as various processing units, the GPU (Graphics Processing Unit), which is a processor specialized in image processing, and the FPGA (Field Processing Unit). Programmable Logic Devices (PLDs), which are processors whose circuit configuration can be changed after manufacturing, such as Programmable Gate Arrays, and ASICs (Application Specific Integrated Circuits), which are specifically designed to perform specific processes. This includes a dedicated electric circuit that is a processor having a circuit configuration.
 1つの処理部は、これら各種のプロセッサのうちの1つで構成されていてもよいし、同種又は異種の2つ以上のプロセッサで構成されてもよい。例えば、1つの処理部は、複数のFPGA、或いは、CPUとFPGAの組み合わせ、又は、CPUとGPUの組み合わせなどによって構成されてもよい。また、複数の処理部を1つのプロセッサで構成してもよい。複数の処理部を1つのプロセッサで構成する例としては、第一に、クライアントやサーバなどのコンピュータに代表されるように、1つ以上のCPUとソフトウェアの組み合わせで1つのプロセッサを構成し、このプロセッサが複数の処理部として機能する形態がある。第二に、システムオンチップ(System On Chip:SoC)などに代表されるように、複数の処理部を含むシステム全体の機能を1つのIC(Integrated Circuit)チップで実現するプロセッサを使用する形態がある。このように、各種の処理部は、ハードウェア的な構造として、上記各種のプロセッサを1つ以上用いて構成される。 One processing unit may be composed of one of these various processors, or may be composed of two or more processors of the same type or different types. For example, one processing unit may be configured by a plurality of FPGAs, a combination of a CPU and an FPGA, a combination of a CPU and a GPU, or the like. Further, the plurality of processing units may be configured with one processor. As an example of configuring multiple processing units with one processor, first, one processor is configured with a combination of one or more CPUs and software, as typified by computers such as clients and servers. There is a form in which a processor functions as multiple processing units. Second, there are processors that use a single IC (Integrated Circuit) chip, such as System On Chip (SoC), which implements the functions of an entire system including multiple processing units. be. In this way, various processing units are configured using one or more of the various processors described above as a hardware structure.
 さらに、これらの各種のプロセッサのハードウェア的な構造は、より具体的には、半導体素子などの回路素子を組み合わせた電気回路(circuitry)である。 Furthermore, the hardware structure of these various processors is, more specifically, an electric circuit (circuitry) that is a combination of circuit elements such as semiconductor elements.
 <薬種識別装置100の機能を実現させるプログラムについて>
 薬種識別装置100の処理機能はスマートフォン10に限らず、タブレット型コンピュータ、パーソナルコンピュータ、あるいはワークステーションなど、様々な形態の情報処理装置を用いて実現することができる。上記の実施形態で説明した薬種識別装置100の処理機能の一部又は全部をコンピュータに実現させるプログラムを光ディスク、磁気ディスク、若しくは、半導体メモリその他の有体物たる非一時的な情報記憶媒体であるコンピュータ可読媒体に記録し、この情報記憶媒体を通じてプログラムを提供することが可能である。またこのような有体物たる非一時的な情報記憶媒体にプログラムを記憶させて提供する態様に代えて、インターネットなどの電気通信回線を利用してプログラム信号をダウンロードサービスとして提供することも可能である。
<About the program that realizes the functions of the drug type identification device 100>
The processing functions of the drug type identification device 100 are not limited to the smartphone 10, and can be realized using various forms of information processing devices such as a tablet computer, a personal computer, or a workstation. A computer-readable program that allows a computer to implement part or all of the processing functions of the drug type identification device 100 described in the above embodiments is a non-transitory information storage medium such as an optical disk, a magnetic disk, or a semiconductor memory or other tangible object. It is possible to record the program on a medium and provide the program through this information storage medium. Furthermore, instead of providing the program by storing it in a tangible, non-temporary information storage medium, it is also possible to provide the program signal as a download service using a telecommunications line such as the Internet.
 また、上記の実施形態で説明した薬種識別装置100の処理機能の一部をアプリケーションサーバとして提供し、電気通信回線を通じて処理機能を提供するサービスを行うことも可能である。 Furthermore, it is also possible to provide a part of the processing functions of the drug type identification device 100 described in the above embodiment as an application server, and provide a service that provides the processing functions through a telecommunications line.
 <実施形態の効果>
 実施形態に係る薬種識別装置100によれば、薬種特定可能薬剤と薬種特定困難薬剤とが混在した状態で撮影された画像であっても画像内の個々の薬剤の種類、又は薬剤が属するグループを自動的に識別して、薬種特定困難薬剤については各グループに特有の処理に移行して、種類の特定を支援するGUIを提供することができる。このため、薬学的観点から意味のある単位で複数の薬剤をまとめて撮影して、個々の薬剤を特定することが可能になる。
<Effects of embodiment>
According to the drug type identification device 100 according to the embodiment, even if an image is taken in which a drug whose drug type can be identified and a drug whose drug type is difficult to identify are mixed, it is possible to identify the type of each drug in the image or the group to which the drug belongs. It is possible to automatically identify the drug, shift to processing specific to each group for drugs whose drug type is difficult to identify, and provide a GUI that supports identification of the type. For this reason, it becomes possible to collectively image a plurality of drugs in meaningful units from a pharmaceutical standpoint and identify each drug.
 [変形例1]
 薬剤識別器120は、テンプレートマッチングの手法による画像認識器を含んで構成されてもよい。
[Modification 1]
The drug identifier 120 may include an image recognizer using a template matching technique.
 [変形例2]
 上記の実施形態では薬剤の鑑別を行う場合の例を説明したが、薬剤監査を行う場合についても本開示の技術を適用できる。また、上記の実施形態では、識別対象の物体が薬剤である場合の例を説明したが、識別対象の物体は薬剤に限らない。本開示の技術は、物体の種類及び用途などによらず、様々な物体について、画像から物体を識別する技術として適用することができる。
[Modification 2]
Although the above embodiment describes an example of a case where drugs are discriminated, the technology of the present disclosure can also be applied to a case where a drug audit is performed. Further, in the above embodiment, an example has been described in which the object to be identified is a drug, but the object to be identified is not limited to a drug. The technology of the present disclosure can be applied as a technology for identifying an object from an image with respect to various objects, regardless of the type of object and its purpose.
 <用語の説明>
 本開示において「物体」とは、階層構造による分類を観念できる物をいう。分類の階層構造の特定の深さのことを粒度といい、当該粒度において物体はいずれかの「種類」に属するものとする。「識別」とは、ある特定の粒度において、対象物がどの種類に属するかを決定することをいう。
<Explanation of terms>
In the present disclosure, an "object" refers to an object that can be classified according to a hierarchical structure. The specific depth of the hierarchical structure of classification is called granularity, and an object belongs to one of the "types" at that granularity. "Identification" refers to determining which type an object belongs to at a certain granularity.
 階層構造は、識別の目的に応じて定義してよい。 The hierarchical structure may be defined depending on the purpose of identification.
 上記の「ある特定の粒度」は、識別の目的に応じて決まるものとする。 The above-mentioned "certain granularity" shall be determined depending on the purpose of identification.
 共通の特徴を持つ物体の集合をグループという。グループは、種類と関係があってもよいし、なくてもよい。グループは、上記階層構造上における当該種類の上位の階層を指してもよいし、便宜上新たに定義した(上記階層構造とは無関係の)集合であってもよい。グループは、識別の目的に応じて決めて定義してよい。 A collection of objects with common characteristics is called a group. Groups may or may not be related to types. The group may refer to an upper layer of the type in the above hierarchical structure, or may be a newly defined set (unrelated to the above hierarchical structure) for convenience. Groups may be determined and defined depending on the purpose of identification.
 〔具体例〕
 薬剤は、薬効分類による階層構造や、外見上の特徴による階層構造での分類を観念できる物である。薬剤識別は、対象薬剤がどのYJコードの医薬品であるかを決定する行為として定義し得る(これは薬剤識別の定義の一例であって、例えば識別符号はYJコード以外の種類を用いて定義してもよい)。上記の実施形態において説明した「カプセル薬剤」及び「無地錠剤」の各グループは、便宜上新たに定義した種類の集合である。また、「半錠剤」のグループは、便宜上新たに定義した薬剤の集合である。YJコードという種類とは無関係の集合であるが、薬剤識別の目的はあくまでも半錠剤のYJコードを特定することである。
〔Concrete example〕
Drugs are objects that can be classified in a hierarchical structure based on medicinal efficacy classification or hierarchical structure based on external characteristics. Drug identification can be defined as the act of determining which YJ code the target drug has (this is an example of the definition of drug identification; for example, the identification code may be defined using a type other than the YJ code ). Each group of "capsule drug" and "plain tablet" explained in the above embodiment is a set of types newly defined for convenience. Furthermore, the "half-tablet" group is a group of drugs newly defined for convenience. Although the YJ code is a set unrelated to the type, the purpose of drug identification is to specify the YJ code of half a tablet.
 《その他》
 本発明の技術的範囲は、上記した実施形態及び変形例に記載の範囲には限定されない。実施形態及び変形例における構成等は、本発明の趣旨を逸脱しない範囲で変更可能であり、実施形態及び変形例間で適宜組み合わせることができる。
"others"
The technical scope of the present invention is not limited to the scope described in the above-described embodiments and modifications. The configurations of the embodiments and modified examples can be changed without departing from the spirit of the present invention, and the embodiments and modified examples can be combined as appropriate.
10 スマートフォン
12 筐体
14 タッチパネルディスプレイ
14A 表示部
14B 入力部
16 スピーカ
18 マイクロフォン
20 インカメラ
22 アウトカメラ
24 ライト
26 スイッチ
28 CPU
30 無線通信部
32 通話部
34 メモリ
36 内部記憶部
38 外部記憶部
40 外部入出力部
42 GPS受信部
44 電源部
50 撮影レンズ
50F フォーカスレンズ
50Z ズームレンズ
54 撮像素子
58 A/D変換器
60 レンズ駆動部
70 撮影補助装置
72 筐体
72A 底面板
72B 側面板
72C 側面板
72D 側面板
72E 側面板
74 薬剤載置台
74A、74B、74C、74D 基準マーカ
75 主光源
78 補助光源
80 撮影補助装置
81 照明装置
82 筐体
82A 底面板
82B 側面板
84 主光源
86 補助光源
100 薬種識別装置
102 プロセッサ
104 記憶装置
112 画像取得部
114 薬剤検出器
116 領域修正部
118 薬剤領域切出部
120 薬剤識別器
122 テキスト検索部
124 表示制御部
125 倍率変更部
126 入力処理部
130 データベース
131 マスタ画像データベース
132 識別結果記憶部
140 刻印抽出部
142 外形抽出部
144 サイズ計測部
150 機械学習システム
151 学習モデル
152 損失演算部
154 オプティマイザ
160 薬種特定処理制御部
162 グループ判別部
170 薬種推定結果提示処理部
172 カプセル薬剤特定処理部
173 カプセル薬剤検索部
174 無地薬剤特定処理部
175 無地薬剤検索部
176 分割錠剤特定処理部
177 分割錠剤検索部
178 分割錠剤画像登録部
410 薬剤載置台
410A、410B、410C、410D くぼみ
410E、410F、410G、410H、410I くぼみ
412 薬剤載置台
412A、412B、412C、412D くぼみ
412E、412F くぼみ
414 薬剤載置台
414A、414B、414C、414D くぼみ
414E、414F くぼみ
Abs 領域
BDA ボタン表示部
BT2 領域追加ボタン
BT3 領域削除ボタン
BT4 刻印テキスト検索ボタン
BT5 薬種確定ボタン
BT6 薬種確定保留ボタン
BT7 再撮影ボタン
BT8 完了ボタン
BT9 右矢印ボタン
BT10 左矢印ボタン
BT11 矢印ボタン
BT12 検索ボタン
BT13 カプセル一覧ボタン
BT14 無地薬剤一覧ボタン
BT15 分割錠剤呼出ボタン
BX、BX1、BX2、BX3、BX4 枠
CB チェックボックス
CDA 候補表示部
CP1、CP2、CP3 カプセル薬剤
DR1、DR2、DR3、DRj 薬剤
EDA 全体画像表示部
Egm、Egm1、Egm2、Egm3、Egm4、Egm5 刻印抽出画像
F40A 左図
F40B 右図
F41A 左図
F41B 右図
F42A 左図
F42B 右図
F43A 左図
F43B 右図
F44A 左図
F44B 右図
F45A 左図
F45B 右図
F46A 左図
F46B 右図
F47A 左図
F47B 右図
GTj 正解データ
IB1 入力ボックス
IB2 入力ボックス
IM1j 刻印抽出画像
IM2j 外形画像
IMj 薬剤画像
LS1 分割錠剤画像表示部
LS2 候補薬剤画像表示部
MC、MC1、MC2、MC3、MC4 円形マーカ
MGj 倍率情報
MS、MS1、MS2 四角形マーカ
Org、Org1、Org2、Org3、Org4、Org5 元画像
Otw、Otw1、Otw2、Otw3、Otw4、Otw5 外形画像
PDM プルダウンメニュー
PRj 推論結果
SBT1、SBT2、SBT3 検索ボタン
SBX1 検索ボックス
SBX2 テキスト検索ボックス
SBX3 検索ボックス
SC1、SC2、SC3、SC4、SC5、SC6、SC7、SC8、SC9 画面
SLB1、SLB2、SLB3、SLB4、SLB5 選択ボックス
SQ1、SQ2、SQ3 正方形
SRB スクロールバー
SRD カプセル画像表示部
SRD2 無地薬剤画像表示部
ST1 GPS衛星
ST2 GPS衛星
SW1 領域編集スイッチ
SZB サイズ検索ボックス
SZj サイズ情報
T1、T2、T3、T4、T5 薬剤
T51、T52、T53 錠剤
T61、T62、T63 錠剤
TM1 第1学習済みモデル
TM2 第2学習済みモデル
S1~S5 薬種識別装置を構成するための学習方法のステップ
S11~S16 薬種識別方法のステップ
S21~S29 薬種識別方法のステップ
10 Smartphone 12 Housing 14 Touch panel display 14A Display section 14B Input section 16 Speaker 18 Microphone 20 In-camera 22 Out-camera 24 Light 26 Switch 28 CPU
30 Wireless communication section 32 Call section 34 Memory 36 Internal storage section 38 External storage section 40 External input/output section 42 GPS reception section 44 Power supply section 50 Photographic lens 50F Focus lens 50Z Zoom lens 54 Image sensor 58 A/D converter 60 Lens drive Part 70 Photography auxiliary device 72 Housing 72A Bottom plate 72B Side plate 72C Side plate 72D Side plate 72E Side plate 74 Drug placement tables 74A, 74B, 74C, 74D Reference marker 75 Main light source 78 Auxiliary light source 80 Photography auxiliary device 81 Illumination device 82 Housing 82A Bottom plate 82B Side plate 84 Main light source 86 Auxiliary light source 100 Drug type identification device 102 Processor 104 Storage device 112 Image acquisition unit 114 Drug detector 116 Area correction unit 118 Drug area extraction unit 120 Drug identifier 122 Text search unit 124 Display control unit 125 Magnification change unit 126 Input processing unit 130 Database 131 Master image database 132 Identification result storage unit 140 Engraving extraction unit 142 Outline extraction unit 144 Size measurement unit 150 Machine learning system 151 Learning model 152 Loss calculation unit 154 Optimizer 160 Drug type identification Process control section 162 Group discrimination section 170 Drug type estimation result presentation processing section 172 Capsule drug identification processing section 173 Capsule drug search section 174 Plain drug identification processing section 175 Plain drug search section 176 Divided tablet identification processing section 177 Divided tablet search section 178 Divided tablet Image registration unit 410 Drug placement table 410A, 410B, 410C, 410D Hollow 410E, 410F, 410G, 410H, 410I Hollow 412 Drug placement table 412A, 412B, 412C, 412D Hollow 412E, 412F Hollow 414 Drug placement table 414A, 41 4B, 414C , 414D Hollow 414E, 414F Hollow Abs Area BDA Button display area BT2 Add area button BT3 Area delete button BT4 Engraved text search button BT5 Drug type confirmation button BT6 Drug type confirmation hold button BT7 Reshoot button BT8 Complete button BT9 Right arrow button BT10 Left arrow button BT11 Arrow button BT12 Search button BT13 Capsule list button BT14 Plain drug list button BT15 Divided tablet call button BX, BX1, BX2, BX3, BX4 Frame CB Check box CDA Candidate display area CP1, CP2, CP3 Capsule drug DR1, DR2, DR3, DRj Drug EDA Whole image display area Egm, Egm1, Egm2, Egm3, Egm4, Egm5 Stamp extraction image F40A Left figure F40B Right figure F41A Left figure F41B Right figure F42A Left figure F42B Right figure F43A Left figure F43B Right figure F44A Left figure F44B Right Figure F45A Left figure F45B Right figure F46A Left figure F46B Right figure F47A Left figure F47B Right figure GTj Correct data IB1 Input box IB2 Input box IM1j Engraving extraction image IM2j External image IMj Drug image LS1 Divided tablet image display section LS2 Candidate drug image display section MC, MC1, MC2, MC3, MC4 Circular marker MGj Magnification information MS, MS1, MS2 Rectangular marker Org, Org1, Org2, Org3, Org4, Org5 Original image Otw, Otw1, Otw2, Otw3, Otw4, Otw5 Outer image PDM Pull-down menu PRj Inference results SBT1, SBT2, SBT3 Search button SBX1 Search box SBX2 Text search box SBX3 Search box SC1, SC2, SC3, SC4, SC5, SC6, SC7, SC8, SC9 Screen SLB1, SLB2, SLB3, SLB4, SLB5 Selection box SQ1 , SQ2, SQ3 Square SRB Scroll bar SRD Capsule image display section SRD2 Plain drug image display section ST1 GPS satellite ST2 GPS satellite SW1 Area editing switch SZB Size search box SZj Size information T1, T2, T3, T4, T5 Drug T51, T52, T53 Tablets T61, T62, T63 Tablet TM1 First trained model TM2 Second trained model S1 to S5 Steps S11 to S16 of the learning method for configuring the drug type identification device Steps S21 to S29 of the drug type identification method step

Claims (24)

  1.  複数の物体が撮影された画像から前記物体を物体単位で検出する検出器と、
     前記検出器によって検出された前記物体のうち、前記画像から前記物体の種類まで特定できる種類特定可能物体については前記画像から前記物体の種類を推定し、前記画像から前記物体の種類までは特定困難であるが前記物体が属するグループを特定できる種類特定困難物体については前記画像から前記グループを推定する識別器と、
     前記識別器により前記グループとして推定された前記物体について前記種類の特定につながるグループ特有の処理を行う処理部と、
     を備える物体識別装置。
    a detector that detects each object from an image of a plurality of objects;
    Among the objects detected by the detector, if the type of the object can be identified from the image, the type of the object is estimated from the image, and the type of the object is difficult to identify from the image. However, for objects whose type is difficult to identify to which the group the object belongs, a classifier that estimates the group from the image;
    a processing unit that performs group-specific processing that leads to identification of the type of the objects estimated as the group by the discriminator;
    An object identification device comprising:
  2.  前記画像は、前記種類特定可能物体と前記種類特定困難物体とが混在している状態で撮影された画像である、
     請求項1に記載の物体識別装置。
    The image is an image taken in a state in which the object whose type can be identified and the object whose type is difficult to identify are mixed.
    The object identification device according to claim 1.
  3.  前記種類特定困難物体は、複数の前記グループに分類され、
     それぞれの前記グループに対して前記グループ特有の処理が定められている、
     請求項1又は2に記載の物体識別装置。
    The hard-to-identify object is classified into a plurality of groups,
    Group-specific processing is defined for each of the groups;
    The object identification device according to claim 1 or 2.
  4.  前記検出器は、前記種類特定可能物体と前記種類特定困難物体とを区別せずに前記物体単位でラベル付けした第1の訓練データを用いて機械学習により訓練された第1の学習済みモデルを含む、
     請求項1から3のいずれか一項に記載の物体識別装置。
    The detector is configured to generate a first learned model trained by machine learning using first training data in which each object is labeled without distinguishing between the object whose type can be identified and the object whose type is difficult to identify. include,
    The object identification device according to any one of claims 1 to 3.
  5.  前記識別器は、前記種類特定可能物体については前記物体の種類単位でラベル付けし、前記種類特定困難物体については前記物体が属するグループ単位でラベル付けした第2の訓練データを用いて機械学習により訓練された第2の学習済みモデルを含む、
     請求項1から4のいずれか一項に記載の物体識別装置。
    The discriminator performs machine learning using second training data in which the object whose type can be identified is labeled by the type of the object, and the object whose type is difficult to identify is labeled by the group to which the object belongs. comprising a trained second learned model;
    The object identification device according to any one of claims 1 to 4.
  6.  前記グループを識別するラベルは階層構造で定義されている、
     請求項1から5のいずれか一項に記載の物体識別装置。
    Labels identifying the groups are defined in a hierarchical structure;
    The object identification device according to any one of claims 1 to 5.
  7.  前記識別器への入力として、前記画像から前記検出器によって検出された前記物体の領域を前記物体単位で切り出した物体画像、前記物体画像から抽出された文字及び記号のうち少なくとも一方を含む文字記号抽出画像、前記物体の外形画像、及び前記物体のサイズ情報のうち少なくとも1つを用いる、
     請求項1から6のいずれか一項に記載の物体識別装置。
    As input to the discriminator, an object image obtained by cutting out a region of the object detected by the detector from the image in units of objects, and a character symbol including at least one of a character and a symbol extracted from the object image. using at least one of an extracted image, an external shape image of the object, and size information of the object;
    An object identification device according to any one of claims 1 to 6.
  8.  前記識別器への入力として、さらに、前記物体画像の拡大又は縮小率を示す倍率情報を用いる、
     請求項7に記載の物体識別装置。
    further using magnification information indicating an enlargement or reduction ratio of the object image as input to the discriminator;
    The object identification device according to claim 7.
  9.  前記グループ特有の前記処理は、前記推定された前記グループ内で前記物体の種類を検索するための検索条件の入力を受け付ける画面を表示させる処理を含む、
     請求項1から8のいずれか一項に記載の物体識別装置。
    The group-specific processing includes processing for displaying a screen that accepts input of search conditions for searching for the type of object within the estimated group.
    An object identification device according to any one of claims 1 to 8.
  10.  前記物体は薬剤であり、
     前記種類特定困難物体は、カプセル薬剤、無地薬剤、及び分割錠剤のうち少なくとも1つを含み、
     前記種類特定可能物体は、刻印又は印字を有する錠剤を含む、
     請求項1から9のいずれか一項に記載の物体識別装置。
    the object is a drug;
    The object whose type is difficult to identify includes at least one of a capsule drug, a plain drug, and a divided tablet,
    The type-identifiable object includes a tablet having a stamp or print.
    An object identification device according to any one of claims 1 to 9.
  11.  前記識別器への入力として、前記画像から前記検出器によって検出された前記薬剤の領域を薬剤単位で切り出した薬剤画像、前記薬剤画像から抽出された文字及び記号のうち少なくとも一方を含む文字記号抽出画像、前記薬剤の外形画像、及び前記薬剤のサイズ情報のうち少なくとも1つを用いる、
     請求項10に記載の物体識別装置。
    As an input to the discriminator, a drug image is obtained by cutting out the area of the drug detected by the detector from the image in units of drugs, and character symbol extraction containing at least one of characters and symbols extracted from the drug image is provided. using at least one of an image, an external image of the drug, and size information of the drug;
    The object identification device according to claim 10.
  12.  1つ以上のプロセッサと、前記1つ以上のプロセッサが実行するプログラムが記憶される1つ以上のメモリと、を備える物体識別装置であって、
     前記1つ以上の前記プロセッサは、
     複数の物体が撮影された画像から前記物体を物体単位で検出する検出処理と、
     前記検出処理によって検出された前記物体のうち、前記画像から前記物体の種類まで特定できる種類特定可能物体については前記画像から前記物体の種類を推定し、前記画像から前記物体の種類までは特定困難であるが前記物体が属するグループを推定できる種類特定困難物体については前記画像から前記グループを推定する識別処理と、
     前記識別処理により前記グループとして推定された前記物体について前記種類の特定につながるグループ特有の処理に移行する処理と、
     を実行する物体識別装置。
    An object identification device comprising one or more processors and one or more memories in which programs executed by the one or more processors are stored,
    The one or more processors include:
    Detection processing that detects the object in units of objects from an image in which a plurality of objects are photographed;
    Among the objects detected by the detection process, for objects whose type can be identified from the image, the type of the object is estimated from the image, and it is difficult to identify the type of the object from the image. However, for objects whose type is difficult to identify to which the group to which the object belongs can be estimated, an identification process is performed to estimate the group from the image;
    A process of shifting to a group-specific process that leads to specifying the type of the object estimated as the group by the identification process;
    An object identification device that performs
  13.  前記1つ以上の前記プロセッサは、
     前記種類特定可能物体と前記種類特定困難物体とを区別せずに前記物体単位でラベル付けした第1の訓練データを用いて機械学習により訓練された第1の学習済みモデルを含む検出器を用いて前記検出処理を実行する、
     請求項12に記載の物体識別装置。
    The one or more processors include:
    Using a detector including a first trained model trained by machine learning using first training data labeled on an object basis without distinguishing between the object whose type can be identified and the object whose type is difficult to identify. executing the detection process using
    The object identification device according to claim 12.
  14.  前記1つ以上の前記プロセッサは、
     前記種類特定可能物体については前記物体の種類単位でラベル付けし、前記種類特定困難物体については前記物体が属するグループ単位でラベル付けした第2の訓練データを用いて機械学習により訓練された第2の学習済みモデルを含む識別器を用いて前記識別処理を実行する、
     請求項12又は13に記載の物体識別装置。
    The one or more processors include:
    The second training data is trained by machine learning using second training data in which the object whose type can be identified is labeled by the type of the object, and the object whose type is difficult to identify is labeled by the group to which the object belongs. Executing the identification process using a classifier including a trained model of
    The object identification device according to claim 12 or 13.
  15.  前記1つ以上の前記プロセッサは、
     前記画像から前記検出処理によって検出された前記物体の領域を切り出し、前記物体単位の物体画像を生成する処理を実行し、
     前記物体画像に基づいて前記識別処理を行う、
     請求項12から14のいずれか一項に記載の物体識別装置。
    The one or more processors include:
    Executing a process of cutting out a region of the object detected by the detection process from the image and generating an object image for each object,
    performing the identification process based on the object image;
    Object identification device according to any one of claims 12 to 14.
  16.  前記物体は薬剤であり、
     前記種類特定困難物体は、カプセル薬剤、無地薬剤、及び分割錠剤のうち少なくとも1つを含み、
     前記種類特定可能物体は、刻印又は印字を有する錠剤を含み、
     前記グループ特有の処理は、前記推定された前記グループ内で前記薬剤の種類を検索するための検索条件の入力を受け付ける画面を表示させる処理を含む、
     請求項12から15のいずれか一項に記載の物体識別装置。
    the object is a drug;
    The object whose type is difficult to identify includes at least one of a capsule drug, a plain drug, and a divided tablet,
    The type-identifiable object includes a tablet having a stamp or print,
    The group-specific processing includes processing for displaying a screen that accepts input of search conditions for searching for the type of drug within the estimated group.
    Object identification device according to any one of claims 12 to 15.
  17.  前記薬剤に付された刻印又は印字が示す文字及び記号のうち少なくとも一方を含む文字記号情報と前記薬剤の種類とが紐付けされた第1のデータベースと、
     前記薬剤のマスタ画像が格納されている第2のデータベースと、
     を備え、
     前記1つ以上の前記プロセッサは、
     前記受け付けた前記検索条件に基づき前記第1のデータベース及び前記第2のデータベースのうち少なくとも一方を検索し、前記検索条件に該当する前記薬剤の候補を出力する、
     請求項16に記載の物体識別装置。
    a first database in which character/symbol information including at least one of characters and symbols indicated by a stamp or print attached to the drug and the type of the drug are linked;
    a second database storing a master image of the drug;
    Equipped with
    The one or more processors include:
    searching at least one of the first database and the second database based on the accepted search condition, and outputting drug candidates that meet the search condition;
    The object identification device according to claim 16.
  18.  前記1つ以上の前記プロセッサは、
     前記画像を表示させる撮影画像表示部と、
     前記識別処理の推定結果に基づく候補物体の情報を表示させる候補表示部と、を含む画面を表示させる処理を行う、
     請求項12から17のいずれか一項に記載の物体識別装置。
    The one or more processors include:
    a photographed image display unit that displays the image;
    performing a process of displaying a screen including a candidate display unit that displays information about the candidate object based on the estimation result of the identification process;
    Object identification device according to any one of claims 12 to 17.
  19.  前記1つ以上の前記プロセッサは、
     前記候補表示部に表示させる前記候補物体が属する前記グループの情報を表示させる処理を行う、
     請求項18に記載の物体識別装置。
    The one or more processors include:
    performing a process of displaying information on the group to which the candidate object to be displayed on the candidate display section belongs;
    The object identification device according to claim 18.
  20.  前記1つ以上の前記プロセッサは、
     前記候補表示部に表示させる前記候補物体が属する前記グループを指定する指示を受け付け、
     前記受け付けた前記指示に従い、前記候補表示部の表示を制御する、
     請求項19に記載の物体識別装置。
    The one or more processors include:
    receiving an instruction specifying the group to which the candidate object to be displayed on the candidate display section belongs;
    controlling the display of the candidate display section according to the received instruction;
    The object identification device according to claim 19.
  21.  カメラと、
     前記カメラによって撮影された前記画像及び前記画像から推定された前記物体に関する情報を表示するディスプレイと、
     を備える請求項1から20のいずれか一項に記載の物体識別装置。
    camera and
    a display that displays the image taken by the camera and information about the object estimated from the image;
    The object identification device according to any one of claims 1 to 20, comprising:
  22.  1つ以上のプロセッサが実行する物体識別方法であって、
     前記1つ以上のプロセッサが、
     複数の物体が撮影された画像から前記物体を物体単位で検出することと、
     前記検出された前記物体のうち、前記画像から前記物体の種類まで推定できる種類特定可能物体については前記画像から前記物体の種類を推定し、前記画像から前記物体の種類までは特定困難であるが前記物体が属するグループを特定できる種類特定困難物体については前記画像から前記グループを推定することと、
     前記グループとして推定された前記物体について前記種類の特定につながるグループ特有の処理を実行することと、
     を含む、物体識別方法。
    A method of object identification performed by one or more processors, the method comprising:
    the one or more processors,
    Detecting each object from an image in which a plurality of objects are photographed;
    Among the detected objects, for objects whose type can be determined from the image, the type of the object is estimated from the image, and although the type of the object is difficult to identify from the image, estimating the group from the image for objects whose type is difficult to identify to which the group the object belongs;
    performing group-specific processing that leads to identification of the type of the objects estimated as the group;
    Object identification methods, including:
  23.  コンピュータに、
     複数の物体が撮影された画像から前記物体を物体単位で検出する機能と、
     前記検出された前記物体のうち、前記画像から前記物体の種類まで特定できる種類特定可能物体については前記画像から前記物体の種類を推定し、前記画像から前記物体の種類までは特定困難であるが前記物体が属するグループを特定できる種類特定困難物体については前記画像から前記グループを推定する機能と、
     前記グループとして推定された前記物体について前記種類の特定につながるグループ特有の処理を実行する機能と、
     を実現させるプログラム。
    to the computer,
    a function of detecting each object from an image in which a plurality of objects are photographed;
    Among the detected objects, for objects whose type can be identified from the image, the type of the object is estimated from the image, and although it is difficult to identify the type of the object from the image, a function for estimating the group from the image for objects whose type is difficult to identify by which the group to which the object belongs can be identified;
    a function of executing group-specific processing that leads to identification of the type of the objects estimated as the group;
    A program that makes this possible.
  24.  非一時的かつコンピュータ読取可能な記録媒体であって、請求項23に記載のプログラムが記録された記録媒体。 A non-transitory computer-readable recording medium, on which the program according to claim 23 is recorded.
PCT/JP2023/010610 2022-03-28 2023-03-17 Object identification device, object identification method, and program WO2023189734A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022-051951 2022-03-28
JP2022051951 2022-03-28

Publications (1)

Publication Number Publication Date
WO2023189734A1 true WO2023189734A1 (en) 2023-10-05

Family

ID=88200998

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/010610 WO2023189734A1 (en) 2022-03-28 2023-03-17 Object identification device, object identification method, and program

Country Status (1)

Country Link
WO (1) WO2023189734A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154750A1 (en) * 2013-11-29 2015-06-04 Atabak Reza Royaee Method and Device for Identification and/or Sorting of Medicines
JP2021026450A (en) * 2019-08-02 2021-02-22 大日本印刷株式会社 Computer program, information processing device, information processing method and generation method of learned model
JP2021508811A (en) * 2017-12-30 2021-03-11 美的集団股▲フン▼有限公司Midea Group Co., Ltd. Food cooking methods and systems based on ingredient identification

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154750A1 (en) * 2013-11-29 2015-06-04 Atabak Reza Royaee Method and Device for Identification and/or Sorting of Medicines
JP2021508811A (en) * 2017-12-30 2021-03-11 美的集団股▲フン▼有限公司Midea Group Co., Ltd. Food cooking methods and systems based on ingredient identification
JP2021026450A (en) * 2019-08-02 2021-02-22 大日本印刷株式会社 Computer program, information processing device, information processing method and generation method of learned model

Similar Documents

Publication Publication Date Title
US11574115B2 (en) Method of processing analog data and electronic device thereof
JP7058760B2 (en) Image processing methods and their devices, terminals and computer programs
US9407834B2 (en) Apparatus and method for synthesizing an image in a portable terminal equipped with a dual camera
CN109819313A (en) Method for processing video frequency, device and storage medium
EP3547218A1 (en) File processing device and method, and graphical user interface
CN113806036A (en) Output of virtual content
EP3537700B1 (en) Game card printing server and game card printing method
JP2012129986A (en) Collaborative image capture
CN113076814B (en) Text area determination method, device, equipment and readable storage medium
JP2017118472A (en) Image processing device, image processing method and program
CN105812649B (en) A kind of image capture method and device
US20110215997A1 (en) Method and apparatus for providing function of portable terminal using color sensor
JP2010220039A (en) Automatic photograph creator
US20170177926A1 (en) Image processing device, image processing method and medium
US20230368552A1 (en) Drug identification device, drug identification method and program, drug identification system, drug loading table, illumination device, imaging assistance device, trained model, and learning device
WO2023189734A1 (en) Object identification device, object identification method, and program
JP2010252266A (en) Image arrangement apparatus
KR101742779B1 (en) System for making dynamic digital image by voice recognition
TWI522725B (en) Cameras capable of connecting with mobile devices, and operational methods thereof
JP5757279B2 (en) Game shooting device, game shooting method and computer program
JP2021061984A (en) Image display method and information processing device
CN114138250A (en) Method, device and equipment for generating steps of system case and storage medium
US20210158595A1 (en) Information processing apparatus, information processing method, and information processing system
US20220264176A1 (en) Digital space management method, apparatus, and device
JP2013229778A (en) Photograph imaging play device, image generation method and image generation program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23779750

Country of ref document: EP

Kind code of ref document: A1