WO2023277473A1 - 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치 - Google Patents

반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치 Download PDF

Info

Publication number
WO2023277473A1
WO2023277473A1 PCT/KR2022/009095 KR2022009095W WO2023277473A1 WO 2023277473 A1 WO2023277473 A1 WO 2023277473A1 KR 2022009095 W KR2022009095 W KR 2022009095W WO 2023277473 A1 WO2023277473 A1 WO 2023277473A1
Authority
WO
WIPO (PCT)
Prior art keywords
companion animal
image
feature
feature region
region
Prior art date
Application number
PCT/KR2022/009095
Other languages
English (en)
French (fr)
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
Priority claimed from KR1020210083841A external-priority patent/KR102452192B1/ko
Priority claimed from KR1020210083753A external-priority patent/KR102444928B1/ko
Priority claimed from KR1020210083754A external-priority patent/KR102444929B1/ko
Application filed by 주식회사 펫나우 filed Critical 주식회사 펫나우
Priority to CA3218184A priority Critical patent/CA3218184A1/en
Priority to AU2022300548A priority patent/AU2022300548A1/en
Priority to CN202280034487.8A priority patent/CN117296083A/zh
Priority to EP22833529.5A priority patent/EP4322120A1/en
Priority to JP2023569731A priority patent/JP2024518492A/ja
Publication of WO2023277473A1 publication Critical patent/WO2023277473A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships

Definitions

  • the present invention relates to a method and electronic device for photographing an object for identification of a companion animal, and more particularly, to a method and electronic device for obtaining an image of an object for identification of a companion animal suitable for learning or identification based on artificial intelligence. It is about.
  • companion animals In modern society, the demand for companion animals that can be emotionally relied on while living with people is increasing. Accordingly, there is an increasing need to manage and manage information on various companion animals in a database for health management of companion animals.
  • identification information of companion animals such as human fingerprints
  • objects that can be used according to companion animals may be defined. For example, in the case of puppies, since the inscription (shape of the wrinkles on the nose) is different, the inscription can be used as identification information for each dog.
  • the method of registering an inscription is to photograph the face including the nose of a companion animal like registering a person's fingerprint or face (S110), store the image including the inscription in a database, and It is performed by the process of registering (S120).
  • the method of searching the inscription is to photograph the inscription of the companion animal as shown in (b) of FIG. 1 (S130), search for inscription matching the photographed inscription and information related thereto (S140), It can be performed by a process of outputting information matching the inscription (S150).
  • each companion animal can be identified and the information of the companion animal can be managed through the process of registering and searching the inscription of the companion animal.
  • Pet print information of companion animals can be stored in a database and used as data for AI-based learning or identification.
  • an image with clear nose wrinkles is required for companion animal epitaph recognition, but unlike humans, companion animals do not know how to stop motion for a while, so it is not easy to acquire a clear nose wrinkle image.
  • it is very difficult to obtain an image of an inscription of a desired quality because a dog constantly moves its face and flicks its tongue.
  • an image in which the wrinkles of the nose are clearly photographed is required for epitaph recognition, but in many cases, the wrinkles of the nose are not clearly photographed due to shaking in most of the actually photographed images.
  • methods of photographing the dog with the dog's nose forcibly fixed are being considered, but they are evaluated as inappropriate because they force the companion animal to perform a forcible action.
  • the present invention provides an image processing method and an electronic device capable of effectively detecting an object for identification of a companion animal while reducing computational complexity.
  • the present invention provides an image processing method and an electronic device capable of effectively detecting an object for identification of a companion animal while reducing computational complexity.
  • the present invention provides a method and an electronic device capable of effectively filtering low-quality images in a process of obtaining an image of an object for identification of a companion animal.
  • a method for detecting an object for identification of a companion animal includes the steps of acquiring an original image including the companion animal, and image processing of the original image to determine a first feature region and the companion animal.
  • the method may include determining a species and detecting an object for identification of the companion animal within the first feature region based on the determined species of the companion animal.
  • the step of determining the species of the companion animal may include applying a first pre-processing to the original image, and determining the species of the companion animal in the pre-processed image to set the first feature region. and extracting a first feature value through a first post-processing of the first feature region.
  • the setting of the first feature region may include generating a plurality of feature images from the preprocessed image using a learning neural network, and predefined boundaries for each of the plurality of feature images. Applying a box, calculating a probability value for each type of companion animal within the bounding box, and including the bounding box when the calculated probability value for a specific animal species is greater than or equal to a reference value. It may include the step of configuring the area.
  • object detection for identifying the companion animal is performed when the first feature value is greater than the reference value, and additional processing may be omitted when the first feature value is less than the reference value.
  • the applying of the first pre-processing to the original image includes converting the original image into an image having a first resolution lower than the original resolution, and the first resolution to the image converted to the first resolution. 1 may include applying a pretreatment.
  • the detecting of the object for identification of the companion animal may include applying a second pre-processing to a first feature region for identifying the species of the companion animal, and applying the second pre-processing to the first feature region. Setting a second feature region for identification of the companion animal based on the species of the companion animal in the feature region, and extracting a second feature value by applying a second post-processing to the second feature region.
  • the second pre-processing of the first feature region may be performed at a second resolution higher than the first resolution to which the first pre-processing for setting the first feature region is applied.
  • the step of setting the second characteristic region sets the second characteristic region based on the probability that an object for identification of the companion animal is located in the first characteristic region according to the species of the companion animal. steps may be included.
  • an image including the second feature region may be transmitted to a server.
  • the generating of the first feature region includes generating feature region candidates for determining the species of the companion animal in the image, and determining a location and location based on a reliability value of each of the feature region candidates.
  • a step of generating a first feature region having a determined size may be included.
  • An electronic device determines a first feature region and the species of the companion animal through a camera that generates an original image including the companion animal and image processing of the original image, and the determined companion animal.
  • a processor for detecting an object for identification of the companion animal in the first feature region based on the species of the animal, and a communication module for transmitting an image of the object to a server when the object for identification of the companion animal is valid include
  • the processor applies first pre-processing to the original image, determines the species of the companion animal in the pre-processed image, sets the first feature region, and sets the first feature region for the first feature region. 1
  • the first feature value may be extracted through post-processing.
  • the processor generates a plurality of feature images from the preprocessed image using a learning neural network, applies a predefined bounding box to each of the plurality of feature images, and A probability value for each type of companion animal is calculated, and the first feature region may be configured to include the bounding box when the calculated probability value for a specific animal species is greater than or equal to a reference value.
  • object detection for identifying the companion animal is performed when the first feature value is greater than the reference value, and additional processing may be omitted when the first feature value is less than the reference value.
  • the processor may convert the original image into an image having a first resolution lower than the original resolution, and apply the first preprocessing to the image converted to the first resolution.
  • the processor applies a second pre-processing to a first feature region for identifying the species of the companion animal, and based on the species of the companion animal in the second pre-processed first feature region, the processor A second feature region for animal identification may be set, and a second feature value may be extracted by applying a second post-processing to the second feature region.
  • the second pre-processing of the first feature region may be performed at a second resolution higher than the first resolution to which the first pre-processing for setting the first feature region is applied.
  • the processor may set the second characteristic region based on a probability that an object for identification of the companion animal is located in the first characteristic region according to the species of the companion animal.
  • an image including the second feature region may be transmitted to the server.
  • the processor generates feature region candidates for determining the species of the companion animal in the image, and generates a first feature region whose location and size are determined based on a reliability value of each of the feature region candidates. can do.
  • a method and electronic device for detecting an object for identification of a companion animal selects an image for learning or identifying an inscription immediately after photographing a companion animal and stores it in a database of a server for learning or identification. An image of an object corresponding to the nose of a companion animal may be effectively obtained.
  • the method and electronic device for detecting an object for identification of a companion animal can reduce computational complexity by first determining the species of the companion animal and then extracting the print image of the companion animal.
  • a final feature region of a wider area is generated by considering the reliability value of each of a plurality of feature region candidates, so that the companion animal is then selected as a companion animal within the final feature region.
  • the present invention it is possible to check whether the corresponding image is suitable for AI-based learning or identification by examining the quality of an object image for identification of a companion animal, such as a dog's nose, in a photographed image, and only suitable images are stored. to optimize the neural network for learning or identification.
  • 1 shows a schematic procedure for AI-based management of companion animals.
  • FIG. 2 illustrates a procedure for AI-based inscription management of a companion animal to which the suitability determination of an object image for learning or identification according to the present invention is applied.
  • FIG. 3 illustrates a procedure for detecting an object for identification of a companion animal in the companion animal management system according to the present invention.
  • FIG. 4 illustrates an example of a UI (User Interface) screen for detecting an identification object of a companion animal to which the present invention is applied.
  • UI User Interface
  • FIG. 5 illustrates a process of detecting an object for identification of a companion animal according to the present invention.
  • FIG. 6 shows a process for setting a feature area according to the present invention.
  • FIG. 7 is a flowchart illustrating a process for detecting an object for identification of a companion animal according to the present invention.
  • FIG. 8 illustrates a process of deriving a feature region for determining the species of a companion animal according to the present invention.
  • FIG. 9 is a flowchart illustrating a process of processing an image of an object for identification of a companion animal according to the present invention.
  • FIG. 10 shows an example of an image resulting from applying a Canny edge detector to an input image.
  • FIG. 11 illustrates an example of a pattern form of a pixel block where a boundary line is used to determine whether a Canny boundary line detector is applied in an image is shaken.
  • FIG. 12 is a flowchart of a method for filtering an image of an object for identification of a companion animal.
  • FIG. 13 is a block diagram of an electronic device according to the present invention.
  • This document focuses on extracting identification information by utilizing the shape of the dog's nose wrinkles (inscription), but in the present invention, the scope of companion animals is not limited to dogs, and as a feature used as identification information, the inscription Physical characteristics of various companion animals may be used without limitation.
  • the inscription images are selectively selected for AI-based learning or identification. I need to save it to database.
  • Figure 2 shows a procedure for managing the inscription of a companion animal based on AI to which the suitability judgment of the inscription image for learning or identification according to the present invention is applied.
  • the captured inscription image is suitable as data for AI-based learning or identification, and if it is determined to be suitable, it is transmitted to the server for AI-based learning or recognition. and stored to be used as data for later learning or identification.
  • the inscription management procedure according to the present invention largely includes an inscription acquisition procedure and an inscription recognition procedure.
  • an image including the companion animal is taken, and then an inscription image is extracted from the face area of the companion animal.
  • the image is transmitted to the server (artificial intelligence neural network) and stored in the database.
  • an image containing a companion animal is taken and an inscription image is extracted from the companion animal's face area.
  • the inscription image is used for identification or learning of the companion animal Determine whether it is suitable first. If the captured image is determined to be suitable for identification or learning, the corresponding image is transmitted to the server and identification information of the companion animal is extracted through matching with previously stored inscription images.
  • a companion animal is photographed as shown in (a) of FIG. 2 (S205), and a face region (hereinafter described as a first feature region) is first detected in the photographed companion animal image (S210), An area occupied by the nose within the face area (hereinafter described as a second feature area) is detected and an inscription image is output through quality inspection to determine whether the captured image is suitable for learning or identification (S215), and the output image is It is transmitted to the server constituting the artificial neural network and stored and registered (S220).
  • a companion animal is photographed as shown in (b) of FIG. 2 (S230), a face region is detected in the image of the companion animal (S235), and an area occupied by a nose within the face region is detected and photographed.
  • An inscription image is output through a quality check on whether the image is suitable for learning or identification (S240), which is similar to the inscription registration procedure.
  • a process of searching for matching information by comparing the output inscription image with previously stored and learned inscription images (S245) and a process of outputting the search result (S250) are performed.
  • FIG. 3 illustrates a procedure for detecting an object corresponding to the nose of a companion animal in the nose print management system of a companion animal according to the present invention.
  • an initial image is created by photographing a companion animal (S305), and a step of detecting a face region in the initial image is first performed (S310). Then, a step of detecting the nose area in the face area in consideration of the species of the companion animal is performed (S315).
  • Primary detection of the face region first and secondary detection of the nose region can reduce computational complexity and improve detection accuracy compared to detecting the nose region considering all species through cascaded detection. Because.
  • a quality inspection is performed to check whether the detected image of the nose area is suitable for identification or learning of an inscription in the future (S320), and if the quality inspection result is determined to be an appropriate image, the image is transmitted to the server to It can be used for identification or stored for future learning or identification (S325).
  • the camera can be controlled to focus on the detected nose region so that the image of the object for identification of the companion animal, such as the dog's nose wrinkles (inscription), is not blurred (S330). This is to prevent deterioration of image quality due to the nose being out of focus by allowing the camera to focus on the nose area.
  • FIG. 4 shows an example of a UI (User Interface) screen for obtaining an inscription image of a companion animal to which the present invention is applied.
  • Figure 4 shows a case for acquiring the inscription of a puppy among several companion animals.
  • the companion animal currently being photographed is a puppy by identifying the species of the companion animal in the video being photographed. If the companion animal being photographed is not a puppy, a phrase such as 'cannot find the puppy' is output as shown in (a) of FIG. .
  • the face region of the companion animal included in the video is first extracted, and the species of the companion animal is determined by comparing the image included in the face region with the existing learned data. can decide
  • photographing may be performed by focusing on the region corresponding to the dog's nose. That is, the camera may be controlled to focus on the location (center point) of the area corresponding to the object for identification of the companion animal.
  • a graphic element may be overlaid on the location of the object being tracked in order to give feedback to the user that the currently tracked object (eg, the nose) is being focused and photographed. By displaying a graphic element representing the detection state of the object at the location of the object being tracked, the user can recognize that object recognition is being performed on the companion animal currently being photographed.
  • a first graphic element representing a good quality state 410A eg, a smiling icon or a green icon
  • a second graphic element 410B eg, a crying icon or a red icon
  • photographing may be performed by focusing on the nose of the dog while tracking the nose of the dog. At this time, it is determined whether the inscription image of the puppy in each captured image is suitable for identification or learning of the companion animal, and the degree of suitability can be output.
  • the degree of suitability of a photographed puppy's inscription image for identification or learning of a companion animal can be calculated as a numerical value, and according to the numerical value of the suitability, the lower the suitability, the higher the suitability in the 'BAD' direction.
  • Score information 420 in a form in which the gauge is filled in the 'GOOD' direction may be output. That is, score information 420 representing the shooting quality of an object in an image may be output.
  • a message 430 providing feedback to the user is output so that an inscription image suitable for artificial intelligence-based identification or learning is captured by performing quality evaluation (size, brightness, sharpness, etc.) on the image of the inscription currently being captured. can do. For example, if the size of the dog inscription image is smaller than the reference value, a message such as 'Please adjust the dog nose distance' can be output as shown in FIG. 4 (c) so that a larger inscription image is captured. there is.
  • progress information 440 representing a progress level in obtaining an object image having a quality suitable for identification of a companion animal may be output. For example, when 4 inscription images having suitable quality are required and 1 suitable image has been obtained so far, progress information 440 indicating that the progress rate is 25% may be output as shown in FIG. 4 .
  • the photographing is finished, and the identification information along with the inscription image of the corresponding puppy may be stored in a database or the identification information of the corresponding puppy may be output.
  • the face region of the companion animal is first detected, and then the nose region is detected within the face region. This is to reduce object detection difficulty while reducing computational complexity.
  • an object other than an object to be detected or unnecessary or incorrect information may be included in the image. Therefore, the present invention first determines whether a desired object (the nose of a companion animal) exists in an image being captured.
  • the present invention uses a cascaded object detection method in order to reduce such computational complexity. For example, while photographing a companion animal, the face area of the companion animal is first detected, the type of companion animal is first identified, and the nose of the companion animal is detected based on the detected face area of the companion animal and the identified type of companion animal. detect the area This is to first perform the process of identifying the type of companion animal at low resolution with relatively low computational complexity, and apply the object detection method determined according to the type of companion animal to maintain high resolution in the face area of the companion animal and perform nose area detection. will be. Thus, the present invention can effectively detect the nose region of a companion animal while relatively reducing computational complexity.
  • the method of processing an input image according to the present invention includes a step of receiving an input image from a camera (S505), and a first preprocessing step of generating a primary processed image by adjusting the size of the input image ( S510), a first feature region detection step of detecting the location and species of the animal from the processed image generated in the first preprocessing step (S515), and a first feature value of the animal image from the result of the first feature region detection step.
  • First post-processing step of extracting (S520), determining a detector for detecting an object (eg, nose) for identification of the companion animal according to the species of the companion animal in the image processed through the first post-processing step (S520) S525), a second pre-processing step of adjusting the size of an image for image processing for identification of a companion animal (S530), and at least one second feature corresponding to the species of animal that can be detected in the first feature detection step.
  • a region detection step (S535) and a second post-processing step (S540) of extracting a second feature value of the animal image corresponding to each second feature region detection step are included.
  • Applying the first preprocessing to the original image (S510) is a step of converting the image into a form suitable for object detection by adjusting the size, ratio, direction, etc. of the original image.
  • an arbitrary processed image can be generated by making 4 arbitrary points in the input image correspond to 4 vertexes of the processed image and undergoing an arbitrary coordinate system conversion process.
  • inverse transformation to obtain the feature region of the input image from the bounding box obtained as a result of the feature region detector must be possible.
  • affine transformation which linearly transforms 4 arbitrary points of an input image by corresponding to 4 vertices of a processed image, because the inverse transformation process can be easily obtained.
  • a method of using the four vertices of the input image as it is may be considered.
  • a method of adding blanks to the input image or cutting out a part of the input image may be used so that the horizontal length and the vertical length are converted at the same ratio.
  • various interpolation methods may be applied to reduce the size of the input image.
  • a first feature region that can be used in the second feature region detection step to be described later is set, and each companion animal is present.
  • the purpose is to increase the final feature point detection performance by selecting the second feature region detector optimized for the animal species.
  • any object detection and classification method can be easily combined by anyone with ordinary knowledge in the related field.
  • the method based on artificial neural networks is known to have superior performance compared to conventional methods, it is preferable to use feature detection techniques based on artificial neural networks.
  • a single-shot multibox detection (SSD) type feature detector which is an algorithm for detecting objects of various sizes with respect to one image, may be used in an artificial neural network.
  • the input image normalized according to the preprocessor described above constitutes the first feature image to the nth feature image hierarchically by an artificial neural network.
  • a method of extracting feature images for each layer may be mechanically learned in the learning step of the artificial neural network.
  • the hierarchical feature image extracted in this way is combined with a list of priori boxes corresponding to each layer to create a list of bounding boxes, entity types, and reliability values.
  • This calculation process can also be learned mechanically in the learning stage of the artificial neural network. For example, the result value is returned in the format shown in Table 1 below.
  • the number of species that can be determined by the neural network is determined in the neural network design stage, and when no object exists implicitly, that is, “background” is defined.
  • NMS non-maximum suppression
  • a box with the highest probability of the corresponding species is designated as the first box (first bounding area) and is excluded from the bounding box list.
  • step C If there are boxes left in the bounding box list, repeat step C again for the remaining boxes.
  • intersection-to-union area ratio can be effectively calculated as shown in Equation 1 below.
  • the step of generating feature region candidates includes selecting a first boundary region (first box) having the highest probability corresponding to a specific animal species in the feature image, and selecting a boundary region (first box) selected from the feature image. 1 box), the intersection-to-union area ratio (IoU) with the first boundary area is calculated according to the order of probability values for the remaining boundary areas, and the boundary area with the intersection-to-union area greater than the reference area ratio is selected as the feature region of the feature image. It may include the step of including in the candidate.
  • the first box can be kept as it is and the second box can be merged by deleting it from the bounding box list (Hard NMS).
  • the first box is kept as it is, the second box reduces the probability of a specific species by weighting it by a value between (0, 1), and deletes it from the bounding box list only when the attenuated result value is smaller than a specific threshold value.
  • Soft NMS Soft NMS
  • a new method of merging a first box (first feature region candidate) and a second box (first feature region candidate) according to a probability value as shown in Equation 2 below ) can be used.
  • p 1 and p 2 are probability values of the first box (first feature region candidate) and the second box (first feature region candidate), respectively, and C (x,y) 1 and C (x,y) 2 , C (x,y) n represent the (x,y) coordinate values of the center points of the first box, the second box, and the merged box, respectively.
  • W 1 , W 2 , and W n represent the horizontal widths of the first box, the second box, and the merged box, respectively, and H 1 , H 2 , and H n represent the vertical heights.
  • the probability value of the merged box may use the probability value of the first box.
  • the first feature region derived by the extended NMS according to the present invention is determined in consideration of a reliability value at which a specific species will be located in each feature region candidate.
  • the center point (C (x,y) n ) where the first feature region is located is the center point (C (x,y) 1 , C (x,y) 2 ) of the feature region candidate as shown in Equation 2. It may be determined by a weighted sum of reliability values (p 1 , p 2 ).
  • the width (W n ) of the first feature region is determined by a weighted sum of reliability values (p 1 , p 2 ) of widths (W 1 , W 2 ) of feature region candidates as shown in Equation 2,
  • the height H n of the first feature region may be determined by a weighted sum of the reliability values p 1 and p 2 of the heights H 1 and H 2 of the feature region candidates.
  • FIG. 8 illustrates an example of detecting a feature region of a companion animal by applying the extended NMS according to the present invention compared to the existing NMS.
  • 8(a) shows a plurality of feature region candidates generated from an original image
  • FIG. 8(b) shows an example of a first feature region derived by an existing NMS
  • FIG. An example of a second feature region derived by applying the extended NMS according to the present invention is shown.
  • the existing NMS Hard NMS, Soft NMS
  • subsequent execution is performed.
  • a region required to obtain an inscription, such as a nose region may deviate.
  • the present invention applies a weighted average based on the reliability value to a plurality of boxes (characteristic region candidates), and a box having a large width and height as shown in FIG. face area), and a second feature area (nose area) for identification of a companion animal may be detected within the first feature area.
  • a weighted average based on the reliability value to a plurality of boxes (characteristic region candidates), and a box having a large width and height as shown in FIG. face area), and a second feature area (nose area) for identification of a companion animal may be detected within the first feature area.
  • a first feature value may be generated by performing an additional post-processing step for each feature region of the input image acquired in the above-described first feature region setting step ( S515 ). For example, an operation such as Equation 3 below may be performed to obtain brightness information (a first feature value) of a first feature region of an input image.
  • L is the Luma value according to the BT.601 standard
  • V is the brightness value defined in the HSV color space.
  • M and N are the horizontal width and vertical height of the target feature region.
  • the additionally generated first feature value it is possible to predict whether the first feature region obtained in the first feature region detection step ( S515 ) is suitable for use in an application field associated with the present patent. It is obvious that the additionally generated first feature value should be appropriately designed according to the application field. When the condition of the first feature value defined in the application field is not satisfied, the system may be configured to selectively omit the step of setting the second feature region and detecting the object, which will be described later.
  • the purpose of this step is to extract a feature region specifically required in the application field from the region where the animal exists. For example, in the application field of detecting the positions of the eyes, nose, mouth, and ears in the animal's face region, in the first feature region detection step, the animal's face region and animal species information are first distinguished, and 2 In the feature area detection step, the purpose is to detect the positions of the eyes, nose, mouth, and ears according to the animal species.
  • the second feature region detection step may consist of a plurality of independent feature region detectors specialized for each animal species. For example, if dogs, cats, and hamsters can be distinguished in the first feature region detection step, it is preferable to design three second feature region detectors to be specialized for dogs, cats, and hamsters. By doing this, it is possible to reduce the learning complexity by reducing the types of features to be learned from the individual feature region detector, and it is obvious that neural network learning is possible even with a smaller number of data in terms of learning data collection.
  • each of the second feature region detectors is configured independently of each other, a person with ordinary knowledge can easily configure independent individual detectors.
  • Each feature region detector is preferably configured individually to suit feature information to be detected in each species.
  • some or all of the second feature region detectors may share feature region detectors of the same structure, but may use a method of configuring the system appropriately for each species by replacing the learning parameter value. there is.
  • a method of further reducing system complexity may be considered by using a feature region detector having the same structure as the first feature region detection step as the second feature region detector, but replacing only the learning parameter value and the NMS method.
  • a second feature region detection step is performed using the determined second feature region detector.
  • a preprocessing process is performed. At this time, it is obvious that in the process of converting the coordinates, a transformation process capable of inverse transformation should be used. Since the first feature region detected in the input image must be converted into the input image of the second feature region detector in the second preprocessing process, it is preferable to define the four points necessary for designing the conversion function as the four vertices of the first feature region. Do.
  • the first feature region should be considered when calculating the second feature region within the entire input image.
  • a second feature value may be generated by performing an additional post-processing step similar to the first post-processing step on the second feature region acquired through the second feature region detector.
  • information such as the posture of an animal to be detected may be obtained by applying a Sobel filter in order to obtain the sharpness of an image, or by using detection and relative positional relationships between feature regions.
  • image quality inspection eg, focus blur, motion blur as described below may be performed.
  • the second feature value additionally generated in this way it is possible to predict whether the feature region obtained in the second object detection step is suitable for use in the application field associated with the present patent. It is obvious that the additionally generated second feature value should be appropriately designed according to the application field. If the condition of the second feature value defined by the application field is not met, it is desirable to design the data to be suitable for the application field by excluding the first detection area as well as the second detection area from the detection result. .
  • the position and species of the animal are detected, and according to the result, a detector to be used in the second feature position detection step is selected.
  • a detector to be used in the second feature position detection step is selected. I gave an example.
  • This cascade configuration can easily be extended to a multi-tiered cascade configuration.
  • the first feature location detection step the entire body of the animal is detected
  • the second feature location detection step the location of the animal's face and limbs is detected
  • the third feature location detection step the face, eyes, nose, Applications such as detecting the positions of the mouth and ears are possible.
  • FIG. 7 is a flowchart of a method for detecting an object corresponding to a nose of a companion animal in the nose print management system of a companion animal according to the present invention.
  • a method for detecting an object for identification of a companion animal includes acquiring an original image including a companion animal (eg, puppy) (S710), and processing the original image to have a first feature. Determining the region and the species of the companion animal (S720), and detecting an object (eg, nose) for identification of the companion animal within the first feature region based on the determined species of the companion animal Step S730 is included.
  • step S710 an original image including a companion animal is obtained through an activated camera while an application for object recognition of a companion animal is executed.
  • illumination, focus, etc. may be adjusted so that the companion animal can be captured smoothly.
  • the image obtained here may be provided as an input image of FIGS. 5 and 6 .
  • the step of determining the species of the companion animal (S720) and the step of detecting the object of the companion animal (S730) may be performed for cascaded object detection.
  • step S720 a procedure for identifying the species of the companion animal is performed.
  • the step of determining the species of the companion animal includes applying a first pre-processing to the original image, identifying the species of the companion animal in the pre-processed image, and setting the first feature region. and extracting a first feature value through a first post-processing of the first feature region.
  • the step of applying the first preprocessing to the original image is a step of converting the image into a form suitable for object detection by adjusting the size, ratio, direction, etc. of the original image as described above with reference to step S510 of FIG. 5 .
  • the step of setting the first feature region is a step of detecting the region where the companion animal exists and the species of the companion animal in the image, and setting the first feature region that can be used in the step of detecting the second feature region described later, This is to improve final feature point detection performance by selecting a second feature region detector optimized for each companion animal species.
  • the step of setting a first feature region includes the step of classifying the preprocessed image into a plurality of feature images using a learning neural network, and a predefined bounding box for each of the plurality of feature images. Applying, calculating a probability value for each type of companion animal within the bounding box, and configuring a first feature region to include the bounding box when the probability value calculated for a specific animal species is greater than or equal to a reference value.
  • the input image normalized according to the preprocessor hierarchically constitutes the first feature image to the nth feature image by the artificial neural network.
  • a method of extracting feature images for each layer may be mechanically learned in the learning step of the artificial neural network.
  • the hierarchical feature image extracted in this way is combined with a list of predefined bounding boxes (Priori Box) corresponding to each layer to generate a list of bounding boxes, entity types, and reliability values (probability values).
  • Principal Box predefined bounding boxes
  • reliability values probability values
  • a first feature region is set so that the corresponding bounding box is included in the first feature region.
  • the process for determining the face region (first feature region) of the companion animal may be performed at a relatively low resolution because high resolution is not required. That is, the step of applying the first preprocessing to the original image includes converting the original image into an image having a first resolution lower than the original resolution, and applying the first preprocessing to the image converted to the first resolution. can do.
  • a first feature value is extracted through a first post-processing of the first feature region. This is to first determine whether the dog print image extracted from the obtained image is suitable as data used for learning or identification.
  • the first characteristic value may vary according to embodiments, and for example, brightness information of an image to be processed may be used.
  • step S730 detection of an object for identifying a companion animal is performed.
  • an object for identifying a companion animal various parts such as eyes, nose, mouth, ears, etc. can be used, but the description will focus on the nose for using inscriptions.
  • This step is performed in consideration of the species of the previously performed companion animal. If the companion animal is a puppy, object detection for identification optimized for the puppy may be performed. Optimized object detection may be different for each type of animal. Furthermore, when there are several types of companion animals included in the photographed image, object detection for identification may be performed for each animal.
  • the step of detecting the object for identification of the companion animal may include applying a second preprocessing to a first feature region for identifying the species of the companion animal, and applying a second preprocessing to the species of the companion animal in the second preprocessed first feature region. Based on the method, setting a second feature region for identification of the companion animal, and applying a second post-processing to the second feature region.
  • the second pre-processing for detecting an object for identification of a companion animal is a process of adjusting the size of an image similar to the first pre-processing.
  • the second pre-processing of the first feature region may be performed at a second resolution higher than the first resolution to which the first pre-processing is applied. This is because, unlike the process of determining the type of animal, the process of detecting an object (e.g., nose) for identification of a companion animal and examining identification data (inscription image) requires a relatively high quality image. Thereafter, a second feature region is set as an object for identification of a companion animal with respect to the preprocessed image.
  • Setting the second feature region may include a second feature region (eg, a face region) based on a probability that an object (eg, nose) for identification of the companion animal is located in the first characteristic region (eg, face region) according to the species of the companion animal. eg, nose area). If the species of the companion animal is determined in step S720, individual feature region detectors and parameters optimized according to the species are selected, and an object for identification of the companion animal (e.g., nose) is used with lower computational complexity using the selected detectors and parameters. area) can be detected.
  • a second feature region eg, a face region
  • Post-processing may be performed to check whether the image of the companion animal identification object detected as the second feature region is suitable for use in learning or identification later. As a result of post-processing, it may be derived as a second feature value representing the degree of fitness of the corresponding image. When the second feature value is greater than the reference value, the image including the second feature region is transmitted to the server.
  • the electronic device 1300 is a block diagram of an electronic device 1300 according to the present invention.
  • the electronic device 1300 according to the present invention may include a camera 1310, a processor 1320, a communication module 1330, a memory 1340, and a display 1350.
  • the camera 1310 may include an optical module such as a lens and a charge-coupled device (CCD) or complementary metal-oxide semiconductor (CMOS) that generates an image signal from input light, and generates image data through image capture. and can be provided to the processor 1320.
  • an optical module such as a lens and a charge-coupled device (CCD) or complementary metal-oxide semiconductor (CMOS) that generates an image signal from input light, and generates image data through image capture. and can be provided to the processor 1320.
  • CCD charge-coupled device
  • CMOS complementary metal-oxide semiconductor
  • the processor 1320 controls each module of the electronic device 1300 and performs calculations required for image processing.
  • the processor 1320 may include a plurality of microprocessors (processing circuits) according to its functions. As described above, the processor 1320 may detect an object (eg, nose) for identification of a companion animal (eg, puppy) and determine validity of an image for the object.
  • an object eg, nose
  • a companion animal e.g., puppy
  • the communication module 1330 may transmit or receive data with an external entity through a wired/wireless network.
  • the communication module 1330 may exchange data for artificial intelligence-based processing through communication with a server for learning or identification.
  • the electronic device 1300 may include various modules according to usage, including a memory 1340 storing image data and information necessary for image processing and a display 1350 outputting a screen to a user.
  • An electronic device 1300 determines a first feature region and the species of the companion animal through a camera 1310 generating an original image including a companion animal and image processing of the original image. and the processor 1320 detecting an object for identification of the companion animal within the first feature region based on the determined species of the companion animal, and transmitting the image of the object to the server when the object for identification of the companion animal is valid. It includes a communication module 1330 that does.
  • the processor 1320 applies first pre-processing to the original image, determines the species of the companion animal in the pre-processed image, sets a first feature region, and sets a first feature region to the first post-processing image.
  • the first feature value may be extracted through processing.
  • the processor 1320 generates a plurality of feature images from the preprocessed image using a learning neural network, applies a predefined bounding box to each of the plurality of feature images, and applies the bounding box to each of the plurality of feature images.
  • a probability value for each type of companion animal is calculated within the box, and the first feature region may be configured to include a bounding box when the calculated probability value for a specific animal species is greater than or equal to a reference value.
  • object detection for identifying a companion animal is performed when the first feature value is greater than the reference value, and additional processing may be omitted when the first feature value is less than the reference value.
  • the processor 1320 may convert an original image into an image having a first resolution lower than the original resolution, and may apply a first preprocessing to the image converted to the first resolution.
  • the processor 1320 applies second pre-processing to the first feature region for identifying the species of the companion animal, and based on the species of the companion animal in the second pre-processed first feature region, A second feature region for identification of can be set, and a second feature value can be extracted by applying a second post-processing to the second feature region.
  • the second pre-processing of the first feature region may be performed at a second resolution higher than the first resolution to which the first pre-processing for setting the first feature region is applied.
  • the processor 1320 may set a second characteristic region based on a probability that an object for identification of a companion animal is located in the first characteristic region according to the species of the companion animal.
  • an image including the second feature region may be transmitted to the server.
  • the processor 1320 generates feature region candidates for determining the species of a companion animal in an image, and generates a first feature region whose location and size are determined based on reliability values of each of the feature region candidates.
  • FIG. 9 is a flowchart of a method for processing an image of an object for identification of a companion animal.
  • a method for processing an image of an object for identification of a companion animal includes acquiring an image including the companion animal (S910), and generating feature region candidates for determining the species of the companion animal in the image. (S920), setting a first feature region whose location and size are determined based on the reliability value of each of the feature region candidates (S930), and including an object for identifying a companion animal in the first feature region. Setting a second feature region (S940) and obtaining an image of the object in the second feature region (S950).
  • the step of generating feature region candidates includes the step of hierarchically generating feature images using an artificial neural network, and applying predefined boundary regions to each of the feature images to determine a specific species in each boundary region. It may include calculating a probability value where the companion animal of is located, and generating feature area candidates in consideration of the probability value.
  • the input image normalized according to the preprocessor is hierarchically generated from the first feature image to the nth feature image by the artificial neural network, and the method of extracting the feature image for each layer can be learned mechanically in the learning step of the artificial neural network. .
  • the extracted hierarchical feature image is combined with a list of predefined bounding areas (bounding boxes) corresponding to each layer, and a list of probability values in which a specific animal type is located in each bounding area is generated as shown in Table 1.
  • bounding boxes predefined bounding areas
  • probability values in which a specific animal type is located in each bounding area is generated as shown in Table 1.
  • first feature region candidates for species identification, such as the face of a companion animal, are generated in each feature image.
  • Each feature region candidate may be derived using the previously derived probability value for each specific animal species.
  • generating feature region candidates includes selecting a first boundary region having the highest probability of corresponding to a specific animal species from a feature image, and remaining boundary regions excluding the first boundary region selected from the feature image. , calculating an overlap with the first boundary region according to an order of probability values, and including a boundary region having a greater overlap than a reference overlap as a feature region candidate of the feature image.
  • an area ratio of intersection to union between two boundary regions may be used.
  • a feature region candidate as shown in (a) of FIG. 8 may be generated through the following procedure.
  • a box with the highest probability of the corresponding species is designated as the first box (first bounding area) and is excluded from the bounding box list.
  • the degree of overlap with the first box is calculated. For example, you can use Intersection over Union.
  • the box overlaps with the first box. Merge with the first box.
  • step C If there are boxes left in the bounding box list, repeat step C again for the remaining boxes.
  • Equation 1 For the two boxes A and B, for example, the area ratio of intersection to union can be effectively calculated as in Equation 1 described above.
  • a first feature region (eg, a face region of a companion animal) may be derived based on a reliability value of each feature region candidate derived according to the present invention.
  • the central point (C (x,y) n ) where the first feature region is located is the central point (C (x,y) 1 , C (x,y) 2 of the feature region candidate as shown in Equation 2).
  • ) can be determined by a weighted sum of reliability values (p 1 , p 2 ).
  • the width (W n ) of the first feature region is determined by the weighted sum of the reliability values (p 1 , p 2 ) of the widths (W 1 , W 2 ) of feature region candidates as shown in Equation 2. and the height H n of the first feature region may be determined by a weighted sum of the reliability values p 1 and p 2 of the heights H 1 and H 2 of the feature region candidates.
  • a weighted average based on a reliability value is applied to a plurality of boxes (feature area candidates) to set one box having a large width and height as a first feature area (companion animal's face area), and the first feature A second characteristic region (nose region) for identification of a companion animal may be detected within the region.
  • a second feature region eg, nose region
  • the first feature region eg, dog's face region
  • Setting the second feature region may include a second feature region (eg, a face region) based on a probability that an object (eg, nose) for identification of the companion animal is located in the first characteristic region (eg, face region) according to the species of the companion animal. eg, nose area).
  • a second feature region eg, a face region
  • an object eg, nose
  • the first characteristic region eg, face region
  • the species of the companion animal eg, nose area
  • post-processing may be performed to check whether the image of the object for identification of the companion animal detected as the second feature region is suitable for later learning or identification. As a result of post-processing, it may be derived as a second feature value representing the degree of fitness of the corresponding image. When the second feature value is greater than the reference value, the image including the second feature region is transmitted to the server, and when the second feature value is less than the reference value, the image including the second feature region is discarded.
  • An electronic device 1300 includes a camera 1310 generating an image including a companion animal, and a processor generating an image of an object for identification of a companion animal by processing an image provided from the camera 1320 ( 1330).
  • the processor 1330 generates feature region candidates for determining the species of the companion animal in the image, sets a first feature region whose location and size are determined based on the reliability value of each of the feature region candidates, and sets the first feature region.
  • a second feature region including an object for identifying the companion animal may be set, and an image of the object may be acquired in the second feature region.
  • the processor 1320 hierarchically generates a plurality of feature images from the image using an artificial neural network, and applies predefined boundary regions to each of the feature images to determine specific features in each boundary region.
  • a probability value in which a companion animal of the species is located may be calculated, and the feature region candidates may be generated in consideration of the probability value.
  • the processor 1320 selects a first boundary region having the highest probability of corresponding to a specific animal species in the feature image, and with respect to the remaining boundary regions excluding the selected boundary region in the feature image, An overlapping degree with the first boundary region may be calculated according to an order of probability values, and a boundary region having a greater overlapping degree than a reference overlapping degree may be included in the feature region candidate of the feature image. In this case, an area ratio of intersection to union between the two boundary regions may be used to calculate the degree of overlap.
  • the center point where the first feature region is located may be determined by a weighted sum of reliability values of the center points of the feature region candidates.
  • the width of the first feature region is determined by a weighted sum of reliability values of the widths of feature region candidates
  • the height of the first feature region is a weighted sum of reliability values of heights of the feature region candidates.
  • the processor 1320 detects the changed position of the object in the next image, determines whether the image of the object whose position has changed in the next image is suitable for artificial intelligence-based learning or identification, and moves to the changed position. With the focus set, the camera 1310 may be controlled to perform the next photographing.
  • the processor 1320 sets a first feature region for determining the species of companion animal in the image, and a second feature including an object for identification of the companion animal within the first feature region. area can be set.
  • the processor 1320 may determine whether an image of an object for identification of a companion animal is suitable for artificial intelligence-based learning or identification.
  • the processor 1320 determines whether the quality of the image of the object satisfies the reference condition, transmits the image of the object to the server if the quality satisfies the reference condition, and if the quality does not satisfy the reference condition. If not, the camera 1310 may be controlled to discard the image of the object and capture the next image.
  • the quality check of an image may be performed according to various quality conditions, which may be defined by a neural network designer. For example, conditions may include a picture of a real dog, a clear inscription, no foreign matter, an image taken from the front, and a marginal area below a certain ratio. It would be desirable to be able to quantify and objectify these conditions. If an image with low quality is stored in the neural network, it may cause overall performance degradation of the neural network, so it is desirable to filter images having a quality below the standard in advance. This filtering process may be performed in the first post-processing step or the second post-processing step described above.
  • a method for filtering an image of an object for identification of a companion animal includes acquiring an image including the companion animal (S1210), determining the species of the companion animal in the image, and setting a first feature region. (S1220), setting a second feature region including an object for identifying a companion animal within the first feature region in consideration of the determined companion animal species (S1230), and an object in the second feature region. and determining whether the image of the object is suitable for artificial intelligence-based learning or identification by checking the quality of the image (S1240).
  • post-processing is performed on the first feature region
  • the second feature region detection and adequacy determination may be performed only when the image of the first feature region has an appropriate quality. That is, the step of setting the first feature region includes determining whether the image of the object is suitable for artificial intelligence-based learning or identification by examining the quality of the image of the object in the first feature region, The second feature region may be set when it is determined that the image of the object in the first feature region is suitable for artificial intelligence-based learning or identification. If it is determined that the image of the object in the first feature region is not suitable for AI-based learning or identification, the image of the current frame may be discarded and an image of the next frame may be captured.
  • the quality check (first post-processing) of the first feature region may be omitted according to embodiments. That is, the first post-processing process may be omitted and the second feature region detection may be performed immediately.
  • the quality check of the image of the object may be performed by applying different weights to positions of the first feature region or the second feature region.
  • the above-described brightness evaluation may be performed as a method for inspecting image quality of an object. For example, by performing the operation of Equation 2 above for the first feature region, a brightness value according to the BT.601 standard and value information in the HSV color space are extracted in units of pixels, and the average value is the first If the brightness is smaller than the reference value, the image is determined to be too dark. If the brightness is greater than the second brightness reference value, the image is determined to be too bright. can do. In addition, it may be determined by assigning a weight to an area determined to be important among the first characteristic areas.
  • determining whether an object image is suitable for artificial intelligence-based learning or identification may include determining a defocus blur of the object in the image of the object.
  • Defocus blur refers to a phenomenon in which a target area (eg, an inscription area) is blurred because the camera is out of focus.
  • a target area eg, an inscription area
  • defocus blur occurs, a picture obtained while autofocusing is performed in a mobile phone camera may be mentioned.
  • a high-frequency component (a component having a frequency greater than a specific value) from an image.
  • a high-frequency component is mainly located at a point where brightness and color change rapidly, that is, at an object boundary line in an image
  • a low-frequency component is mainly located at a point having similar brightness and color to the surroundings. Therefore, the more focused and sharper the image, the stronger the distribution of high-frequency components in the image.
  • a Laplacian operator may be utilized. The Laplacian operator performs second-order differentiation on an input signal and can effectively remove low-frequency components while leaving high-frequency components of the input signal. Therefore, using the Laplacian operator, it is possible to effectively find the boundary of an object in an image, and also obtain a numerical value of how sharp the boundary is.
  • the result of applying the Laplacian operator will range from 0 to a relatively large range of values. will be distributed over a relatively small range of values. Therefore, the sharpness can be grasped by modeling the distribution of the result value after applying the Laplacian operator.
  • sharpness may be determined using a variance value of an image obtained by applying the Laplacian operator.
  • various statistical techniques such as obtaining the 10th quantile distribution of the Laplacian value distribution through histogram analysis and calculating the distribution ratio between the highest and lowest intervals can be mobilized. These methods can be selectively applied depending on the application field to be used.
  • the step of determining the degree of defocusing of the object includes extracting an image representing a distribution of high-frequency components by applying a Laplacian operator performing second-order differentiation to the image of the second feature region. and calculating a value indicating a defocus of the image of the second feature region from a distribution map of high frequency components.
  • a method of determining sharpness by dividing an image into certain regions and assigning different weights to each region may be considered. For example, a method of setting a region of interest, such as dividing the image into nine parts or drawing an ellipse based on the center of the image, and then multiplying the corresponding region by a weight of w greater than 1 may be considered.
  • the weight applied to the central portion of the second feature region may be set to be greater than the weight applied to the peripheral portion of the second feature region.
  • the defocus blur score is greater than the threshold value, it can be classified as a clear image, and if not, it can be determined as a blurry image.
  • This threshold value can be determined empirically by using previously collected data, or can be adaptively determined by accumulating and observing several input images from a camera each time.
  • the step of determining whether an image of an object is suitable for artificial intelligence-based learning or identification may include determining a degree of shaking of the object in the image of the object.
  • Motion blur refers to a phenomenon in which the target area is photographed as if the target area is shaken while the relative position of the subject and the camera is shaken during the exposure time of the camera.
  • the dog may move during the exposure time to take one picture or the user's hand shake.
  • Various edge detectors can be used to analyze the characteristics of such an image.
  • a Canny edge detector is known as an edge detector that efficiently detects continuously connected edges.
  • Shaking can be effectively determined by analyzing the directionality of the boundary line.
  • a boundary line detected by the Canny edge detector is always connected to neighboring pixels. Therefore, directionality can be analyzed by analyzing the connection relationship with neighboring pixels.
  • the overall direction and degree of shaking can be calculated by analyzing a pattern distribution in a pixel block of a certain size where a boundary line is located in an image to which a Canny edge detector is applied.
  • FIG. 11 illustrates an example of a pattern form of a pixel block where a boundary line is used to determine whether a Canny boundary line detector is applied in an image is shaken.
  • this 3x3 pixel array is not a border array, so processing can be skipped, or it can be counted as a non-border pixel.
  • the pattern is (01000100) based on whether pixels ⁇ 1, 2, 3, 4, 6, 7, 8, 9 ⁇ have a boundary, and this is converted into decimal to obtain 68 It can be called the second pattern.
  • This naming method may be changed to facilitate the implementation situation.
  • the start point, end point, and direction of the boundary line can be defined according to the arrangement of the pattern. For example, in the 68th pattern, it can be defined that the boundary starts at the bottom left (No. 7) and ends at the top (No. 2). Based on this, the corresponding pattern can be defined as a ⁇ diagonal upper right ( ⁇ ) direction, steep angle ⁇ pattern.
  • the pattern of FIG. 11(b) is analyzed in the same way as follows.
  • the corresponding pattern is the (01010000) pattern, which can be named the 80th pattern. Since the boundary starts from the left side (No. 4) and ends at the top (No. 2), the corresponding pattern can be defined as ⁇ diagonal upper right ( ⁇ ) direction, middle angle ⁇ pattern.
  • Diagonal lower right ( ⁇ ) ⁇ shallow, medium, steep ⁇ angle
  • directional statistical information of boundary pixels can be created in the resulting image of the Canny edge detector. Based on this statistical information, it is possible to effectively determine whether motion blur has occurred in the corresponding video. It is obvious that these criteria can be determined based on a large amount of data by designing a classification method empirically or by using a machine learning method. As such a method, for example, a method such as a decision tree or a random forest may be used, or a classifier using a deep neural network may be designed.
  • a Canny edge detector is applied to the image of the second feature region as shown in FIG. It may include constructing, analyzing the distribution of directional patterns of blocks including the boundary in the boundary image as shown in FIG. 10, and calculating a value representing the degree of shaking of the object from the distribution of the directional patterns. .
  • the nose area has more important information than the surrounding area. Therefore, a method such as separately collecting statistical information in a certain area inside the image and giving a weight may be used.
  • the method used in determining the defocus blur using the Laplacian operator described above can be used. That is, the step of calculating the value representing the degree of shaking of the object from the distribution of the direction pattern includes calculating the degree of distribution of the direction pattern by applying a weight to each block of the second feature region, and at the center of the second feature region. A weight of a block located in the periphery of the second feature region may be set to be greater than a weight of a block located in the periphery of the second feature region.
  • a method for filtering an image of an object for identification of a companion animal includes acquiring an image including the companion animal (S1210), determining the species of the companion animal in the image, and setting a first feature region. (S1220), setting a second feature region including an object for identifying a companion animal within the first feature region in consideration of the determined companion animal species (S1230), and an object in the second feature region. and determining whether the image of the object is suitable for artificial intelligence-based learning or identification by checking the quality of the image (S1240).
  • the quality check of the image of the object may be performed by applying different weights to positions of the first feature region or the second feature region.
  • the quality of the image of the object in the first feature region is checked to determine whether the image of the object is suitable for artificial intelligence-based learning or identification (S1230).
  • the second feature region may be set when it is determined that the image of the object in the first feature region is suitable for artificial intelligence-based learning or identification.
  • Quality inspection (first post-processing) on the first feature region may be omitted according to embodiments.
  • the step of checking the quality of the image of the object in the first feature region and determining whether the image of the object is suitable for artificial intelligence-based learning or identification may include determining whether brightness in the first feature region falls within a reference range. It may include the step of determining. This step may include extracting Luma information according to the BT.601 standard and brightness information of the HSV color space from the first feature region, and determining whether an average value thereof is between a first threshold value and a second threshold value. . In calculating the average value in this step, different weights may be applied according to positions in the image.
  • the step of determining whether an image of an object is suitable for artificial intelligence-based learning or identification may include determining a defocus blur of the object in the image of the object.
  • the step of determining the degree of defocusing of the object may include extracting an image representing a distribution of high-frequency components by applying a Laplacian operator performing second-order differentiation to an image of a second feature region. and calculating a value indicating a defocus of the image of the second feature region from the distribution map of the high frequency component.
  • the weight applied to the central portion of the first feature region or the second feature region may be set to be greater than the weight applied to the peripheral portion of the first feature region or the second feature region.
  • the step of determining whether an image of an object is suitable for artificial intelligence-based learning or identification may include determining a degree of shaking of the object in the image of the object.
  • the step of determining the degree of shaking of the object comprises: constructing an edge image composed of continuously connected edge lines in the image of the object by applying a Canny edge detector to the image of the second feature region; Similarly, it may include analyzing the distribution of directional patterns of blocks including the boundary lines in the boundary image, and calculating a value representing the degree of shaking of the object from the distribution of the directional patterns.
  • the step of calculating a value representing the degree of shaking of the object from the distribution of the direction pattern includes calculating the degree of distribution of the direction pattern by applying a weight to each block of the second feature region, and A weight of a block located in the center of may be set to be greater than a weight of a block located in the periphery of the second feature region.
  • An electronic device 1300 includes a camera 1310 generating an image including a companion animal, and a processor generating an image of an object for identification of a companion animal by processing an image provided from the camera 1310 ( 1320).
  • the processor 1320 sets a first feature area for determining the type of companion animal in the image, and includes an object for identifying the companion animal within the first feature area in consideration of the determined type of companion animal.
  • a feature region is set, and a quality of an image of an object is checked in a second feature region to determine whether the object image is suitable for artificial intelligence-based learning or identification.
  • the processor 1310 may determine whether the object image is suitable for artificial intelligence-based learning or identification by examining the quality of the object image in the first feature region.
  • detection of the second feature region and quality check may be performed only when the image of the object in the first feature region is suitable for artificial intelligence-based learning or identification.
  • the processor 1310 may determine whether the brightness of the first characteristic region falls within a reference range.
  • the quality check (first post-processing) of the first feature region may be omitted according to embodiments.
  • the quality check of the image of the object may be performed by applying different weights to positions of the first feature region or the second feature region.
  • the processor 1310 may determine the degree of out-of-focus of the object in the image of the object.
  • the processor 1310 extracts an image representing the distribution of high-frequency components from the image of the second feature region, and calculates a value representing the defocus of the image of the second feature region from the distribution of the high-frequency component.
  • the weight applied to the central portion of the first feature region or the second feature region may be set to be greater than the weight applied to the peripheral portion of the first feature region or the second feature region.
  • the processor 1310 may determine the degree of shaking of the object in the image of the object.
  • the processor 1310 constructs a boundary image composed of the boundary of the image of the second feature region, analyzes the distribution of direction patterns of blocks including the boundary in the boundary image, and distributes the direction pattern.
  • a value representing the degree of shaking of the object can be calculated from
  • the processor 1310 applies a weight to each block of the second feature region to calculate the degree of distribution of the direction pattern, and the weight of the block located in the center of the second feature region is located in the periphery of the second feature region. It can be set to be greater than the weight of the block.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Image Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Collating Specific Patterns (AREA)

Abstract

본 발명은 연산 복잡도를 감소시키면서 반려 동물의 식별을 위한 객체를 효과적으로 검출할 수 있는 영상 처리 방법 및 전자 장치를 제공한다. 본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하기 위한 방법은, 상기 반려 동물이 포함된 원본 영상을 획득하는 단계와, 상기 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 상기 반려 동물의 종(種)을 결정하는 단계와, 상기 결정된 반려 동물의 종에 기초하여 상기 제1 특징 영역 내에서 상기 반려 동물의 식별을 위한 객체를 검출하는 단계를 포함한다.

Description

반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치
본 발명은 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치에 관한 것으로, 보다 구체적으로 인공 지능 기반의 학습 또는 식별에 적합한 반려 동물의 식별용 객체의 이미지를 획득하기 위한 방법 및 전자 장치에 관한 것이다.
현대 사회에서 사람과 함께 생활하면서 정서적으로 의지할 수 있는 반려 동물에 대한 수요가 높아지고 있다. 이에 따라, 반려 동물에 대한 건강 관리 등을 위하여 다양한 반려 동물에 대한 정보를 데이터베이스화 하여 관리할 필요성이 증가하고 있다. 반려 동물을 관리하기 위하여 사람의 지문과 같이 반려 동물의 식별 정보가 필요하며, 반려 동물에 따라 사용될 수 있는 객체가 각각 정의될 수 있다. 예를 들어, 강아지의 경우 비문(코 주름의 형상)이 각자 상이하므로 각 강아지마다 비문을 식별 정보로 사용할 수 있다.
도 1의 (a)에 도시된 것과 같이, 비문을 등록하는 방법은 사람의 지문 또는 안면을 등록하는 것과 같이 반려 동물의 코를 포함한 안면을 촬영하고(S110) 비문을 포함한 이미지를 데이터베이스에 저장 및 등록하는 과정(S120)에 의해 수행된다. 또한, 비문을 조회하는 방법은 도 1의 (b)에 도시된 것과 같이 반려 동물의 비문을 촬영하고(S130), 촬영된 비문과 일치하는 비문 및 이와 관련된 정보를 탐색하고(S140), 촬영된 비문과 일치하는 정보를 출력하는 과정(S150)에 의해 수행될 수 있다. 도 1과 같이 반려 동물의 비문을 등록하고 조회하는 과정을 통해 각 반려 동물을 식별하고 해당 반려 동물의 정보를 관리할 수 있다. 반려 동물의 비문 정보는 데이터베이스에 저장되고 AI 기반의 학습 또는 식별을 위한 데이터로서 사용될 수 있다.
그러나, 반려 동물의 비문을 취득하고 저장함에 있어 몇 가지 문제점이 존재한다.
먼저, 사진은 촬영 각도, 초점, 거리, 크기, 환경 등에 따라 인식이 어려울 수 있다. 사람의 안면 인식 기술을 비문 인식에 적용하고자 하는 시도가 있었으나, 사람의 안면 정보는 충분한 데이터가 축적된 반면 반려 동물의 비문 정보는 충분한 데이터가 확보되지 않아 인식률이 낮다는 문제점이 있다. 구체적으로, AI 기반의 인식이 수행되기 위하여는 기계가 학습할 수 있는 형태로 가공된 학습 데이터가 필요하나, 반려 동물의 비문은 충분한 데이터가 축적되지 않아 비문 인식에 어려움이 있다.
또한, 반려 동물의 비문 인식을 위하여는 선명한 코 주름을 갖는 이미지가 요구되나, 사람과 달리 반려 동물은 잠시 동작을 멈추는 것과 같은 행위를 할 줄 모르기 때문에 선명한 코 주름 이미지를 취득하기가 쉽지 않다. 예를 들어, 강아지는 계속 안면을 움직이고 혀를 낼름거리기 때문에 원하는 품질의 비문 이미지를 취득하기가 매우 어렵다. 예를 들어, 비문 인식을 위하여 코의 주름이 선명하게 촬영된 영상이 요구되지만 실제로 촬영된 이미지는 대부분 흔들림 등으로 인하여 코 주름이 선명하게 촬영되지 못한 경우가 많다. 이러한 문제를 해결하기 위하여 강아지의 코를 강제로 고정시킨 상태로 촬영하는 방법들이 고려되고 있으나, 반려 동물에게 강제적인 행위를 하도록 하기 때문에 부적절한 것으로 평가받고 있다.
본 발명은 연산 복잡도를 감소시키면서 반려 동물의 식별을 위한 객체를 효과적으로 검출할 수 있는 영상 처리 방법 및 전자 장치를 제공한다.
본 발명은 연산 복잡도를 감소시키면서 반려 동물의 식별을 위한 객체를 효과적으로 검출할 수 있는 영상 처리 방법 및 전자 장치를 제공한다.
본 발명은 반려 동물의 식별을 위한 객체의 이미지를 획득하는 과정에서 낮음 품질의 이미지를 효과적으로 필터링할 수 있는 방법 및 전자 장치를 제공한다.
본 발명의 해결과제는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 해결과제들은 아래의 기재로부터 당업자에게 명확히 이해될 수 있을 것이다.
본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하기 위한 방법은, 상기 반려 동물이 포함된 원본 영상을 획득하는 단계와, 상기 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 상기 반려 동물의 종(種)을 결정하는 단계와, 상기 결정된 반려 동물의 종에 기초하여 상기 제1 특징 영역 내에서 상기 반려 동물의 식별을 위한 객체를 검출하는 단계를 포함한다.
본 발명에 따르면, 상기 반려 동물의 종을 결정하는 단계는, 상기 원본 영상에 대한 제1 전처리를 적용하는 단계와, 상기 전처리된 영상에서 상기 반려 동물의 종을 결정하여 상기 제1 특징 영역을 설정하는 단계와, 상기 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값을 추출하는 단계를 포함할 수 있다.
본 발명에 따르면, 상기 제1 특징 영역을 설정하는 단계는, 학습용 신경망을 사용하여 상기 전처리된 영상으로부터 복수개의 특징 영상을 생성하는 단계와, 상기 복수개의 특징 영상에 각각에 대하여 사전에 정의된 경계 상자를 적용하는 단계와, 상기 경계 상자 내에서 각 반려 동물의 종류 별 확률 값을 계산하는 단계와, 특정 동물 종에 대하여 상기 계산된 확률 값이 기준치 이상인 경우 상기 경계 상자가 포함되도록 상기 제1 특징 영역을 구성하는 단계를 포함할 수 있다.
본 발명에 따르면, 상기 제1 특징 값이 기준치보다 큰 경우 상기 반려 동물을 식별하기 위한 객체 검출이 수행되고, 상기 제1 특징 값이 기준치보다 작은 경우 추가적인 처리가 생략될 수 있다.
본 발명에 따르면, 상기 원본 영상에 대한 제1 전처리를 적용하는 단계는, 상기 원본 영상을 원본 해상도보다 낮은 제1 해상도의 영상으로 변환하는 단계와, 상기 제1 해상도로 변환된 영상에 대하여 상기 제1 전처리를 적용하는 단계를 포함할 수 있다.
본 발명에 따르면, 상기 반려 동물의 식별을 위한 객체를 검출하는 단계는, 상기 반려 동물의 종을 식별하기 위한 제1 특징 영역에 대한 제2 전처리를 적용하는 단계와, 상기 제2 전처리된 제1 특징 영역에서 상기 반려 동물의 종에 기초하여 상기 반려 동물의 식별을 위한 제2 특징 영역을 설정하는 단계와, 상기 제2 특징 영역에 대한 제2 후처리를 적용하여 제2 특징 값을 추출하는 단계를 포함할 수 있다.
본 발명에 따르면, 상기 제1 특징 영역에 대한 제2 전처리는 상기 제1 특징 영역의 설정을 위한 제1 전처리가 적용되는 제1 해상도 보다 높은 제2 해상도에서 수행될 수 있다.
본 발명에 따르면, 상기 제2 특징 영역을 설정하는 단계는 상기 반려 동물의 종에 따라 상기 제1 특징 영역에서 상기 반려 동물의 식별을 위한 객체가 위치하는 확률에 기초하여 상기 제2 특징 영역을 설정하는 단계를 포함할 수 있다.
본 발명에 따르면, 상기 제2 특징 값이 기준치보다 큰 경우 상기 제2 특징 영역을 포함하는 이미지가 서버로 전송될 수 있다.
본 발명에 따르면, 상기 제1 특징 영역을 생성하는 단계는, 상기 영상에서 상기 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하는 단계와, 상기 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 생성하는 단계를 포함할 수 있다.
본 발명에 전자 장치는, 상기 반려 동물이 포함된 원본 영상을 생성하는 카메라와, 상기 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 상기 반려 동물의 종(種)을 결정하고, 상기 결정된 반려 동물의 종에 기초하여 상기 제1 특징 영역 내에서 상기 반려 동물의 식별을 위한 객체를 검출하는 프로세서와, 상기 반려 동물의 식별을 위한 객체가 유효한 경우 상기 객체의 이미지를 서버로 전송하는 통신 모듈을 포함한다.
본 발명에 따르면, 상기 프로세서는 상기 원본 영상에 대한 제1 전처리를 적용하고, 상기 전처리된 영상에서 상기 반려 동물의 종을 결정하여 상기 제1 특징 영역을 설정하고, 상기 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값을 추출할 수 있다.
본 발명에 따르면, 상기 프로세서는 학습용 신경망을 사용하여 상기 전처리된 영상으로부터 복수개의 특징 영상을 생성하고, 상기 복수개의 특징 영상에 각각에 대하여 사전에 정의된 경계 상자를 적용하고, 상기 경계 상자 내에서 각 반려 동물의 종류 별 확률 값을 계산하고, 특정 동물 종에 대하여 상기 계산된 확률 값이 기준치 이상인 경우 상기 경계 상자가 포함되도록 상기 제1 특징 영역을 구성할 수 있다.
본 발명에 따르면, 상기 제1 특징 값이 기준치보다 큰 경우 상기 반려 동물을 식별하기 위한 객체 검출이 수행되고, 상기 제1 특징 값이 기준치보다 작은 경우 추가적인 처리가 생략될 수 있다.
본 발명에 따르면, 상기 프로세서는 상기 원본 영상을 원본 해상도보다 낮은 제1 해상도의 영상으로 변환하고, 상기 제1 해상도로 변환된 영상에 대하여 상기 제1 전처리를 적용할 수 있다.
본 발명에 따르면, 상기 프로세서는 상기 반려 동물의 종을 식별하기 위한 제1 특징 영역에 대한 제2 전처리를 적용하고, 상기 제2 전처리된 제1 특징 영역에서 상기 반려 동물의 종에 기초하여 상기 반려 동물의 식별을 위한 제2 특징 영역을 설정하고, 상기 제2 특징 영역에 대한 제2 후처리를 적용하여 제2 특징 값을 추출할 수 있다.
본 발명에 따르면, 상기 제1 특징 영역에 대한 제2 전처리는 상기 제1 특징 영역의 설정을 위한 제1 전처리가 적용되는 제1 해상도 보다 높은 제2 해상도에서 수행될 수 있다.
본 발명에 따르면, 상기 프로세서는 상기 반려 동물의 종에 따라 상기 제1 특징 영역에서 상기 반려 동물의 식별을 위한 객체가 위치하는 확률에 기초하여 상기 제2 특징 영역을 설정할 수 있다.
본 발명에 따르면, 상기 제2 특징 값이 기준치보다 큰 경우 상기 제2 특징 영역을 포함하는 이미지가 상기 서버로 전송될 수 있다.
본 발명에 따르면, 상기 프로세서는, 상기 영상에서 상기 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하고, 상기 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 생성할 수 있다.
본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하기 위한 방법 및 전자 장치는 반려 동물을 촬영한 후 즉시 비문의 학습 또는 식별을 위한 이미지를 선별하고 서버의 데이터베이스에 저장하도록 함으로써 학습 또는 식별을 위한 반려 동물의 코에 대응하는 객체의 이미지를 효과적으로 획득할 수 있다.
또한, 본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하기 위한 방법 및 전자 장치는 반려 동물의 종을 먼저 결정한 후 반려 동물의 비문 이미지를 추출함으로써 연산 복잡도를 감소시킬 수 있다.
본 발명에 따르면, 반려 동물의 종을 결정하기 위한 특징 영역을 결정하는 과정에서 복수개의 특징 영역 후보들 각각의 신뢰도 값을 고려하여 보다 넓은 영역의 최종 특징 영역을 생성하므로 이후 최종 특징 영역 내에서 반려 동물의 식별용 객체를 검출함으로써 보다 정확한 검출을 가능하게 한다.
본 발명에 따르면, 촬영된 이미지에서 강아지의 코와 같이 반려 동물의 식별을 위한 객체 이미지의 품질을 검사함으로써 해당 이미지가 인공 지능 기반의 학습 또는 식별에 적합한 이미지인지를 확인할 수 있고, 적합한 이미지만을 저장하여 학습 또는 식별을 위한 신경망을 최적화할 수 있다.
본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.
도 1은 AI 기반의 반려 동물의 관리를 위한 개략적인 절차를 도시한다.
도 2은 본 발명에 따른 학습 또는 식별용 객체 이미지의 적합도 판단이 적용된 AI 기반의 반려 동물의 비문 관리를 위한 절차를 도시한다.
도 3은 본 발명에 따른 반려 동물의 관리 시스템에서 반려 동물의 식별을 위한 객체를 검출하기 위한 절차를 도시한다.
도 4는 본 발명이 적용된 반려 동물의 식별 객체를 검출하기 위한 UI(User Interface) 화면의 예를 도시한다.
도 5는 본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하는 과정을 도시한다.
도 6은 본 발명에 따른 특징 영역을 설정하기 위한 과정을 도시한다.
도 7은 본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하기 위한 과정을 나타내는 흐름도이다.
도 8은 본 발명에 따른 반려 동물의 종을 결정하기 위한 특징 영역을 도출하는 과정을 도시한다.
도 9는 본 발명에 따른 반려 동물의 식별을 위한 객체의 이미지를 처리하는 과정을 나타내는 흐름도이다.
도 10은 입력 이미지에 캐니 경계선(Canny edge) 검출기를 적용한 결과 이미지의 예를 나타낸다.
도 11은 캐니 경계선 검출기를 적용한 결과 이미지에서 흔들림 여부를 판단하기 위하여 사용되는 경계선이 위치한 픽셀 블록의 패턴 형태의 예를 도시한다.
도 12는 반려 동물의 식별을 위한 객체의 이미지를 필터링하기 위한 방법의 흐름도이다.
도 13은 본 발명에 따른 전자 장치의 블록도이다.
이하, 첨부한 도면을 참고로 하여 본 발명의 실시예들에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예들에 한정되지 않는다.
본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 동일 또는 유사한 구성요소에 대해서는 동일한 참조 부호를 붙이도록 한다.
또한, 여러 실시예들에 있어서, 동일한 구성을 가지는 구성요소에 대해서는 동일한 부호를 사용하여 대표적인 실시예에서만 설명하고, 그 외의 다른 실시예에서는 대표적인 실시예와 다른 구성에 대해서만 설명하기로 한다.
명세서 전체에서, 어떤 부분이 다른 부분과 "연결(또는 결합)"되어 있다고 할 때, 이는 "직접적으로 연결(또는 결합)"되어 있는 경우뿐만 아니라, 다른 부재를 사이에 두고 "간접적으로 연결(또는 결합)"된 것도 포함한다. 또한, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.
본 문서에서는 강아지의 코 주름 형상(비문)을 활용하여 식별 정보를 추출하는 내용을 중심으로 설명하나, 본 발명에서 반려 동물의 범위는 강아지에 한정되지 않으며, 또한 식별 정보로 사용되는 특징으로서 비문에 한정되지 않고 다양한 반려 동물의 신체적 특징이 사용될 수 있다.
앞서 설명한 바와 같이, AI 기반의 학습 또는 식별에 적합한 반려 동물의 비문 이미지가 충분하지 않고 반려 동물의 비문 이미지는 그 품질이 낮을 가능성이 크기 때문에 AI 기반의 학습 또는 식별을 위하여 비문 이미지를 선별적으로 데이터베이스에 저장할 필요가 있다.
도 2은 본 발명에 따른 학습 또는 식별용 비문 이미지의 적합도 판단이 적용된 AI 기반의 반려 동물의 비문 관리를 위한 절차를 도시한다. 본 발명은 반려 동물의 비문을 촬영한 후 촬영된 비문 이미지가 AI 기반의 학습 또는 식별을 위한 데이터로서 적합한지 여부를 먼저 판단하고, 적합하다고 판단된 경우 AI 기반의 학습 또는 인식을 위한 서버로 전송 및 저장하여 이후 학습 또는 식별을 위한 데이터로 사용한다.
도 2에 도시된 것과 같이, 본 발명에 따른 비문 관리 절차는 크게 비문 취득 절차와 비문 인식 절차를 포함한다.
본 발명에 따르면, 신규로 반려 동물의 비문을 등록할 때 반려 동물이 포함된 영상을 촬영한 후 반려 동물의 얼굴 영역에서 비문 이미지를 추출하며, 특히 해당 비문 이미지가 해당 반려 동물의 식별 또는 학습을 위하여 적합한 지 여부를 먼저 판단한다. 촬영된 이미지가 식별 또는 학습에 적합하다고 판단된 경우 해당 이미지가 서버(인공지능 신경망)로 전송되어 데이터베이스에 저장된다.
비문을 통해 반려 동물의 식별 정보를 조회하는 경우, 마찬가지로 반려 동물이 포함된 영상을 촬영한 후 반려 동물의 얼굴 영역에서 비문 이미지를 추출하며, 특히 해당 비문 이미지가 해당 반려 동물의 식별 또는 학습을 위하여 적합한 지 여부를 먼저 판단한다. 촬영된 이미지가 식별 또는 학습에 적합하다고 판단된 경우 해당 이미지가 서버로 전송되고 기존에 저장된 비문 이미지들과의 매칭을 통해 해당 반려 동물의 식별 정보를 추출한다.
비문 등록 절차의 경우, 도 2의 (a)와 같이 반려 동물을 촬영하고(S205), 촬영된 반려 동물의 이미지에서 먼저 얼굴 영역(이후 제1 특징 영역으로 설명됨)을 검출하고(S210), 얼굴 영역 내에서 코가 차지하는 영역(이후 제2 특징 영역으로 설명됨)을 검출하고 촬영된 이미지가 학습 또는 식별용으로 적합한지에 대한 품질 검사를 통해 비문 이미지를 출력하고(S215), 출력된 이미지가 인공 신경망을 구성하는 서버로 전송되어 저장 및 등록된다(S220).
비문 조회 절차의 경우, 도 2의 (b)와 같이 반려 동물을 촬영하고(S230), 반려 동물의 이미지에서 얼굴 영역을 검출하고(S235), 얼굴 영역 내에서 코가 차지하는 영역을 검출하고 촬영된 이미지가 학습 또는 식별용으로 적합한지에 대한 품질 검사를 통해 비문 이미지를 출력하는데(S240), 이는 비문 등록 절차와 유사하다. 이후 절차는 출력된 비문 이미지를 기존에 저장 및 학습된 비문 이미지들과 비교하여 일치하는 정보를 탐색하는 과정(S245)과 탐색 결과에 대한 출력 과정(S250)이 수행된다.
도 3은 본 발명에 따른 반려 동물의 비문 관리 시스템에서 반려 동물의 코에 대응하는 객체를 검출하기 위한 절차를 도시한다.
도 3을 참조하면, 먼저 반려 동물을 촬영하여 초기 이미지가 생성되며(S305), 초기 이미지에서 얼굴 영역을 검출하는 단계가 먼저 수행된다(S310). 이후 얼굴 영역 내에서 반려 동물의 종을 고려하여 코 영역을 검출하는 단계가 수행된다(S315). 1차적으로 얼굴 영역을 먼저 검출하고 2차적으로 코 영역을 검출하는 것은 계단식(cascaded) 검출을 통해 모든 종을 고려하여 코 영역을 검출하는 것 보다 연산 복잡도를 낮출 수 있고 검출 정확도도 향상시킬 수 있기 때문이다. 이후 검출된 코 영역의 이미지가 향후 비문의 식별 또는 학습에 있어 적합한지 여부를 검사하기 위한 품질 검사가 수행되고(S320), 품질 검사 결과 적합한 이미지로 판단된 경우 해당 이미지를 서버로 전송하여 비문의 식별에 사용되거나 향후 학습 또는 식별을 위해 저장될 수 있다(S325).
또한, 본 발명에 따르면 강아지의 코 주름(비문)과 같이 반려 동물의 식별을 위한 객체의 이미지가 흐릿하게 촬영되지 않도록 검출된 코 영역에 초점이 맞춰지도록 카메라를 제어할 수 있다(S330). 이는 카메라의 초점이 코 영역에 맞춰지도록 함으로써 코의 초점이 어긋남으로 인해 이미지의 품질이 저하되는 것을 방지하기 위함이다.
도 4는 본 발명이 적용된 반려 동물의 비문 이미지를 획득하기 위한 UI(User Interface) 화면의 예를 도시한다. 도 4는 여러 반려 동물들 중에서 강아지의 비문을 취득하기 위한 경우를 도시한다.
도 4를 참고하면, 촬영중인 영상에서 반려 동물의 종을 식별하여 현재 촬영중인 반려 동물이 강아지인지 여부를 판단한다. 촬영중인 반려 동물이 강아지가 아닌 경우 도 4의 (a)와 같이 '강아지를 찾을 수 없어요'와 같은 문구를 출력하고, 촬영중인 반려 동물이 강아지인 경우 강아지의 비문을 획득하기 위한 절차를 수행한다. 촬영중인 반려 동물이 강아지인지 여부를 판단하기 위하여 영상에 포함된 반려 동물의 얼굴 영역을 먼저 추출하고, 얼굴 영역에 포함된 이미지를 기존의 학습된 데이터와 비교하여 해당 반려 동물의 종(Species)을 결정할 수 있다.
이후, 도 4의 (b) 내지 (e)와 같이 강아지의 얼굴에서 강아지의 코에 해당하는 영역을 설정한 후 코에 해당하는 영역에 초점을 맞추어 촬영이 수행될 수 있다. 즉, 반려 동물의 식별을 위한 객체에 해당하는 영역의 위치(중심점)으로 초점이 맞춰지도록 카메라를 제어할 수 있다. 또한, 사용자에게 현재 추적중인 객체(예: 코)로 초점이 맞춰져 촬영되고 있음을 피드백을 하기 위하여 추적중인 객체의 위치에 그래픽 엘레먼트를 오버레이(overlay)할 수 있다. 추적중인 객체의 위치에 해당 객체의 검출 상태를 나타내는 그래픽 엘레먼트를 표시함으로써 현재 촬영중인 반려 동물에서 객체 인식이 수행되고 있음이 사용자에게 인지될 수 있다.
도 4의 (b) 내지 (e)에 도시된 것과 같이, 현재 촬영중인 객체의 이미지 품질이 양호한 경우(객체의 이미지의 품질이 기준 조건을 만족하는 경우), 양호 품질 상태를 나타내는 제1 그래픽 엘레먼트(410A)(예: 웃는 아이콘 또는 녹색 아이콘)를 객체에 오버레이하여 출력할 수 있다. 현재 촬영중인 객체의 이미지 품질이 불량한 경우(객체의 이미지의 품질이 기준 조건을 만족하지 않는 경우), 불량 품질 상태를 나타내는 제2 그래픽 엘레먼트(410B)(예: 우는 아이콘 또는 적색 아이콘)를 객체에 오버레이하여 출력할 수 있다.
도 4와 같이 강아지가 지속적으로 움직이는 경우에도 강아지의 코를 추적하면서 코에 초점을 맞춰 촬영이 수행될 수 있다. 이때 각 촬영된 영상에서 강아지의 비문 이미지가 반려 동물의 식별 또는 학습을 위하여 적합한지 여부를 판단하고, 적합성에 대한 정도가 출력될 수 있다.
예를 들어, 촬영된 강아지의 비문 이미지가 반려 동물의 식별 또는 학습을 위하여 적합한지에 대한 정도가 수치로서 계산될 수 있으며, 적합도에 대한 수치에 따라 적합도가 낮을수록 'BAD' 방향으로, 적합도가 높을 수록 'GOOD' 방향으로 게이지가 채워지는 형태의 스코어 정보(420)가 출력될 수 있다. 즉, 영상에서 객체의 촬영 품질을 나타내는 스코어 정보(420)가 출력될 수 있다.
또한, 현재 촬영되고 있는 비문의 이미지에 대한 품질 평가(사이즈, 밝기, 선명도 등)를 수행하여 인공 지능 기반의 식별 또는 학습에 적합한 비문 이미지가 촬영되도록 사용자에게 피드백을 제공하는 메시지(430)를 출력할 수 있다. 예를 들어, 강아지 비문 이미지의 사이즈가 기준치보다 작은 경우, 보다 큰 사이즈의 비문 이미지가 촬영되도록 도 4의 (c)에 도시된 것과 같이 '강아지 코 거리를 맞춰주세요'와 같은 메시지를 출력할 수 있다. 또한, 반려 동물의 식별을 위하여 적합한 품질을 갖는 객체의 이미지가 획득되는 진행 정도를 나타내는 진행률 정보(440)가 출력될 수 있다. 예를 들어, 적합한 품질을 갖는 비문 이미지가 4장 필요하고 현재까지 적합한 이미지가 1장 취득된 경우, 도 4와 같이 진행률이 25%임을 나타내는 진행률 정보(440)가 출력될 수 있다.
강아지의 비문 이미지가 충분히 획득된 경우, 촬영을 종료하고 해당 강아지의 비문 이미지와 함께 식별 정보를 데이터베이스에 저장하거나 해당 강아지의 식별 정보를 출력할 수 있다.
본 발명에서, 반려 동물의 얼굴 영역을 먼저 검출한 이후 얼굴 영역 내에서 코 영역을 검출한다. 이는 연산 복잡도를 저감시키면서 객체 검출 난이도를 낮추기 위함이다. 영상을 촬영하는 과정에서 검출하고자 하는 객체 이외의 물체 또는 불필요하거나 잘못된 정보가 영상에 포함될 수 있다. 따라서, 본 발명은 촬영중인 영상에서 원하는 객체(반려 동물의 코)가 존재하는지 여부를 먼저 판단한다.
또한, 반려 동물의 비문을 식별하기 위하여는 일정 수준 이상의 해상도를 갖는 영상이 요구되지만 영상의 해상도가 높아질수록 영상의 처리를 위한 연산량이 증가하게 되는 문제가 있다. 또한, 반려 동물의 종류가 증가함에 따라 각 반려 동물의 종류 별로 학습 방법이 상이하기 때문에 인공지능의 연산 난이도가 더욱 증가하게 되는 문제가 있다. 특히, 유사한 종류의 동물은 비슷한 형상을 가지기 때문에(예: 강아지의 코와 늑대의 코는 유사함) 유사한 동물에 대하여 동물의 종류와 함께 코를 분류하는 것은 매우 높은 연산 난이도를 가질 수 있다.
따라서, 본 발명은 이러한 연산 복잡도를 저감시키기 위하여 계단식(cascaded) 객체 검출 방법을 사용한다. 예를 들어, 반려 동물을 촬영하면서 반려 동물의 얼굴 영역을 먼저 검출한 후 반려 동물의 종류를 먼저 식별하고, 검출된 반려 동물의 얼굴 영역과 식별된 반려 동물의 종류에 기초하여 해당 반려 동물의 코 영역을 검출한다. 이는 상대적으로 연산 복잡도가 낮은 저해상도에서 반려 동물의 종류를 식별하는 과정을 먼저 수행하고 반려 동물의 종류에 따라 결정된 객체 검출 방법을 적용하여 반려동물의 얼굴 영역에서 고해상도를 유지하며 코 영역 검출을 수행하는 것이다. 그리하여, 본 발명은 상대적으로 연산 복잡도를 저감시키면서도 효과적으로 반려 동물의 코 영역을 검출할 수 있다.
도 5는 본 발명에 따른 반려 동물의 식별을 위한 전반적인 영상 처리 과정을 도시한다. 도 5에 도시된 것과 같이, 본 발명에 의한 입력 영상을 처리하는 방법은 카메라에서 입력 영상을 받아오는 단계(S505), 입력 영상의 크기를 조정하여 1차 처리 영상을 생성하는 제1 전처리 단계(S510), 제1 전처리 단계에서 생성된 처리 영상으로부터 동물의 위치와 동물의 종을 검출하는 제1 특징 영역 검출 단계(S515), 제1 특징 영역 검출 단계의 결과물로부터 동물 영상의 제1 특징 값을 추출하는 제1 후처리 단계(S520), 제1 후처리 단계를 통해 처리된 영상에서 반려 동물의 종에 따라 반려 동물의 식별을 위한 객체(예: 코)를 검출하기 위한 검출기를 결정하는 단계(S525), 반려 동물의 식별을 위한 영상 처리를 위하여 영상의 크기를 조절하는 제2 전처리 단계(S530), 제1 특징 검출 단계에서 검출할 수 있는 동물의 종에 각각 대응하는 적어도 하나의 제2 특징 영역 검출 단계(S535), 각각의 제2 특징 영역 검출 단계에 대응하여 동물 영상의 제2 특징 값을 추출하는 제2 후처리 단계(S540)를 포함한다.
제1 전처리 단계
원본 영상에 대한 제1 전처리를 적용하는 단계(S510)는 원본 영상의 크기, 비율, 방향 등을 조절하여 객체 검출에 적합한 형태로 영상을 변환하는 단계이다.
카메라 기술의 발달에 따라, 입력 영상은 대부분 수백만에서 수천만 화소로 구성되며, 이렇게 큰 영상을 직접 처리하는 것은 바람직하지 않다. 객체 검출이 효율적으로 작동하려면 입력 영상을 처리하기 적당하도록 전처리 과정을 수행해야 한다. 이러한 과정은 수학적으로는 좌표계 변환으로 이루어진다.
입력 영상 내의 임의의 4점을 처리 영상의 네 꼭지점에 대응시키고, 임의의 좌표계 변환 과정을 거침으로써 임의의 처리 영상을 생성할 수 있음은 명백하다. 그러나 좌표계 변환 과정에 있어 임의의 비선형 변환 함수를 사용하는 경우, 특징 영역 검출기의 결과로 획득한 경계 상자로부터 입력 영상의 특징 영역을 얻는 역변환이 가능하여야 한다. 예를 들면, 입력 영상의 임의의 4점을 처리 영상의 네 꼭지점에 대응시켜 선형 변환하는 아핀 변환(Affine Transformation)을 사용하면 손쉽게 그 역변환 과정을 얻을 수 있으므로 이를 사용함이 바람직하다.
입력 영상 내의 임의의 4점을 결정하는 방법의 일 예로, 입력 영상의 네 꼭지점을 그대로 사용하는 방법을 생각할 수 있다. 또는, 가로 길이와 세로 길이가 같은 비율로 변환될 수 있도록, 입력 영상에 여백을 덧붙이거나, 또는 입력 영상의 일부를 잘라내는 방법을 사용할 수 있다. 또는 입력 영상의 크기를 축소시키기 위하여 다양한 보간 방법을 적용할 수 있다.
제1 특징 영역 검출 단계
본 단계는 전처리된 영상 내에서 반려 동물이 존재하는 영역과 그 동물의 종(種)을 먼저 검출함으로써, 후술할 제2 특징 영역 검출 단계에서 사용할 수 있는 제1 특징 영역을 설정하고, 더불어 각 반려 동물의 종에 최적화된 제2 특징 영역 검출기를 선택함으로써 최종적인 특징점 검출 성능을 올리는 데에 그 목적을 둔다.
본 과정에 있어 객체 검출 및 분류 방법은 관련 분야에 통상적인 지식을 가진 자라면 어느 것이던 용이하게 결합할 수 있을 것이다. 그러나, 종래의 방법과 대비하여 인공 신경망에 기반한 방법이 성능이 우수한 것으로 알려져 있으므로, 가급적 인공 신경망에 기반한 특징 검출 기법을 사용하는 것이 바람직하다. 예를 들어, 인공 신경망에 한 장의 이미지에 대하여 여러 가지 크기의 물체를 검출하는 알고리즘인 SSD(Single-Shot Multibox Detection) 방식의 특징 검출기가 사용될 수 있다.
앞서 설명한 전처리기에 따라 정규화된 입력 영상은, 인공 신경망에 의하여 계층적으로 제1 특징 영상부터 제n 특징 영상을 구성하게 된다. 이 때 각 계층마다 특징 영상을 추출하는 방법은 인공 신경망의 학습 단계에서 기계적으로 학습될 수 있다.
이렇게 추출된 계층적 특징 영상은, 각 계층마다 대응되는 사전 정의된 상자(Priori Box) 목록과 결합되어 경계 상자와 개체 종류, 그리고 신뢰도 값 목록을 생성하게 된다. 이러한 연산 과정 또한 인공 신경망의 학습 단계에서 기계적으로 학습될 수 있다. 예를 들어 그 결과값은 아래의 표 1과 같은 형식으로 반환된다. 이 때 신경망이 판단할 수 있는 종의 개수는 신경망 설계 단계에서 결정되며, 암묵적으로 객체가 존재하지 않는 경우, 즉 "배경"이 정의된다.
Figure PCTKR2022009095-appb-img-000001
이러한 결과 상자는 NMS(Non-Maximum Suppression) 단계를 통하여 중첩되는 결과 상자들을 병합하여 최종적으로 영상 내에 존재하는 객체 검출 결과로 반환된다. NMS는 복수개의 특징 영역 후보들로부터 최종적인 특징 영역을 도출하는 과정으로서, 특징 영역 후보들은 도 6과 같은 절차에 따라 표 1과 같은 확률 값을 고려하여 생성될 수 있다.
이 과정을 상세히 설명하면 다음과 같다.
1. 배경을 제외한 각각의 종에 대하여 각각 다음 과정을 수행한다.
A. 경계 상자 목록에서, 해당 종일 확률이 특정 문턱 값 보다 낮은 상자를 제외한다. 남은 상자가 없다면 결과 없음으로 종료한다.
B. 상기 경계 상자 목록에서, 해당 종일 확률이 가장 높은 상자를 제1 상자(제1 경계 영역)로 지정하고 경계 상자 목록에서 제외한다.
C. 나머지 경계 상자 목록에 대하여, 확률이 높은 순서에 따라 각각 다음 과정을 수행한다.
i. 제1 상자와의 교집합 대 합집합 면적 비(Intersection over Union)를 연산한다.
ii. IoU가 특정 문턱 값보다 높다면, 이 상자는 제1 상자와 중첩되는 상자이다. 제1 상자와 병합한다.
D. 제1 상자를 결과 상자 목록에 추가한다.
E. 경계 상자 목록에 상자가 남아 있다면, 남은 상자를 대상으로 다시 C 단계부터 반복한다.
두 상자 A와 B에 대하여, 교집합 대 합집합 면적비는 아래의 수학식 1과 같이 효과적으로 연산할 수 있다.
Figure PCTKR2022009095-appb-img-000002
즉, 본 발명에 따르면 특징 영역 후보들을 생성하는 단계는 특징 영상에서 특정 동물 종에 해당할 확률이 가장 높은 제1 경계 영역(제1 상자)을 선택하는 단계와, 특징 영상에서 선택된 경계 영역(제1 상자)을 제외한 나머지 경계 영역들에 대하여 확률 값의 순서에 따라 제1 경계 영역과의 교집합 대 합집합 면적비(IoU)를 계산하고 교집합 대 합집합 면적이 기준 면적비보다 큰 경계 영역을 특징 영상의 특징 영역 후보에 포함시키는 단계를 포함할 수 있다.
상기 과정에서 제1 상자와 중첩되는 상자를 병합하는 방법에 대해 설명하면 다음과 같다. 예를 들어, 제1 상자는 그대로 유지하고 제2 상자는 경계 상자 목록에서 삭제하는 방법으로 병합할 수 있다 (Hard NMS). 또는, 제1 상자는 그대로 유지하고 제2 상자가 특정 종일 확률을 (0, 1) 사이의 값만큼 가중치를 주어 감소시키고, 감쇄된 결과값이 특정 문턱 값보다 작다면 비로소 경계 상자 목록에서 삭제하는 방법으로 병합할 수 있다 (Soft NMS).
본 발명에서 제안하는 일 실시예로서, 아래의 수학식 2와 같이 제1 상자(제1 특징 영역 후보)와 제2 상자(제1 특징 영역 후보)를 확률 값에 따라 병합하는 새로운 방법(Expansion NMS)을 사용할 수 있다.
Figure PCTKR2022009095-appb-img-000003
이 때, p1, p2 는 각각 제 1 상자(제1 특징 영역 후보), 제 2 상자(제1 특징 영역 후보)의 확률 값이며, C(x,y) 1, C(x,y) 2, C(x,y) n는 각각 제 1 상자, 제 2 상자, 병합된 상자의 중앙점의 (x,y) 좌표 값을 나타낸다. 같은 방법으로, W1, W2, Wn은 각각 제1 상자, 제2 상자, 병합된 상자의 가로 너비를, H1, H2, Hn은 세로 높이를 나타낸다. 병합된 상자의 확률 값은 제1 상자의 확률 값을 사용할 수 있다. 본 발명에 따른 확장형 NMS에 의해 도출되는 제1 특징 영역은 각 특징 영역 후보들에서 특정 종이 위치할 신뢰도 값을 고려하여 결정된다.
즉, 제1 특징 영역이 위치하는 중심점(C(x,y) n)은 수학식 2와 같이 특징 영역 후보의 중심점들(C(x,y) 1, C(x,y) 2)에 대한 신뢰도 값(p1, p2)의 가중 합에 의해 결정될 수 있다.
또한, 제1 특징 영역의 너비(Wn )는 수학식 2와 같이 특징 영역 후보들의 너비들(W1, W2)에 대한 신뢰도 값(p1, p2)의 가중 합에 의해 결정되고, 제1 특징 영역의 높이(Hn)는 특징 영역 후보들의 높이들(H1, H2)에 대한 신뢰도 값(p1, p2)의 가중 합에 의해 결정될 수 있다.
상기 실시 예에 따라 새로운 상자를 생성함으로써, 기존의 Hard-NMS 또는 Soft-NMS 방식과 대비하였을 때, 폭과 너비가 더 큰 상자를 얻게 된다. 본 실시예에 따르면 다단계 검출기를 수행하기 위한 전처리 검출에서는 일정 부분의 여백을 추가하는 구성이 가능한데, 본 발명에 따른 확장형 NMS(Expansion NMS)를 사용함으로써 이러한 여백을 적응적으로 결정할 수 있다.
도 8은 기존의 NMS와 비교하여 본 발명에 따른 확장형 NMS를 적용하여 반려 동물의 특징 영역을 검출하는 경우의 예를 도시한다. 도 8의 (a)는 원본 영상에서 생성된 복수개의 특징 영역 후보들을 도시하며, 도 8의 (b)는 기존의 NMS에 의해 도출된 제1 특징 영역의 예, 도 8의 (c)는 본 발명에 따른 확장형 NMS를 적용하여 도출된 제2 특징 영역의 예를 도시한다. 도 8의 (b)에 도시된 것과 같이 기존의 NMS(Hard NMS, Soft NMS)는 복수개의 박스들(특징 영역 후보들) 중 신뢰도가 가장 큰 하나의 박스(특징 영역 후보)를 선택하기 때문에 이후 수행되는 제2 특징 영역 검출 과정에서 코 영역과 같이 비문을 획득하는데 필요한 영역이 벗어날 가능성이 있다.
따라서, 본 발명은 복수개의 박스들(특징 영역 후보들)에 대하여 신뢰도 값에 기반한 가중 평균을 적용하여 도 8의 (c)와 같이 너비와 높이가 큰 하나의 박스를 제1 특징 영역(반려 동물의 얼굴 영역)으로 설정하고, 제1 특징 영역 내에서 반려 동물의 식별을 위한 제2 특징 영역(코 영역)을 검출할 수 있다. 본 발명과 같이 보다 확장된 제1 특징 영역을 설정함으로써 이후 수행되는 제2 특징 영역이 검출되지 않는 오류의 발생을 감소시킬 수 있다.
마지막으로, 이렇게 결정된 하나 또는 복수 개의 경계 상자에 대하여, 전처리 단계에서 사용한 임의의 변환 과정에 대한 역변환 과정을 거침으로써 원본 영상에서의 특징 영역을 얻을 수 있음은 당연하다. 구성에 따라서는 원본 영상에서의 특징 영역에 일정량의 여백을 덧붙임으로써 후술할 제2 검출 단계를 잘 수행할 수 있도록 조정할 수 있다.
제1 후처리 단계
앞서 기술한 제1 특징 영역 설정 단계(S515)에서 획득된 입력 영상의 각 특징 영역에 대하여, 추가적인 후처리 단계를 수행함으로써 제1 특징 값을 생성할 수 있다. 예를 들어, 입력 영상의 제1 특징 영역에 대한 밝기 정보(제1 특징 값)를 획득하기 위해 아래의 수학식 3과 같은 연산을 수행할 수 있다.
Figure PCTKR2022009095-appb-img-000004
Figure PCTKR2022009095-appb-img-000005
이 때 L은 BT.601 표준에 따른 Luma 값이며, V는 HSV 색공간에서 정의하는 명도 값이다. M, N은 대상 특징 영역의 가로 너비와 세로 높이이다.
이렇게 추가적으로 생성한 제1 특징 값을 이용하여, 제1 특징 영역 검출 단계(S515)에서 획득한 제1 특징 영역이 본 특허와 결합되는 응용 분야에서 사용하는데 적합한지 예측할 수 있다. 추가적으로 생성되는 제1 특징 값은 응용 분야에 따라 적절하게 설계되어야 함은 자명하다. 응용 분야에서 정의하는 제1 특징 값의 조건을 충족하지 않는 경우, 선택적으로 후술하는 제2 특징 영역 설정 및 객체 검출 단계를 생략하도록 시스템을 구성할 수 있다.
제2 특징 영역 검출 단계
본 단계는 동물이 존재하는 영역에서 구체적으로 응용 분야에서 필요로 하는 특징 영역을 추출하는 것을 목적으로 한다. 예를 들어, 동물의 얼굴 영역에서 눈, 코, 입, 귀의 위치를 검출해 내는 응용 분야를 예를 들면, 제1 특징 영역 검출 단계에서는 동물의 얼굴 영역과 동물의 종 정보를 우선 구분하고, 제2 특징 영역 검출 단계에서는 동물의 종에 따라 눈, 코, 입, 귀 위치를 검출해 내는 것을 목적으로 한다.
이 과정에 있어, 제2 특징 영역 검출 단계는 각각의 동물의 종에 특화된 서로 독립된 복수 개의 특징 영역 검출기로 구성될 수 있다. 예를 들어, 제1 특징 영역 검출 단계에서 개, 고양이, 햄스터를 구분할 수 있다면, 3개의 제2 특징 영역 검출기를 두고 각각을 개, 고양이, 햄스터에 대해 특화되도록 설계하는 것이 바람직하다. 이렇게 함으로써, 개별 특징 영역 검출기에서 학습하여야 하는 특징 종류를 감소시켜 학습 복잡도를 감소시킬 수 있으며, 또한 학습 데이터 수집 측면에서도 더 적은 숫자의 데이터 만으로도 신경망 학습이 가능하게 됨은 자명하다.
각각의 제2 특징 영역 검출기는 서로 독립적으로 구성되므로, 통상적인 지식 소유자라면 독립된 개별 검출기를 손쉽게 구성이 가능하다. 각각의 특징 영역 검출기는 각각의 종에서 검출하려는 특징 정보에 맞게끔 개별적으로 구성하는 것이 바람직하다. 또는, 시스템 구성의 복잡도를 감소시키기 위하여, 일부 또는 모든 제2 특징 영역 검출기가 같은 구조의 특징 영역 검출기를 공유하되, 학습 파라미터 값을 교체함으로써 각각의 종에 적합하게 시스템을 구성하는 방법을 사용할 수 있다. 더욱 나아가, 제2 특징 영역 검출기로 제1 특징 영역 검출 단계와 동일한 구조의 특징 영역 검출기를 사용하되, 학습 파라미터 값과 NMS 방법만을 교체함으로써 시스템 복잡도를 더욱 감소시키는 방법을 고려할 수도 있다.
제1 특징 영역 검출 단계 및 제1 후처리 단계를 통하여 설정된 하나 또는 복수 개의 특징 영역에 대하여, 제1 특징 영역 검출 단계에서 검출한 종 정보를 이용하여 어떤 제2 특징 영역 검출기를 사용할 지 결정하고, 결정된 제2 특징 영역 검출기를 이용하여 제2 특징 영역 검출 단계를 수행한다.
먼저 전처리 과정을 수행한다. 이 때 좌표를 변환하는 과정에서, 역변환이 가능한 변환 과정을 사용해야 함은 자명하다. 제2 전처리 과정에서는 입력 영상 내에서 검출된 제1 특징 영역을 제2 특징 영역 검출기의 입력 영상으로 변환하여야 하므로 변환 함수를 설계하는데 필요한 4개 점은 제1 특징 영역의 네 꼭지점으로 정의함이 바람직하다.
제2 특징 영역 검출기를 통하여 획득한 제2 특징 영역은 제1 특징 영역을 이용하여 검출된 값이므로, 전체 입력 영상 내에서 제2 특징 영역을 연산할 때에는 제1 특징 영역을 고려하여야 한다.
제2 특징 영역 검출기를 통하여 획득한 제2 특징 영역에 대하여, 제1 후처리 단계와 유사하게 추가적인 후처리 단계를 수행함으로써 제2 특징 값을 생성할 수 있다. 예를 들어, 영상의 선명도를 구하기 위하여 Sobel filter를 적용하거나, 또는 특징 영역 사이에 검출 여부 및 상대적인 위치 관계를 이용하여, 검출하려는 동물의 자세 등의 정보를 구할 수 있다. 또한, 이후 설명되는 것과 같은 이미지 품질 검사(예: 초점 어긋남(Focus blur), 흔들림(Motion blur))가 수행될 수 있다.
이렇게 추가적으로 생성한 제2 특징 값을 이용하여, 제2 객체 검출 단계에서 획득한 특징 영역이 본 특허와 결합되는 응용 분야에서 사용하는데 적합한지 예측할 수 있다. 추가적으로 생성되는 제2 특징 값은 응용 분야에 따라 적절하게 설계되어야 함은 자명하다. 응용 분야에서 정의하는 제2 특징 값의 조건을 충족하지 않는 경우, 제2 검출 영역뿐만 아니라 제1 검출 영역을 검출 결과에서 제외하는 등 응용 분야에 적합하게 데이터를 취득할 수 있도록 설계함이 바람직하다.
시스템 확장
본 발명에서는 2단계의 검출 단계를 구성함으로써, 제1 특징 위치 검출 단계에서는 동물의 위치와 종을 검출하고, 이 결과에 따라 제2 특징 위치 검출 단계에서 사용하는 검출기를 선택하는 시스템과 구성 방법의 예를 들었다.
이러한 계단식 구성(cascade configuration)은 손쉽게 다층 계단식 구성으로 확장될 수 있다. 예를 들어, 제1 특징 위치 검출 단계에서는 동물의 몸 전체를 검출하고, 제2 특징 위치 검출 단계에서는 동물의 얼굴 위치와 팔다리 위치를 검출하고, 제3 특징 위치 검출 단계에서는 얼굴에서 눈, 코, 입, 귀의 위치를 검출하는 등의 응용 구성이 가능하다.
이러한 다층 계단식 구성을 사용함으로써 동시에 여러 계층의 특징 위치 취득이 가능한 시스템을 손쉽게 설계할 수 있다. 다층 계단식 시스템을 설계함에 있어 층 수를 결정하는 데에는 취득하고자 하는 특징 위치의 계층 도메인, 전체 시스템의 동작 시간과 복잡도, 그리고 각각의 개별 특징 영역 검출기를 구성하는데 필요한 자원 등을 고려하여야 최적의 계층 구조를 설계할 수 있음은 자명하다.
도 7은 본 발명에 따른 반려 동물의 비문 관리 시스템에서 반려 동물의 코에 대응하는 객체를 검출하기 위한 방법의 흐름도이다.
본 발명에 따른 반려 동물의 식별을 위한 객체를 검출하기 위한 방법은, 반려 동물(예: 강아지)이 포함된 원본 영상을 획득하는 단계(S710)와, 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 반려 동물의 종(種)을 결정하는 단계(S720)와, 결정된 반려 동물의 종(種)에 기초하여 제1 특징 영역 내에서 반려 동물의 식별을 위한 객체(예: 코)를 검출하는 단계(S730)를 포함한다.
S710 단계에서, 반려 동물의 객체 인식을 위한 어플리케이션이 실행된 상태에서 활성화된 카메라를 통해 반려 동물이 포함된 원본 영상이 획득된다. 여기서 반려 동물이 원활하게 촬영될 수 있도록 조도, 초점 등이 조절될 수 있다. 여기서 획득된 영상이 도 5 및 도 6의 입력 영상으로 제공될 수 있다. 이후 앞서 설명한 바와 같이 계단식(cascaded) 객체 검출을 위하여 반려 동물의 종을 결정하는 단계(S720) 및 반려 동물의 객체를 검출하는 단계(S730)가 수행될 수 있다.
S720 단계에서, 반려 동물의 종을 식별하기 위한 절차가 수행된다. 본 발명에 따르면, 상기 반려 동물의 종을 결정하는 단계(S720)는, 원본 영상에 대한 제1 전처리를 적용하는 단계와, 전처리된 영상에서 반려 동물의 종을 식별하고 상기 제1 특징 영역을 설정하는 단계와, 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값을 추출하는 단계를 포함할 수 있다.
원본 영상에 대한 제1 전처리를 적용하는 단계는 앞서 도 5의 S510 단계를 참조하여 설명한 것과 같이 원본 영상의 크기, 비율, 방향 등을 조절하여 객체 검출에 적합한 형태로 영상을 변환하는 단계이다.
제1 특징 영역을 설정하는 단계는 영상에서 반려 동물이 존재하는 영역과 그 반려 동물의 종을 검출하는 단계로서, 후술할 제2 특징 영역 검출 단계에서 사용할 수 있는 제1 특징 영역을 설정하고, 더불어 각 반려 동물의 종에 최적화된 제2 특징 영역 검출기를 선택함으로써 최종적인 특징점 검출 성능을 개선하기 위함이다.
본 발명에 따르면, 제1 특징 영역을 설정하는 단계는, 학습용 신경망을 사용하여 상기 전처리된 영상을 복수개의 특징 영상으로 구분하는 단계와, 복수의 특징 영상에 각각에 대하여 사전에 정의된 경계 상자를 적용하는 단계와, 경계 상자 내에서 각 반려 동물의 종류 별 확률 값을 계산하는 단계와, 특정 동물 종에 대하여 계산된 확률 값이 기준치 이상인 경우 경계 상자가 포함되도록 제1 특징 영역을 구성하는 단계를 포함할 수 있다.
앞서 설명한 바와 같이, 전처리기에 따라 정규화된 입력 영상은 인공 신경망에 의하여 계층적으로 제1 특징 영상부터 제n 특징 영상을 구성하게 된다. 이 때 각 계층마다 특징 영상을 추출하는 방법은 인공 신경망의 학습 단계에서 기계적으로 학습될 수 있다.
이렇게 추출된 계층적 특징 영상은, 각 계층마다 대응되는 사전 정의된 경계 상자(Priori Box) 목록과 결합되어 경계 상자와 개체 종류, 그리고 신뢰도 값(확률 값) 목록을 생성하고, 결과적으로 표 1과 같은 형식으로 출력될 수 있다.
이후, 특정 경계 상자에서 특정 동물 종류의 확률 값이 기준치 이상인 경우 해당 경계 상자가 제1 특징 영역에 포함될 수 있도록 제1 특징 영역을 설정한다.
한편, 앞서 설명한 것과 같이 반려 동물의 얼굴 영역(제1 특징 영역)을 결정하기 위한 과정은 높은 해상도가 요구되지 않기 때문에 상대적으로 낮은 해상도에서 수행될 수 있다. 즉, 원본 영상에 대한 제1 전처리를 적용하는 단계는 원본 영상을 원본 해상도보다 낮은 제1 해상도의 영상으로 변환하는 단계와, 제1 해상도로 변환된 영상에 대하여 제1 전처리를 적용하는 단계를 포함할 수 있다.
한편, 반려 동물의 종을 식별하기 위한 제1 특징 영역이 설정되면, 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값이 추출된다. 이는 획득된 영상으로부터 추출된 강아지의 비문 이미지가 이후 학습 또는 식별에 사용되는 데이터로서 적합한지 여부를 먼저 판단하기 위함이다.
즉, 제1 특징 값이 기준치보다 큰 경우 반려 동물을 식별하기 위한 객체 검출이 수행되고, 상기 제1 특징 값이 기준치보다 작은 경우 추가적인 처리가 수행되지 않고 다른 영상에 대한 처리가 수행된다. 제1 특징 값은 실시예마다 다양할 수 있으며, 예를 들어 처리되는 영상의 밝기 정보가 사용될 수 있다.
S730 단계에서, 반려 동물을 식별하기 위한 객체의 검출이 수행된다. 반려 동물을 식별하기 위한 객체로서, 눈, 코, 입, 귀 등 다양한 부위가 사용될 수 있으나, 대표적으로 비문을 사용하기 위한 코를 중심으로 설명하도록 한다. 본 단계는 앞서 수행한 반려 동물의 종을 고려하여 수행된다. 반려 동물이 강아지인 경우 강아지에 최적화된 식별을 위한 객체 검출이 수행될 수 있다. 최적화된 객체 검출은 동물의 종류별로 상이할 수 있다. 나아가, 촬영된 영상에 포함된 반려 동물이 여러 종류인 경우 각 동물마다 식별을 위한 객체 검출이 수행될 수 있다.
반려 동물의 식별을 위한 객체를 검출하는 단계는, 반려 동물의 종을 식별하기 위한 제1 특징 영역에 대한 제2 전처리를 적용하는 단계와, 제2 전처리된 제1 특징 영역에서 반려 동물의 종에 기초하여 상기 반려 동물의 식별을 위한 제2 특징 영역을 설정하는 단계와, 상기 제2 특징 영역에 대한 제2 후처리를 적용하는 단계를 포함할 수 있다.
반려 동물의 식별을 위한 객체를 검출하기 위한 제2 전처리는 제1 전처리와 유사하게 영상의 사이즈 등을 조절하는 과정이다. 제1 특징 영역에 대한 제2 전처리는 상기 제1 전처리가 적용되는 제1 해상도 보다 높은 제2 해상도에서 수행될 수 있다. 이는 동물의 종류를 결정하는 과정과 달리 반려 동물의 식별을 위한 객체(예: 코)를 검출하고 식별용 데이터(비문 이미지)를 검사하는 과정은 상대적으로 높은 품질의 이미지가 요구되기 때문이다. 이후, 전처리된 영상에 대하여 반려 동물의 식별을 위한 객체로서 제2 특징 영역이 설정된다
제2 특징 영역을 설정하는 단계는 반려 동물의 종에 따라 제1 특징 영역(예: 얼굴 영역)에서 반려 동물의 식별을 위한 객체(예: 코)가 위치하는 확률에 기초하여 제2 특징 영역(예: 코 영역)을 설정하는 단계를 포함한다. 앞서 S720 단계에서 반려 동물의 종이 결정되면, 해당 종에 따라 최적화된 개별 특징 영역 검출기 및 파라미터가 선택되고, 선택된 검출기 및 파라미터를 사용하여 보다 낮은 연산 복잡도로 해당 반려 동물의 식별용 객체(예: 코 영역)를 검출할 수 있다.
제2 특징 영역으로 검출된 반려 동물의 식별용 객체의 이미지가 이후 학습 또는 식별에 사용되기에 적합한지 여부를 검사하기 위한 후처리가 수행될 수 있다. 후처리에 대한 결과로서 해당 이미지의 적합도를 나타내는 제2 특징 값으로서 도출될 수 있다. 제2 특징 값이 기준치보다 큰 경우 상기 제2 특징 영역을 포함하는 이미지가 서버로 전송된다.
도 13은 본 발명에 따른 전자 장치(1300)의 블록도이다. 본 발명에 따른 전자 장치(1300)는, 카메라(1310), 프로세서(1320), 통신 모듈(1330), 메모리(1340), 디스플레이(1350)를 포함할 수 있다.
카메라(1310)는 렌즈와 같은 광학 모듈과 입력된 광으로부터 영상 신호를 생성하는 CCD(charge-coupled device) 또는 CMOS(complementary metal-oxide semiconductor)를 포함할 수 있으며, 영상 촬영을 통해 영상 데이터를 생성하여 프로세서(1320)로 제공할 수 있다.
프로세서(1320)는 전자 장치(1300)의 각 모듈을 제어하고 영상 처리를 위해 필요한 연산을 수행한다. 프로세서(1320)는 그 기능에 따라 복수개의 마이크로프로세서(프로세싱 회로)로 구성될 수 있다. 프로세서(1320)는 앞서 설명한 바와 같이 반려 동물(예: 강아지)의 식별을 위한 객체(예: 코)를 검출하고 해당 객체에 대한 이미지의 유효성 판단을 수행할 수 있다.
통신 모듈(1330)은 유/무선 네트워크를 통해 외부의 개체(entity)와 데이터를 송신 또는 수신할 수 있다. 특히, 통신 모듈(1330)은 학습 또는 식별을 서버와의 통신을 통해 인공 지능 기반의 처리를 위한 데이터를 교환할 수 있다.
추가적으로, 전자 장치(1300)는 영상 데이터 및 영상 처리를 위하여 필요한 정보를 저장하는 메모리(1340)와 사용자에게 화면을 출력하는 디스플레이(1350)를 포함하여 용도에 따라 다양한 모듈들을 포함할 수 있다.
본 발명에 따른 전자 장치(1300)는, 반려 동물이 포함된 원본 영상을 생성하는 카메라(1310)와, 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 상기 반려 동물의 종(種)을 결정하고, 결정된 반려 동물의 종에 기초하여 제1 특징 영역 내에서 반려 동물의 식별을 위한 객체를 검출하는 프로세서(1320)와, 반려 동물의 식별을 위한 객체가 유효한 경우 상기 객체의 이미지를 서버로 전송하는 통신 모듈(1330)을 포함한다.
본 발명에 따르면, 프로세서(1320)는, 원본 영상에 대한 제1 전처리를 적용하고, 전처리된 영상에서 반려 동물의 종을 결정하여 제1 특징 영역을 설정하고, 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값을 추출할 수 있다.
본 발명에 따르면, 프로세서(1320)는, 학습용 신경망을 사용하여 상기 전처리된 영상으로부터 복수개의 특징 영상을 생성하고, 상기 복수개의 특징 영상에 각각에 대하여 사전에 정의된 경계 상자를 적용하고, 상기 경계 상자 내에서 각 반려 동물의 종류 별 확률 값을 계산하고, 특정 동물 종에 대하여 상기 계산된 확률 값이 기준치 이상인 경우 경계 상자가 포함되도록 제1 특징 영역을 구성할 수 있다.
본 발명에 따르면, 제1 특징 값이 기준치보다 큰 경우 반려 동물을 식별하기 위한 객체 검출이 수행되고, 제1 특징 값이 기준치보다 작은 경우 추가적인 처리가 생략될 수 있다.
본 발명에 따르면, 프로세서(1320)는, 원본 영상을 원본 해상도보다 낮은 제1 해상도의 영상으로 변환하고, 제1 해상도로 변환된 영상에 대하여 제1 전처리를 적용할 수 있다.
본 발명에 따르면, 프로세서(1320)는, 반려 동물의 종을 식별하기 위한 제1 특징 영역에 대한 제2 전처리를 적용하고, 제2 전처리된 제1 특징 영역에서 반려 동물의 종에 기초하여 반려 동물의 식별을 위한 제2 특징 영역을 설정하고, 제2 특징 영역에 대한 제2 후처리를 적용하여 제2 특징 값을 추출할 수 있다.
본 발명에 따르면, 제1 특징 영역에 대한 제2 전처리는 제1 특징 영역의 설정을 위한 제1 전처리가 적용되는 제1 해상도 보다 높은 제2 해상도에서 수행될 수 있다.
본 발명에 따르면, 프로세서(1320)는 반려 동물의 종에 따라 제1 특징 영역에서 반려 동물의 식별을 위한 객체가 위치하는 확률에 기초하여 제2 특징 영역을 설정할 수 있다.
본 발명에 따르면, 제2 특징 값이 기준치보다 큰 경우 제2 특징 영역을 포함하는 이미지가 서버로 전송될 수 있다.
본 발명에 따르면, 프로세서(1320)는, 영상에서 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하고, 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 생성할 수 있다.
도 9는 반려 동물의 식별을 위한 객체의 이미지를 처리하기 위한 방법의 흐름도이다.
본 발명에 따른 반려 동물의 식별을 위한 객체의 이미지를 처리하기 위한 방법은, 반려 동물이 포함된 영상을 획득하는 단계(S910)와, 영상에서 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하는 단계(S920)와, 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 설정하는 단계(S930)와, 제1 특징 영역에서 반려 동물을 식별하기 위한 객체를 포함하는 제2 특징 영역을 설정하는 단계(S940)와, 제2 특징 영역에서 상기 객체의 이미지를 획득하는 단계(S950)를 포함한다.
본 발명에 따르면, 특징 영역 후보들을 생성하는 단계는 인공 신경망을 사용하여 계층적으로 특징 영상들을 생성하는 단계와, 특징 영상들 각각에 대하여 미리 정의된 경계 영역들을 적용하여 각 경계 영역들에서 특정 종의 반려 동물이 위치할 확률 값을 계산하는 단계와, 확률 값을 고려하여 특징 영역 후보들을 생성하는 단계를 포함할 수 있다.
전처리기에 따라 정규화된 입력 영상은 인공 신경망에 의해 계층적으로 제1 특징 영상부터 제n 특징 영상이 생성되며, 각 계층마다 특징 영상을 추출하는 방법은 인공 신경망의 학습 단계에서 기계적으로 학습될 수 있다.
추출된 계층적 특징 영상은 각 계층마다 대응되는 사전 정의된 경계 영역(경계 상자)의 목록과 결합되어 경계 영역 마다 특정 동물 종류이 위치할 확률 값의 목록이 표 1과 같이 생성된다. 여기서 특정 동물 종류인지 여부가 판단이 안되는 경우 "배경"으로 정의될 수 있다.
이후 본 발명에 따른 확장형 NMS를 적용하여 각 특징 영상에서 반려 동물의 얼굴과 같이 종의 식별을 위한 제1 특징 영역의 후보들(특징 영역 후보들)이 생성된다. 각 특징 영역 후보들은 앞서 도출된 특정 동물 종별 확률 값을 사용하여 도출될 수 있다.
본 발명에 따르면, 특징 영역 후보들을 생성하는 단계는, 특징 영상에서 특정 동물 종에 해당할 확률이 가장 높은 제1 경계 영역을 선택하는 단계와, 특징 영상에서 선택된 제1 경계 영역을 제외한 나머지 경계 영역들에 대하여, 확률 값의 순서에 따라 상기 제1 경계 영역과의 중첩도를 계산하고 상기 중첩도가 기준 중첩도보다 큰 경계 영역을 특징 영상의 특징 영역 후보에 포함시키는 단계를 포함할 수 있다. 이 때 중첩도 평가를 위하여, 예를 들어 두 경계 영역 사이의 교집합 대 합집합 면적비를 사용할 수 있다.
즉, 하기의 절차를 통해 도 8의 (a)와 같은 특징 영역 후보가 생성될 수 있다.
1. 배경을 제외한 각각의 종에 대하여 각각 다음 과정을 수행한다.
A. 경계 상자 목록에서, 해당 종일 확률이 특정 문턱 값 보다 낮은 상자를 제외한다. 남은 상자가 없다면 결과 없음으로 종료한다.
B. 상기 경계 상자 목록에서, 해당 종일 확률이 가장 높은 상자를 제1 상자(제1 경계 영역)로 지정하고 경계 상자 목록에서 제외한다.
C. 나머지 경계 상자 목록에 대하여, 확률이 높은 순서에 따라 각각 다음 과정을 수행한다.
i. 제1 상자와의 중첩도를 연산한다. 예를 들면 교집합 대 합집합 면적 비(Intersection over Union)를 사용할 수 있다.
ii. 상기 중첩도 값이 특정 문턱 값보다 높다면, 이 상자는 제1 상자와 중첩되는 상자이다. 제1 상자와 병합한다.
D. 제1 상자를 결과 상자 목록에 추가한다.
E. 경계 상자 목록에 상자가 남아 있다면, 남은 상자를 대상으로 다시 C 단계부터 반복한다.
두 상자 A와 B에 대하여, 예를 들어 교집합 대 합집합 면적비는 앞서 설명한 수학식 1과 같이 효과적으로 연산할 수 있다.
도 8을 참조하여 설명한 바와 같이 본 발명에 따라 도출된 각각의 특징 영역 후보들로부터 각 특징 영역 후보의 신뢰도 값에 기반하여 제1 특징 영역(예: 반려 동물의 얼굴 영역)이 도출될 수 있다.
본 발명에 따르면, 제1 특징 영역이 위치하는 중심점(C(x,y) n)은 수학식 2와 같이 특징 영역 후보의 중심점들(C(x,y) 1, C(x,y) 2)에 대한 신뢰도 값(p1, p2)의 가중 합에 의해 결정될 수 있다.
본 발명에 따르면, 제1 특징 영역의 너비(Wn )는 수학식 2와 같이 특징 영역 후보들의 너비들(W1, W2)에 대한 신뢰도 값(p1, p2)의 가중 합에 의해 결정되고, 제1 특징 영역의 높이(Hn)는 특징 영역 후보들의 높이들(H1, H2)에 대한 신뢰도 값(p1, p2)의 가중 합에 의해 결정될 수 있다.
본 발명은 복수개의 박스들(특징 영역 후보들)에 대하여 신뢰도 값에 기반한 가중 평균을 적용하여 너비와 높이가 큰 하나의 박스를 제1 특징 영역(반려 동물의 얼굴 영역)으로 설정하고, 제1 특징 영역 내에서 반려 동물의 식별을 위한 제2 특징 영역(코 영역)을 검출할 수 있다. 본 발명과 같이 보다 확장된 제1 특징 영역을 설정함으로써 이후 수행되는 제2 특징 영역이 검출되지 않는 오류의 발생을 감소시킬 수 있다.
이후 제1 특징 영역(예: 강아지의 얼굴 영역) 내에서 반려 동물의 식별을 위한 제2 특징 영역(예: 코 영역)에 대한 검출이 수행된다. 본 단계는 앞서 수행한 반려 동물의 종을 고려하여 수행된다. 반려 동물이 강아지인 경우 강아지에 최적화된 식별을 위한 객체 검출이 수행될 수 있다. 최적화된 객체 검출은 동물의 종류별로 상이할 수 있다.
제2 특징 영역을 설정하는 단계는 반려 동물의 종에 따라 제1 특징 영역(예: 얼굴 영역)에서 반려 동물의 식별을 위한 객체(예: 코)가 위치하는 확률에 기초하여 제2 특징 영역(예: 코 영역)을 설정하는 단계를 포함한다.
또한, 제2 특징 영역으로 검출된 반려 동물의 식별용 객체의 이미지가 이후 학습 또는 식별에 사용되기에 적합한지 여부를 검사하기 위한 후처리가 수행될 수 있다. 후처리에 대한 결과로서 해당 이미지의 적합도를 나타내는 제2 특징 값으로서 도출될 수 있다. 제2 특징 값이 기준치보다 큰 경우 상기 제2 특징 영역을 포함하는 이미지가 서버로 전송되고, 상기 제2 특징 값이 기준치보다 작은 경우 상기 제2 특징 영역을 포함하는 이미지는 버려진다.
본 발명에 따른 전자 장치(1300)는, 반려 동물이 포함된 영상을 생성하는 카메라(1310)와, 카메라(1320)로부터 제공된 영상을 처리하여 반려 동물의 식별을 위한 객체의 이미지를 생성하는 프로세서(1330)를 포함한다. 프로세서(1330)는 영상에서 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하고, 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 설정하고, 상기 제1 특징 영역에서 상기 반려 동물을 식별하기 위한 객체를 포함하는 제2 특징 영역을 설정하고, 상기 제2 특징 영역에서 상기 객체의 이미지를 획득할 수 있다.
본 발명에 따르면, 프로세서(1320)는 인공 신경망을 사용하여 계층적으로 상기 영상을 복수개의 특징 영상들을 생성하고, 상기 특징 영상들 각각에 대하여 미리 정의된 경계 영역들을 적용하여 각 경계 영역들에서 특정 종의 반려 동물이 위치할 확률 값을 계산하고, 상기 확률 값을 고려하여 상기 특징 영역 후보들을 생성할 수 있다.
본 발명에 따르면, 프로세서(1320)는 상기 특징 영상에서 특정 동물 종에 해당할 확률이 가장 높은 제1 경계 영역을 선택하고, 상기 특징 영상에서 상기 선택된 경계 영역을 제외한 나머지 경계 영역들에 대하여, 상기 확률 값의 순서에 따라 상기 제1 경계 영역과의 중첩도를 계산하고 상기 중첩도가 기준 중첩도보다 큰 경계 영역을 상기 특징 영상의 특징 영역 후보에 포함시킬 수 있다. 이때 중첩도를 계산하기 위하여 두 경계 영역 사이의 교집합 대 합집합 면적비가 사용될 수 있다.
본 발명에 따르면, 제1 특징 영역이 위치하는 중심점은 특징 영역 후보의 중심점들에 대한 신뢰도 값의 가중 합에 의해 결정될 수 있다.
본 발명에 따르면, 제1 특징 영역의 너비는 특징 영역 후보들의 너비들에 대한 신뢰도 값의 가중 합에 의해 결정되고, 제1 특징 영역의 높이는 상기 특징 영역 후보들의 높이들에 대한 신뢰도 값의 가중 합에 의해 결정될 수 있다.
본 발명에 따르면, 프로세서(1320)는, 다음 영상에서 객체의 변경된 위치를 검출하고, 다음 영상에서 위치가 변경된 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하고, 변경된 위치로 초점을 설정한 상태에서 다음 촬영을 수행하도록 카메라(1310)를 제어할 수 있다.
본 발명에 따르면, 프로세서(1320)는 영상에서 반려 동물의 종(種)을 결정하기 위한 제1 특징 영역을 설정하고, 제1 특징 영역 내에서 반려 동물의 식별을 위한 객체를 포함하는 제2 특징 영역을 설정할 수 있다.
본 발명에 따르면, 프로세서(1320)는 반려 동물의 식별을 위한 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단할 수 있다.
본 발명에 따르면, 프로세서(1320)는 객체의 이미지의 품질이 기준 조건을 만족하는지 여부를 판단하고, 품질이 기준 조건을 만족하는 경우 객체의 이미지를 서버로 전송하고, 품질이 기준 조건을 만족하지 않는 경우 객체의 이미지를 버리고 다음 영상에 대한 촬영을 수행하도록 카메라(1310)를 제어할 수 있다.
앞서 설명한 과정을 통해 도출된 객체의 이미지(예: 비문 이미지)에 대하여, 인공 지능 기반의 학습 또는 식별에 적합한지 여부가 검사된다. 이미지의 품질 검사는 다양한 품질 조건에 의해 수행될 수 있는데, 이는 신경망 설계자에 의해 정의될 수 있다. 예를 들어, 실제 강아지의 사진일 것, 비문이 선명하게 찍힐것, 이물질이 없을 것, 정면에서 찍힌 이미지일 것, 주변 여백이 일정 비율 이하일 것 등이 조건으로 포함될 수 있다. 이러한 조건은 수치화, 객관화가 가능함이 바람직할 것이다. 품질이 떨어지는 이미지가 신경망에 저장될 경우 전반적인 신경망의 성능 하락을 초래할 수 있으므로 기준 이하의 품질을 갖는 이미지는 사전에 필터링함이 바람직할 것이다. 이러한 필터링 처리는 앞서 설명한 제1 후처리 단계 또는 제2 후처리 단계에서 수행될 수 있다.
객체의 이미지에 대한 품질을 검사하기 위한 실시예로서, 크게 초점의 어긋남으로 인한 품질 저하와 카메라 또는 객체의 흔들림으로 인한 품질 저하를 검출하는 방안에 대하여 설명한다.
본 발명에 따른 반려 동물의 식별을 위한 객체의 이미지를 필터링하기 위한 방법은, 반려 동물이 포함된 영상을 획득하는 단계(S1210)와, 영상에서 반려 동물의 종을 결정하고 제1 특징 영역을 설정하는 단계(S1220)와, 결정된 반려 동물의 종을 고려하여 제1 특징 영역 내에서 반려 동물을 식별하기 위한 객체를 포함하는 제2 특징 영역을 설정하는 단계(S1230)와, 제2 특징 영역에서 객체의 이미지에 대한 품질을 검사하여 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계(S1240)를 포함한다.
또한, 본 발명에 따르면, 제1 특징 영역에 대한 후처리(품질 검사)를 수행하여 제1 특징 영역의 이미지가 적합한 품질을 가지는 경우에 한하여 제2 특징 영역 검출 및 적합성 판단이 수행될 수 있다. 즉, 제1 특징 영역을 설정하는 단계는 제1 특징 영역에서 상기 객체의 이미지에 대한 품질을 검사하여 상기 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계를 포함하고, 제2 특징 영역은 제1 특징 영역에서 상기 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한 것으로 판단되는 경우 설정될 수 있다. 제1 특징 영역에서 상기 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합하지 않은 것으로 판단되면, 현재 프레임의 이미지를 버리고 다음 프레임의 이미지를 촬영할 수 있다.
제1 특징 영역에 대한 품질 검사(제1 후처리)는 실시예에 따라 생략될 수도 있다. 즉, 제1 후처리 과정이 생략되고 곧바로 제2 특징 영역 검출이 수행될 수 있다.
객체의 이미지에 대한 품질 검사는 제1 특징 영역 또는 제2 특징 영역의 위치 별로 상이한 가중치를 적용함으로써 수행될 수 있다.
제1 후처리 단계에서 객체의 이미지 품질 검사를 위한 방법으로 전술한 밝기 평가를 수행할 수 있다. 예를 들어 제1 특징 영역에 대해 전술한 수학식 2의 연산을 수행하여 BT.601 표준에 따른 밝기값과 HSV 색공간에서의 명도(Value) 정보를 픽셀 단위로 추출하고, 그 평균값이 제1 밝기 기준값보다 작은 경우 영상이 너무 어두운 것으로 판단하며, 제2 밝기 기준값보다 큰 경우 영상이 너무 밝은 것으로 판단하며, 영상이 너무 어둡거나 너무 밝은 경우 제2 특징 영역 검출 등 후속 단계를 생략하고 처리를 종료할 수 있다. 또한 제1 특징 영역 중 중요하다고 판단되는 영역에 가중치를 부여하여 판단할 수 있다.
본 발명에 따르면 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계는 객체의 이미지에서 객체에 대한 초점 어긋남 정도(Defocus blur)를 판단하는 단계를 포함할 수 있다.
초점의 어긋남으로 인한 품질 저하(Defocus blur)를 검출하기 위한 방법은 다음과 같다. Defocus blur는 카메라의 초점이 맞지 않아서, 목적한 영역(예: 비문 영역)이 흐려지는 현상을 의미한다. Defocus blur가 발생하는 경우로서, 휴대폰 카메라에서 자동 초점 조절이 수행되는 동안 취득된 사진 등을 들 수 있다.
Defocus blur가 발생한 이미지를 판별하기 위하여, 영상에서 고주파 성분(특정 값보다 큰 주파수를 갖는 성분)을 추출하여 처리할 수 있다. 영상에 대해서 고주파 성분은 밝기 및 색상이 급격하게 변화하는 지점, 즉 영상 내의 물체 경계선에 주로 위치하며, 저주파 성분은 주변과 유사한 밝기 및 색상을 갖는 지점에 주로 위치한다. 따라서 초점이 잘 맞아 선명한 이미지일수록 영상 내에 고주파 성분이 강하게 분포한다. 이를 판단하기 위하여, 예를 들면 라플라시안 연산자(Laplacian operator)를 활용할 수 있다. 라플라시안 연산자는 입력 신호에 2계도 미분을 수행하며, 입력 신호의 고주파 성분을 남기고 저주파 성분을 효과적으로 제거할 수 있다. 따라서 라플라시안 연산자를 사용하면 효과적으로 영상 내의 물체 경계선을 찾을 수 있으며, 또한 경계선이 얼마나 선명한지를 수치로 얻을 수 있다.
예를 들어 아래의 수학식 4와 같은 5x5 LoG(Laplacian of Gaussian) 커널을 입력 사진에 컨볼루션(Convolution) 연산을 적용함으로써 영상 내의 경계선 위치와 경계선의 선명도 정보를 얻을 수 있다.
Figure PCTKR2022009095-appb-img-000006
Defocus blur가 적고 경계선이 선명한 사진은 라플라시안 연산자를 적용한 결과값이 0에서 상대적으로 큰 값의 범위까지 분포할 것이며, 반대로 Defocus blur가 커서 경계선이 흐리게 촬영된 사진은 라플라시안 연산자를 적용한 결과값이 0에서 상대적으로 작은 값의 범위에서 분포할 것이다. 따라서 라플라시안 연산자를 적용한 결과값의 분포를 모델링 함으로써 선명도를 파악할 수 있다.
이러한 방법의 일 예로, 라플라시안 연산자를 적용한 결과 이미지의 분산값을 이용하여 선명도를 파악할 수 있다. 또는 분포도(Histogram) 분석을 통하여, Laplacian 값 분포의 10분위 분포도를 구하고, 최고-최저구간의 분포 비율을 연산하는 등 다양한 통계적 기법을 동원할 수 있다. 이러한 방법은 사용하고자 하는 응용 분야에 따라 선택적으로 적용할 수 있다.
즉 본 발명에 따르면, 객체에 대한 초점 어긋남 정도를 판단하는 단계는, 제2 특징 영역의 이미지에 2계도 미분을 수행하는 라플라시안 연산자(Laplacian operator)를 적용하여 고주파 성분의 분포도를 나타내는 이미지를 추출하는 단계와, 고주파 성분의 분포도로부터 제2 특징 영역의 이미지의 초점 어긋남을 나타내는 값을 계산하는 단계를 포함할 수 있다.
코 영역에서도 위치에 따라 선명도의 중요한 정도에 차이가 발생한다. 즉, 영상 중앙부인 경우 코의 중앙부일 확률이 높고, 영상 가장자리로 이동할수록 코의 외각 부이거나, 또는 코 주변의 털 영역일 가능성이 증가한다. 이러한 공간적 특성을 반영하기 위하여, 영상을 일정 영역으로 분할하고 각각의 영역마다 가중치를 다르게 부여하여 선명도를 판정하는 방법을 고려할 수 있다. 예를 들어, 상기 영상을 9분할하거나, 영상 중앙을 기준으로 타원을 그리는 등 관심 영역을 설정한 뒤, 해당 영역에 1보다 큰 w의 가중치를 곱하는 등의 방법을 고려할 수 있다.
즉 본 발명에 따르면, 제2 특징 영역의 중심부에 적용되는 가중치는 제2 특징 영역의 주변부에 적용되는 가중치 보다 크도록 설정될 수 있다. 중심부에 주변부보다 더 큰 가중치를 적용함으로써 강아지의 비문과 같은 식별용 객체에 대해 집중적으로 이미지 품질 검사가 수행될 수 있다.
이렇게 라플라시안 연산자를 이용하여 판별한 Defocus blur 점수는, 0에 가까울수록 영상에 경계선이 희미하게 존재하며, 그 값이 클수록 영상에 경계선이 강하게 존재함을 의미한다. 따라서 Defocus blur 점수가 문턱값(threshold value)보다 큰 경우 선명한 이미지로 분류하고, 그렇지 않다면 흐린 이미지로 판단할 수 있다. 이러한 문턱값은 사전에 수집한 이용하여 경험적으로 결정하거나, 또는 카메라에서 매번 여러 장의 입력 영상을 누적하여 관찰함으로써 적응적으로 결정할 수 있다.
본 발명에 따르면, 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계는 상기 객체의 이미지에서 상기 객체의 흔들림 정도를 판단하는 단계를 포함할 수 있다.
이하, 흔들림으로 인한 품질 저하(motion blur)를 검출하는 방안에 대해 설명한다. Motion blur는 카메라의 노출 시간동안 촬영 대상과 카메라의 상대적인 위치가 흔들리면서, 목적한 영역이 흔들린 것처럼 촬영되는 현상을 말한다. 이러한 사진이 취득되는 경우로, 광량이 낮은 환경에서 휴대폰 카메라의 노출 시간 설정을 길게 설정하여 촬영하는 경우, 한 장의 사진을 촬영하는 노출 시간 동안 강아지가 움직이거나 또는 사용자의 손떨림으로 인해 발생할 수 있다.
이러한 이미지의 특징 분석을 위하여 다양한 경계선 검출기(edge detector)를 사용할 수 있다. 예를 들어 캐니 경계선(Canny edge) 검출기의 경우, 연속적으로 이어진 경계선을 효율적으로 검출하는 경계선 검출기로 알려져 있다.
도 10의 위쪽 대각선 방향으로 흔들림이 발생한 이미지에 Canny edge 검출기를 적용하여 결과 이미지의 예이다. 도 10에 나타난 것과 같이 이미지에 Canny edge 검출기를 적용한 결과. 비문 영역의 경계선이 대각선(/) 방향으로 일관되게 발생함이 확인된다.
해당 경계선의 방향성을 분석함으로써 흔들림 여부를 효과적으로 판단할 수 있다. 방향성 분석 방법의 일 예를 들어 설명하면, Canny edge 검출기에서 검출된 경계선은 항상 주변 픽셀과 연결되어 있다는 특징이 있다. 따라서 주변 픽셀과의 연결관계를 분석함으로써 방향성을 분석할 수 있다. 본 발명의 일 실시예에 따르면, Canny edge 검출기가 적용된 이미지에서 경계선이 위치한 일정 크기의 픽셀 블록에서의 패턴 분포를 분석함으로써 전체적인 흔들림 방향과 정도가 계산될 수 있다.
도 11은 캐니 경계선 검출기를 적용한 결과 이미지에서 흔들림 여부를 판단하기 위하여 사용되는 경계선이 위치한 픽셀 블록의 패턴 형태의 예를 도시한다.
예를 들어, 도 11의 (a)와 같이 3x3 픽셀이 경계선으로 검출된 경우를 예시로 들어 상세히 설명하면 다음과 같다. 편리한 설명을 위해, 도 11과 같이 9개의 픽셀을 위치에 따라 각각 번호를 지정하여 설명한다.
중앙 5번 픽셀의 경우, 항상 경계선으로 판명된다고 가정할 수 있다. 5번 픽셀이 경계선이 아닌 경우 이 3x3 픽셀 배열은 경계선 배열이 아니므로 처리를 건너 뛰거나, 또는 경계선 아닌 픽셀로 집계할 수 있다.
중앙 5번 픽셀이 경계선 픽셀인 경우, 나머지 주변 8개 픽셀이 경계선인지 아닌지를 기준으로 하여 총 28=256개의 패턴을 정의할 수 있다. 예를 들어 도 11의 (a)의 경우, {1, 2, 3, 4, 6, 7, 8, 9}번 픽셀의 경계선 여부를 바탕으로 (01000100) 패턴이며, 이를 10진법으로 환산하여 68번째 패턴이라 명명할 수 있다. 이러한 명명 방법은 구현 상황에 용이하도록 변경될 수 있다.
이렇게 패턴이 정의되면, 패턴의 배치에 따라서 경계선의 시작점과 끝점, 그리고 방향을 정의할 수 있다. 예를 들어 상기 68번째 패턴은, 경계가 좌하단(7번)에서 시작하여 상단(2번)에서 끝난다고 정의할 수 있다. 이를 바탕으로 해당 패턴은 {대각선 우상단(↗) 방향, 가파른 각도}패턴으로 정의할 수 있다.
같은 방법으로 도 11의 (b)의 패턴을 분석하면 다음과 같다. 해당 패턴은 (01010000) 패턴이며, 이는 80번 패턴으로 명명할 수 있다. 경계는 좌측(4번)에서 시작하여 상단(2번)에서 끝나므로 해당 패턴은 {대각선 우상단(↗) 방향, 중간 각도}패턴으로 정의할 수 있다.
이와 같은 방법으로 256가지 패턴에 대해 찾아보기 표(Lookup Table)을 작성할 수 있다. 이 때 나올 수 있는 조합은 예를 들면 다음과 같이 8가지 방향으로 정의할 수 있다.
세로(↑)
대각선 우상단(↗) {가파른, 중간, 얕은} 각도
가로(→)
대각선 우하단(↘) {얕은, 중간, 가파른} 각도
이러한 방법을 바탕으로 Canny edge 검출기의 결과 영상에서 경계 픽셀의 방향성 통계 정보를 작성할 수 있다. 이러한 통계 정보를 바탕으로 해당 영상이 Motion blur가 발생했는지를 효과적으로 판단할 수 있다. 이러한 판단 기준은 경험적으로 분류 방법을 설계하거나, 또는 기계 학습 방법을 이용하여 다량의 데이터를 바탕으로 판별할 수 있음은 자명하다. 이러한 방법으로는 예를 들면 판단 트리(Decision Tree), 랜덤 포레스트(Random Forest) 등의 방법을 사용하거나, 또는 심층 신경망을 이용한 분류기(Classifier)를 설계할 수 있다.
즉 본 발명에 따르면, 객체의 흔들림 정도를 판단하는 단계는, 도 10과 같이 제2 특징 영역의 이미지에 캐니 경계선(Canny edge) 검출기를 적용하여 객체의 이미지에서 연속적으로 이어진 경계선으로 구성된 경계선 이미지를 구성하는 단계와, 도 10과 같은 경계선 이미지에서 상기 경계선이 포함된 블록들의 방향 패턴의 분포를 분석하는 단계와, 방향 패턴의 분포로부터 객체의 흔들림 정도를 나타내는 값을 계산하는 단계를 포함할 수 있다.
상술한 통계 정보를 작성함에 있어서, 코 영역이 주변 영역보다 더 중요한 정보를 가짐은 자명하다. 따라서 영상 내부의 일정한 영역에서 통계 정보를 별도로 수집하여 가중치를 주는 등의 방법을 사용할 수 있다. 이러한 방법의 일 예로, 전술한 Laplacian operator을 이용한 Defocus blur 판별에서 사용한 방법을 사용할 수 있다. 즉, 방향 패턴의 분포로부터 객체의 흔들림 정도를 나타내는 값을 계산하는 단계는 제2 특징 영역의 블록 별로 가중치를 적용하여 방향 패턴의 분포 정도를 계산하는 단계를 포함하고, 제2 특징 영역의 중심부에 위치한 블록의 가중치는 상기 제2 특징 영역의 주변부에 위치한 블록의 가중치 보다 크도록 설정될 수 있다.
도 12는 반려 동물의 식별을 위한 객체의 이미지를 필터링하기 위한 방법의 흐름도이다. 본 발명에 따른 반려 동물의 식별을 위한 객체의 이미지를 필터링하기 위한 방법은, 반려 동물이 포함된 영상을 획득하는 단계(S1210)와, 영상에서 반려 동물의 종을 결정하고 제1 특징 영역을 설정하는 단계(S1220)와, 결정된 반려 동물의 종을 고려하여 제1 특징 영역 내에서 반려 동물을 식별하기 위한 객체를 포함하는 제2 특징 영역을 설정하는 단계(S1230)와, 제2 특징 영역에서 객체의 이미지에 대한 품질을 검사하여 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계(S1240)를 포함한다. 객체의 이미지에 대한 품질 검사는 제1 특징 영역 또는 제2 특징 영역의 위치 별로 상이한 가중치를 적용함으로써 수행될 수 있다.
한편, 제1 특징 영역을 설정하는 단계(S1220) 이후에 제1 특징 영역에서 객체의 이미지에 대한 품질을 검사하여 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계(S1230)가 수행될 수 있다. 이때 제2 특징 영역은 상기 제1 특징 영역에서 상기 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한 것으로 판단되는 경우 설정될 수 있다. 제1 특징 영역에 대한 품질 검사(제1 후처리)는 실시예에 따라 생략될 수도 있다.
제1 특징 영역에서 상기 객체의 이미지에 대한 품질을 검사하여 상기 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계는 제1 특징 영역에서의 밝기가 기준 범위에 속하는지 여부를 판단하는 단계를 포함할 수 있다. 본 단계는 제1 특징 영역에서 BT.601 표준에 따른 Luma 정보와 HSV 색공간의 명도 정보를 추출하고, 그 평균값이 제1 문턱값과 제2 문턱값 사이에 있는지 판단하는 단계를 포함할 수 있다. 본 단계에서 평균값을 연산함에 있어 영상 내 위치에 따라 가중치를 다르게 적용할 수 있다.
본 발명에 따르면, 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계는 객체의 이미지에서 객체에 대한 초점 어긋남 정도(Defocus blur)를 판단하는 단계를 포함할 수 있다.
본 발명에 따르면, 객체에 대한 초점 어긋남 정도를 판단하는 단계는, 제2 특징 영역의 이미지에 2계도 미분을 수행하는 라플라시안 연산자(Laplacian operator)를 적용하여 고주파 성분의 분포도를 나타내는 이미지를 추출하는 단계와, 고주파 성분의 분포도로부터 제2 특징 영역의 이미지의 초점 어긋남을 나타내는 값을 계산하는 단계를 포함할 수 있다.
본 발명에 따르면, 제1 특징 영역 또는 제2 특징 영역의 중심부에 적용되는 가중치는 제1 특징 영역 또는 제2 특징 영역의 주변부에 적용되는 가중치 보다 크도록 설정될 수 있다.
본 발명에 따르면, 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하는 단계는 상기 객체의 이미지에서 상기 객체의 흔들림 정도를 판단하는 단계를 포함할 수 있다.
본 발명에 따르면, 객체의 흔들림 정도를 판단하는 단계는, 제2 특징 영역의 이미지에 캐니 경계선(Canny edge) 검출기를 적용하여 객체의 이미지에서 연속적으로 이어진 경계선으로 구성된 경계선 이미지를 구성하는 단계와, 같이 경계선 이미지에서 상기 경계선이 포함된 블록들의 방향 패턴의 분포를 분석하는 단계와, 방향 패턴의 분포로부터 객체의 흔들림 정도를 나타내는 값을 계산하는 단계를 포함할 수 있다.
본 발명에 따르면, 방향 패턴의 분포로부터 객체의 흔들림 정도를 나타내는 값을 계산하는 단계는 제2 특징 영역의 블록 별로 가중치를 적용하여 방향 패턴의 분포 정도를 계산하는 단계를 포함하고, 제2 특징 영역의 중심부에 위치한 블록의 가중치는 상기 제2 특징 영역의 주변부에 위치한 블록의 가중치 보다 크도록 설정될 수 있다.
본 발명에 따른 전자 장치(1300)는, 반려 동물이 포함된 영상을 생성하는 카메라(1310)와, 카메라(1310)로부터 제공된 영상을 처리하여 반려 동물의 식별을 위한 객체의 이미지를 생성하는 프로세서(1320)를 포함한다. 프로세서(1320)는, 영상에서 반려 동물의 종을 결정하기 위한 제1 특징 영역을 설정하고, 결정된 반려 동물의 종을 고려하여 제1 특징 영역 내에서 반려 동물을 식별하기 위한 객체를 포함하는 제2 특징 영역을 설정하고, 제2 특징 영역에서 객체의 이미지에 대한 품질을 검사하여 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단하도록 설정된다.
본 발명에 따르면, 프로세서(1310)는 제1 특징 영역에서 객체의 이미지에 대한 품질을 검사하여 상기 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한지 여부를 판단할 수 있다. 여기서 제2 특징 영역 검출 및 품질 검사는 제1 특징 영역에서 객체의 이미지가 인공 지능 기반의 학습 또는 식별에 적합한 경우에 한하여 수행될 수 있다.
본 발명에 따르면, 프로세서(1310)는 제1 특징 영역에서의 밝기가 기준 범위에 속하는지 여부를 판단할 수 있다. 제1 특징 영역에 대한 품질 검사(제1 후처리)는 실시예에 따라 생략될 수도 있다.
여기서 객체의 이미지에 대한 품질 검사는 제1 특징 영역 또는 제2 특징 영역의 위치 별로 상이한 가중치를 적용함으로써 수행될 수 있다.
본 발명에 따르면, 프로세서(1310)는 상기 객체의 이미지에서 상기 객체에 대한 초점 어긋남 정도를 판단할 수 있다.
본 발명에 따르면, 프로세서(1310)는, 제2 특징 영역의 이미지에서 고주파 성분의 분포도를 나타내는 이미지를 추출하고, 상기 고주파 성분의 분포도로부터 상기 제2 특징 영역의 이미지의 초점 어긋남을 나타내는 값을 계산할 수 있다.
본 발명에 따르면, 제1 특징 영역 또는 제2 특징 영역의 중심부에 적용되는 가중치는 제1 특징 영역 또는 제2 특징 영역의 주변부에 적용되는 가중치 보다 크도록 설정될 수 있다.
본 발명에 따르면, 프로세서(1310)는 객체의 이미지에서 객체의 흔들림 정도를 판단할 수 있다.
본 발명에 따르면, 프로세서(1310)는 제2 특징 영역의 이미지의 경계선으로 구성된 경계선 이미지를 구성하고, 상기 경계선 이미지에서 상기 경계선이 포함된 블록들의 방향 패턴의 분포를 분석하고, 상기 방향 패턴의 분포로부터 상기 객체의 흔들림 정도를 나타내는 값을 계산할 수 있다.
본 발명에 따르면, 프로세서(1310)는 제2 특징 영역의 블록 별로 가중치를 적용하여 방향 패턴의 분포 정도를 계산하고, 제2 특징 영역의 중심부에 위치한 블록의 가중치는 제2 특징 영역의 주변부에 위치한 블록의 가중치 보다 크도록 설정될 수 있다.
본 실시예 및 본 명세서에 첨부된 도면은 본 발명에 포함되는 기술적 사상의 일부를 명확하게 나타내고 있는 것에 불과하며, 본 발명의 명세서 및 도면에 포함된 기술적 사상의 범위 내에서 당업자가 용이하게 유추할 수 있는 변형예와 구체적인 실시예는 모두 본 발명의 권리범위에 포함되는 것이 자명하다고 할 것이다.
따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.

Claims (20)

  1. 반려 동물의 식별을 위한 객체를 검출하기 위한 방법에 있어서,
    상기 반려 동물이 포함된 원본 영상을 획득하는 단계;
    상기 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 상기 반려 동물의 종(種)을 결정하는 단계; 및
    상기 결정된 반려 동물의 종에 기초하여 상기 제1 특징 영역 내에서 상기 반려 동물의 식별을 위한 객체를 검출하는 단계를 포함하는 방법.
  2. 제1항에 있어서,
    상기 반려 동물의 종을 결정하는 단계는,
    상기 원본 영상에 대한 제1 전처리를 적용하는 단계;
    상기 전처리된 영상에서 상기 반려 동물의 종을 결정하고 상기 제1 특징 영역을 설정하는 단계;
    상기 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값을 추출하는 단계를 포함하는 방법.
  3. 제2항에 있어서,
    상기 제1 특징 영역을 설정하는 단계는,
    학습용 신경망을 사용하여 상기 전처리된 영상으로부터 복수개의 특징 영상을 생성하는 단계;
    상기 복수개의 특징 영상에 각각에 대하여 사전에 정의된 경계 상자를 적용하는 단계;
    상기 경계 상자 내에서 각 반려 동물의 종류 별 확률 값을 계산하는 단계; 및
    특정 동물 종에 대하여 상기 계산된 확률 값이 기준치 이상인 경우 상기 경계 상자가 포함되도록 상기 제1 특징 영역을 구성하는 단계를 포함하는 방법.
  4. 제2항에 있어서,
    상기 제1 특징 값이 기준치보다 큰 경우 상기 반려 동물을 식별하기 위한 객체 검출이 수행되고,
    상기 제1 특징 값이 기준치보다 작은 경우 추가적인 처리가 생략되는 방법.
  5. 제2항에 있어서,
    상기 원본 영상에 대한 제1 전처리를 적용하는 단계는,
    상기 원본 영상을 원본 해상도보다 낮은 제1 해상도의 영상으로 변환하는 단계; 및
    상기 제1 해상도로 변환된 영상에 대하여 상기 제1 전처리를 적용하는 단계를 포함하는 방법.
  6. 제1항에 있어서,
    상기 반려 동물의 식별을 위한 객체를 검출하는 단계는,
    상기 반려 동물의 종을 식별하기 위한 제1 특징 영역에 대한 제2 전처리를 적용하는 단계;
    상기 제2 전처리된 제1 특징 영역에서 상기 반려 동물의 종에 기초하여 상기 반려 동물의 식별을 위한 제2 특징 영역을 설정하는 단계; 및
    상기 제2 특징 영역에 대한 제2 후처리를 적용하여 제2 특징 값을 추출하는 단계를 포함하는 방법.
  7. 제6항에 있어서,
    상기 제1 특징 영역에 대한 제2 전처리는 상기 제1 특징 영역의 설정을 위한 제1 전처리가 적용되는 제1 해상도 보다 높은 제2 해상도에서 수행되는 방법.
  8. 제6항에 있어서,
    상기 제2 특징 영역을 설정하는 단계는 상기 반려 동물의 종에 따라 상기 제1 특징 영역에서 상기 반려 동물의 식별을 위한 객체가 위치하는 확률에 기초하여 상기 제2 특징 영역을 설정하는 단계를 포함하는 방법.
  9. 제6항에 있어서,
    상기 제2 특징 값이 기준치보다 큰 경우 상기 제2 특징 영역을 포함하는 이미지가 서버로 전송되는 방법.
  10. 제1항에 있어서,
    상기 제1 특징 영역을 생성하는 단계는,
    상기 영상에서 상기 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하는 단계; 및
    상기 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 생성하는 단계를 포함하는 방법.
  11. 반려 동물의 식별을 위한 객체를 검출하기 위한 전자 장치에 있어서,
    상기 반려 동물이 포함된 원본 영상을 생성하는 카메라;
    상기 원본 영상에 대한 영상 처리를 통해 제1 특징 영역과 상기 반려 동물의 종(種)을 결정하고, 상기 결정된 반려 동물의 종에 기초하여 제1 특징 영역 내에서 상기 반려 동물의 식별을 위한 객체를 검출하는 프로세서; 및
    상기 반려 동물의 식별을 위한 객체가 유효한 경우 상기 객체의 이미지를 서버로 전송하는 통신 모듈을 포함하는 전자 장치.
  12. 제11항에 있어서,
    상기 프로세서는,
    상기 원본 영상에 대한 제1 전처리를 적용하고,
    상기 전처리된 영상에서 상기 반려 동물의 종을 결정하여 상기 제1 특징 영역을 설정하고,
    상기 제1 특징 영역에 대한 제1 후처리를 통해 제1 특징 값을 추출하는 전자 장치.
  13. 제12항에 있어서,
    상기 프로세서는,
    학습용 신경망을 사용하여 상기 전처리된 영상으로부터 복수개의 특징 영상을 생성하고,
    상기 복수개의 특징 영상에 각각에 대하여 사전에 정의된 경계 상자를 적용하고,
    상기 경계 상자 내에서 각 반려 동물의 종류 별 확률 값을 계산하고,
    특정 동물 종에 대하여 상기 계산된 확률 값이 기준치 이상인 경우 상기 경계 상자가 포함되도록 상기 제1 특징 영역을 구성하는 전자 장치.
  14. 제12항에 있어서,
    상기 제1 특징 값이 기준치보다 큰 경우 상기 반려 동물을 식별하기 위한 객체 검출이 수행되고,
    상기 제1 특징 값이 기준치보다 작은 경우 추가적인 처리가 생략되는 전자 장치.
  15. 제12항에 있어서,
    상기 프로세서는,
    상기 원본 영상을 원본 해상도보다 낮은 제1 해상도의 영상으로 변환하고,
    상기 제1 해상도로 변환된 영상에 대하여 상기 제1 전처리를 적용하는 전자 장치.
  16. 제11항에 있어서,
    상기 프로세서는,
    상기 반려 동물의 종을 식별하기 위한 제1 특징 영역에 대한 제2 전처리를 적용하고,
    상기 제2 전처리된 제1 특징 영역에서 상기 반려 동물의 종에 기초하여 상기 반려 동물의 식별을 위한 제2 특징 영역을 설정하고,
    상기 제2 특징 영역에 대한 제2 후처리를 적용하여 제2 특징 값을 추출하는 전자 장치.
  17. 제16항에 있어서,
    상기 제1 특징 영역에 대한 제2 전처리는 상기 제1 특징 영역의 설정을 위한 제1 전처리가 적용되는 제1 해상도 보다 높은 제2 해상도에서 수행되는 전자 장치.
  18. 제16항에 있어서,
    상기 프로세서는 상기 반려 동물의 종에 따라 상기 제1 특징 영역에서 상기 반려 동물의 식별을 위한 객체가 위치하는 확률에 기초하여 상기 제2 특징 영역을 설정하는 전자 장치.
  19. 제16항에 있어서,
    상기 제2 특징 값이 기준치보다 큰 경우 상기 제2 특징 영역을 포함하는 이미지가 상기 서버로 전송되는 전자 장치.
  20. 제11항에 있어서,
    상기 프로세서는,
    상기 영상에서 상기 반려 동물의 종을 결정하기 위한 특징 영역 후보들을 생성하고,
    상기 특징 영역 후보들 각각의 신뢰도 값에 기초하여 위치 및 크기가 결정된 제1 특징 영역을 생성하는 전자 장치.
PCT/KR2022/009095 2021-06-28 2022-06-27 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치 WO2023277473A1 (ko)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CA3218184A CA3218184A1 (en) 2021-06-28 2022-06-27 Method for photographing object for identifying companion animal, and electronic device
AU2022300548A AU2022300548A1 (en) 2021-06-28 2022-06-27 Method for photographing object for identifying companion animal, and electronic device
CN202280034487.8A CN117296083A (zh) 2021-06-28 2022-06-27 用于拍摄用于识别宠物的客体的方法以及电子装置
EP22833529.5A EP4322120A1 (en) 2021-06-28 2022-06-27 Method for photographing object for identifying companion animal, and electronic device
JP2023569731A JP2024518492A (ja) 2021-06-28 2022-06-27 ペットの識別のためのオブジェクトを撮影するための方法及び電子装置

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
KR1020210083841A KR102452192B1 (ko) 2021-06-28 2021-06-28 반려 동물의 식별을 위한 객체의 이미지를 필터링하기 위한 방법 및 장치
KR10-2021-0083754 2021-06-28
KR1020210083753A KR102444928B1 (ko) 2021-06-28 2021-06-28 반려 동물의 식별을 위한 객체를 검출하기 위한 방법 및 장치
KR10-2021-0083841 2021-06-28
KR10-2021-0083753 2021-06-28
KR1020210083754A KR102444929B1 (ko) 2021-06-28 2021-06-28 반려 동물의 식별을 위한 객체의 이미지를 처리하기 위한 방법 및 장치

Publications (1)

Publication Number Publication Date
WO2023277473A1 true WO2023277473A1 (ko) 2023-01-05

Family

ID=84692906

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/009095 WO2023277473A1 (ko) 2021-06-28 2022-06-27 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치

Country Status (5)

Country Link
EP (1) EP4322120A1 (ko)
JP (1) JP2024518492A (ko)
AU (1) AU2022300548A1 (ko)
CA (1) CA3218184A1 (ko)
WO (1) WO2023277473A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160119932A (ko) * 2015-04-06 2016-10-17 한국과학기술원 품질 측정 기반의 얼굴 인식 방법 및 장치
KR20200044209A (ko) * 2018-10-11 2020-04-29 주식회사 핏펫 동물의 안면 및 비문 이미지에 기초하여 동물의 개체 정보를 제공하는 컴퓨터 프로그램 및 단말기
JP2020074174A (ja) * 2015-02-06 2020-05-14 ヴェリディウム アイピー リミテッド モバイル・デバイスを用いてキャプチャしたイメージを使用する指紋ベースのユーザ認証を実行するためのシステムおよび方法
KR20200143193A (ko) * 2019-06-13 2020-12-23 네이버 주식회사 객체인식장치 및 객체인식방법
KR20210006627A (ko) * 2019-07-09 2021-01-19 주식회사 케이티 객체 확인 방법 및 이를 위한 시스템

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020074174A (ja) * 2015-02-06 2020-05-14 ヴェリディウム アイピー リミテッド モバイル・デバイスを用いてキャプチャしたイメージを使用する指紋ベースのユーザ認証を実行するためのシステムおよび方法
KR20160119932A (ko) * 2015-04-06 2016-10-17 한국과학기술원 품질 측정 기반의 얼굴 인식 방법 및 장치
KR20200044209A (ko) * 2018-10-11 2020-04-29 주식회사 핏펫 동물의 안면 및 비문 이미지에 기초하여 동물의 개체 정보를 제공하는 컴퓨터 프로그램 및 단말기
KR20200143193A (ko) * 2019-06-13 2020-12-23 네이버 주식회사 객체인식장치 및 객체인식방법
KR20210006627A (ko) * 2019-07-09 2021-01-19 주식회사 케이티 객체 확인 방법 및 이를 위한 시스템

Also Published As

Publication number Publication date
CA3218184A1 (en) 2023-01-05
EP4322120A1 (en) 2024-02-14
AU2022300548A1 (en) 2023-11-16
JP2024518492A (ja) 2024-05-01

Similar Documents

Publication Publication Date Title
WO2021167394A1 (en) Video processing method, apparatus, electronic device, and readable storage medium
US7362354B2 (en) Method and system for assessing the photo quality of a captured image in a digital still camera
WO2020138745A1 (en) Image processing method, apparatus, electronic device and computer readable storage medium
WO2018016837A1 (en) Method and apparatus for iris recognition
WO2021177758A1 (en) Methods and systems for denoising media using contextual information of the media
US8254630B2 (en) Subject extracting method and device by eliminating a background region using binary masks
WO2016048108A1 (en) Image processing apparatus and image processing method
WO2022114731A1 (ko) 딥러닝 기반 비정상 행동을 탐지하여 인식하는 비정상 행동 탐지 시스템 및 탐지 방법
WO2016163609A2 (ko) Lpr 시스템에서 적응적 확률기반의 저조도 영상개선 및 스미어 복원처리 장치와 그 방법
EP3440593A1 (en) Method and apparatus for iris recognition
WO2022005060A1 (ko) 유해 동영상 파일을 필터링 하기 위한 장치 및 방법
WO2022240030A1 (ko) 반려동물 생애 관리 시스템 및 그 방법
WO2013165048A1 (ko) 영상 검색 시스템 및 영상 분석 서버
WO2018070844A1 (ko) 에지 모델링을 위한 에지 블러 설정 방법
CN114445315A (zh) 图像质量增强方法和电子设备
WO2021006482A1 (en) Apparatus and method for generating image
WO2019045521A1 (ko) 전자 장치 및 그 제어 방법
WO2022092451A1 (ko) 딥러닝을 이용한 실내 위치 측위 방법
WO2023277473A1 (ko) 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치
EP3198557A1 (en) Image processing apparatus and image processing method
WO2022225375A1 (ko) 병렬처리 파이프라인을 이용한 다중 dnn 기반 얼굴 인식 방법 및 장치
EP4189638A1 (en) Method and electronic device for managing artifacts of image
WO2023033333A1 (ko) 복수의 카메라를 포함하는 전자 장치 및 그 동작 방법
JP2001119622A (ja) 撮像装置及びその制御方法
WO2023277472A1 (ko) 반려 동물의 식별을 위한 객체를 촬영하기 위한 방법 및 전자 장치

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: 22833529

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18288809

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2022300548

Country of ref document: AU

Ref document number: AU2022300548

Country of ref document: AU

WWE Wipo information: entry into national phase

Ref document number: 3218184

Country of ref document: CA

WWE Wipo information: entry into national phase

Ref document number: 2022833529

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2023569731

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 202280034487.8

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2022833529

Country of ref document: EP

Effective date: 20231107

ENP Entry into the national phase

Ref document number: 2022300548

Country of ref document: AU

Date of ref document: 20220627

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE