KR20220084931A - Method and apparatus for classifying foreign matter - Google Patents

Method and apparatus for classifying foreign matter Download PDF

Info

Publication number
KR20220084931A
KR20220084931A KR1020200174893A KR20200174893A KR20220084931A KR 20220084931 A KR20220084931 A KR 20220084931A KR 1020200174893 A KR1020200174893 A KR 1020200174893A KR 20200174893 A KR20200174893 A KR 20200174893A KR 20220084931 A KR20220084931 A KR 20220084931A
Authority
KR
South Korea
Prior art keywords
image
foreign material
normal
foreign
real
Prior art date
Application number
KR1020200174893A
Other languages
Korean (ko)
Other versions
KR102451758B1 (en
Inventor
손국진
김영덕
곽동훈
이진서
Original Assignee
재단법인대구경북과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 재단법인대구경북과학기술원 filed Critical 재단법인대구경북과학기술원
Priority to KR1020200174893A priority Critical patent/KR102451758B1/en
Publication of KR20220084931A publication Critical patent/KR20220084931A/en
Application granted granted Critical
Publication of KR102451758B1 publication Critical patent/KR102451758B1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/36Sorting apparatus characterised by the means used for distribution
    • B07C5/361Processing or control devices therefor, e.g. escort memory
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • B07C5/342Sorting according to other particular properties according to optical properties, e.g. colour
    • B07C5/3422Sorting according to other particular properties according to optical properties, e.g. colour using video scanning devices, e.g. TV-cameras
    • 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

Landscapes

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

Abstract

이물질 선별 방법 및 장치가 개시된다. 본 개시의 일 실시 예에 따른 이물질 선별 방법은, 이물질 선별 대상 객체를 촬영한 이미지를 획득하는 단계와, 특정 객체를 정상 또는 비정상으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩하는 단계와, 획득한 대상 객체 이미지에 학습 모델을 적용하여 대상 객체에 대해 정상 또는 비정상 여부를 출력하는 단계와, 학습 모델을 통해 출력된 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시하는 단계를 포함할 수 있다.A method and apparatus for sorting foreign substances are disclosed. A foreign material screening method according to an embodiment of the present disclosure includes obtaining an image of a foreign material selection target object, loading an image processing-based learning model trained to classify a specific object as normal or abnormal, and obtaining Outputting whether the target object is normal or abnormal by applying a learning model to one target object image, and selecting and displaying abnormal objects as foreign substances based on whether the target object output through the learning model is normal or abnormal may include the step of

Description

이물질 선별 방법 및 장치{METHOD AND APPARATUS FOR CLASSIFYING FOREIGN MATTER}Foreign material screening method and apparatus {METHOD AND APPARATUS FOR CLASSIFYING FOREIGN MATTER}

본 개시는 딥러닝 기반 이미지 처리 기술에 있어, 이물질 선별을 위한 인공신경망 학습 데이터 증강을 통해 데이터간의 균형을 맞춰 학습 정확도를 향상시킬 수 있도록 하는 이물질 선별 방법 및 장치에 관한 것이다.The present disclosure relates to a foreign material screening method and apparatus capable of improving learning accuracy by balancing data through augmentation of artificial neural network learning data for foreign material selection in deep learning-based image processing technology.

인공지능(Artificial Intelligence, AI) 시스템은 인간 수준의 지능을 구현하는 컴퓨터 시스템이며, 기존 규칙 기반 스마트 시스템과 달리 기계가 스스로 학습하고 판단하며 똑똑해지는 시스템이다. 인공지능 시스템은 사용할수록 인식률이 향상되고 사용자 취향을 보다 정확하게 이해할 수 있게 되어, 기존 규칙 기반 스마트 시스템은 점차 딥러닝 기반 인공지능 시스템으로 대체되고 있다.An artificial intelligence (AI) system is a computer system that implements human-level intelligence, and unlike the existing rule-based smart system, the machine learns, judges, and becomes smarter by itself. As artificial intelligence systems are used, the recognition rate improves and users can understand user preferences more accurately.

인공지능 기술은 기계학습(딥러닝) 및 기계학습을 활용한 요소 기술들로 구성된다. 기계학습은 입력 데이터들의 특징을 스스로 분류/학습하는 알고리즘 기술이며, 요소기술은 딥러닝 등의 기계학습 알고리즘을 활용하는 기술로서, 언어적 이해, 시각적 이해, 추론/예측, 지식 표현, 동작 제어 등의 기술 분야로 구성된다.Artificial intelligence technology consists of machine learning (deep learning) and element technologies using machine learning. Machine learning is an algorithm technology that categorizes/learns characteristics of input data by itself, and element technology is a technology that uses machine learning algorithms such as deep learning, such as language understanding, visual understanding, reasoning/prediction, knowledge expression, motion control, etc It consists of technical fields of

특히, 기존에는 컴퓨터가 스스로 물체를 인식하기 위해선 인식이 필요한 이미지의 특징을 사람이 사전에 알려주는 handcrafted feature를 사용했다. 그러나 최근에는 사람이 데이터만 제공하면 그 특징을 컴퓨터가 직접 학습하여 물체를 인식하는 인공신경망을 주로 사용한다. 인공신경망은 가중치가 포함된 layer를 깊게 쌓는 형태를 갖고 있다. 인공신경망은 제공받은 데이터를 토대로 공통된 특징을 가중치의 형태로 저장하므로 제공받는 데이터가 성능에 중요한 역할을 한다. In particular, in the past, in order for a computer to recognize an object by itself, a handcrafted feature was used, in which a person informs in advance the characteristics of an image that needs to be recognized. However, in recent years, artificial neural networks are mainly used to recognize objects by directly learning the characteristics of a computer when a person provides only data. The artificial neural network has the form of deeply stacking layers with weights. Since the artificial neural network stores common features in the form of weights based on the data provided, the data provided plays an important role in performance.

한편, 최근 소비자들이 건강에 대한 관심이 높아지면서 건강과 직접적인 연관이 있는 식품의 품질, 식품 내 이물질 여부 등의 관심도 함께 높아지고 있다. 예를 들어 이물질은 원재료에서 자연적으로 발생 가능한 나뭇가지, 벌레, 흙, 돌 등과 현장에서 인공적으로 발생 가능한 플라스틱, 고무, 머리카락, 실리콘 등이 있다. 즉, 식품 제조현장에서 이물질을 분류하는 기준은 정상식품을 제외한 모든 객체를 이물질로 분류하며, 정상식품을 제외한 모든 객체를 이물질로 분류할 수 있다. Meanwhile, as consumers' interest in health has recently increased, interest in the quality of food directly related to health and whether there are foreign substances in food is also increasing. For example, foreign substances include tree branches, insects, soil, stones, which can occur naturally in raw materials, and plastics, rubber, hair, and silicone that can occur artificially in the field. That is, the criteria for classifying foreign substances in the food manufacturing site is that all objects except normal food are classified as foreign substances, and all objects except normal food can be classified as foreign substances.

따라서 정상식품과 그 외의 객체를 어떻게 하면 정확하게 구분 할 수 있는지가 중요한 문제이며, 그에 따라 식품을 생산, 가공하는 제조현장에서는 소비자에게 혐오감을 주거나 건강상의 문제를 야기하는 이물질을 찾아서 제거하기 위해 많은 노력을 기울이고 있다. Therefore, it is an important issue how to accurately distinguish between normal food and other objects, and accordingly, in the manufacturing site where food is produced and processed, many efforts are made to find and remove foreign substances that give consumers disgust or cause health problems. is leaning

이에 선행기술 1과 같이 식품 제조 공정에서 인공신경망을 이용하여 이물질을 선별하고자 하는 기술이 개발되었다. 선행기술 1은 컨베이어 벨트를 통해 들어오는 대상 김 및 이물질에 대해 빛을 조사하고, 카메라를 통해 조사된 빛의 산란 및 반사광을 촬영하여 촬영된 결과를 바탕으로 블록체인 네트워크의 컨벌루션 신경망에 입력하고, 컨벌루션 신경망의 출력 신호에 기초하여 이물질을 선별하는 것을 특징으로 한다. Accordingly, as in Prior Art 1, a technology for selecting foreign substances using an artificial neural network in the food manufacturing process was developed. Prior art 1 irradiates light on the target seaweed and foreign substances coming through the conveyor belt, shoots the scattered and reflected light of the light irradiated through the camera, and inputs it into the convolutional neural network of the blockchain network based on the captured results, It is characterized in that the foreign material is selected based on the output signal of the neural network.

그러나 인공신경망은 분류하고자 하는 클래스의 데이터가 균형을 이룰 때 클래스별 특징을 잘 학습할 수 있으나, 상기와 같은 종래기술의 경우, 실제 식품 제조현장에선 발견되는 이물질의 개수가 정상식품에 비해 워낙 적어 이물질 클래스의 이미지 획득이 상대적으로 어렵다. 따라서 식품 이미지와 이물질 이미지 간의 데이터 불균형이 발생하고 데이터 불균형은 이물질 분류를 수행하는 인공신경망이 제대로 학습되지 않는 문제를 야기할 수 있다.However, the artificial neural network can learn the characteristics of each class well when the data of the class to be classified is balanced. Image acquisition of the foreign material class is relatively difficult. Therefore, data imbalance occurs between the food image and the foreign material image, and the data imbalance may cause a problem that the artificial neural network that performs the foreign material classification is not properly trained.

또한, 종래에는 일반적으로 서로 독립된 위치에 존재하는 정상식품과 이물질을 학습하여 이물질을 선별한다. 서로 독립된 위치에 존재하는 정상식품과 이물질을 학습할 경우, 이물질 모양이 다양하여 특징을 정확히 학습하기 어렵지만 정상식품이 일관성 있는 형태를 갖고 있어 비교적 쉽게 학습이 가능하다. 그러나 이 경우 이물질의 특징을 잘 학습한다기 보단 정상식품의 특정부위 특징을 잘 학습하여 정상제품과 이물질을 분류하는 것이다.In addition, in the prior art, the foreign material is selected by learning the normal food and the foreign material that exist in a position independent of each other in general. When learning normal food and foreign substances that exist in independent positions, it is difficult to accurately learn the characteristics of the foreign substances because of the various shapes, but it is relatively easy to learn because the normal food has a consistent shape. However, in this case, rather than learning the characteristics of foreign substances, it is better to learn the characteristics of specific parts of normal food to classify normal products and foreign substances.

이런 경우 정상식품과 이물질이 겹쳐진 객체에 대해서 제조현장에선 정상식품에 이물질이 포함되어 있으므로 제거해야 할 이물질이지만 정상식품의 특정부위 특징을 학습한 인공신경망은 해당 특징을 발견하면 정상식품과 겹쳐진 이물질을 이물질이 아닌 정상식품으로 오판하는 문제가 발생할 수 있다. 즉 정상식품과 이물질이 함께 겹쳐진 이물질은 두 객체의 특징을 모두 갖고 있으므로, 정상식품의 특징과 이물질의 특징을 모두 갖는 겹쳐진 이물질을 분류할 수 있는 방법이 필요하다.In this case, for an object that overlaps with normal food, it is a foreign substance that needs to be removed because the normal food contains foreign substances at the manufacturing site. There may be a problem of erroneously judging normal food rather than foreign substances. That is, since normal food and foreign substances overlapping both have the characteristics of both objects, a method for classifying the overlapping foreign substances having both the characteristics of normal food and foreign substances is required.

전술한 배경기술은 발명자가 본 발명의 도출을 위해 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 기술 정보로서, 반드시 본 발명의 출원 전에 일반 공중에게 공개된 공지기술이라 할 수는 없다.The above-mentioned background art is technical information that the inventor possessed for the derivation of the present invention or acquired in the process of derivation of the present invention, and cannot necessarily be said to be a known technique disclosed to the general public prior to the filing of the present invention.

선행기술 1: 한국등록특허 제10-2116137호(2020.05.21.등록)Prior art 1: Korean Patent No. 10-2116137 (registration on May 21, 2020)

본 개시의 실시 예의 일 과제는, 현장에서 구하기 힘든 다양한 형태의 이물질 클래스를 외부에서 수집하여 현장에서 자주 발생하는 클래스 간 발생하는 데이터 불균형 문제를 해결하고자 하는데 있다.An object of the embodiment of the present disclosure is to solve the problem of data imbalance occurring between classes frequently occurring in the field by collecting foreign material classes of various types that are difficult to obtain in the field from the outside.

본 개시의 실시 예의 일 과제는, 인공신경망이 학습과정에서 정상식품의 특정부위만을 학습하여 겹쳐진 이물질을 정상식품으로 판단하는 문제를 해결하여, 인공신경망이 식품현장에서 정상식품을 제외한 모든 객체를 이물질로 판단할 수 있도록 하는데 있다.One task of an embodiment of the present disclosure is to solve the problem that the artificial neural network learns only a specific part of normal food in the learning process to determine the overlapping foreign material as normal food, so that the artificial neural network detects all objects except normal food in the food field as foreign substances. so that it can be judged as

본 개시의 실시 예의 일 과제는, 단순히 수집한 데이터의 클래스가 독립적으로 분리된 경우에 한해서 정확도를 좀 더 상승시키는 것이 아니라, 다수의 클래스가 겹쳐진 경우(예를 들어, 식품 제조현장에서 생산하는 식품과 이물질이 겹쳐진 상황과 같이 특정 클래스들이 겹쳐져 각 클래스들의 특징을 모두 갖고 있는 경우)를 고려하여 신경망의 정확도를 향상시키고자 하는데 있다.One problem of the embodiment of the present disclosure is not to further increase the accuracy only when the classes of the collected data are separated independently, but when a plurality of classes are overlapped (eg, food produced at the food manufacturing site) The goal is to improve the accuracy of the neural network by considering the case where certain classes are overlapped and have all the characteristics of each class, such as a situation in which and foreign substances overlap.

본 개시의 실시 예의 일 과제는, 부족한 클래스의 데이터를 외부에서 수집하여 클래스 간 발생하는 데이터 불균형 문제를 해결할 뿐만 아니라 실제 데이터와 가상 데이터를 합성하는 방법을 통해 신경망이 정상식품을 제외한 모든 객체는 이물로 분류가 가능하도록 학습하고자 하는데 있다.One task of the embodiment of the present disclosure is to solve the problem of data imbalance between classes by collecting data of insufficient classes from the outside, as well as synthesizing real data and virtual data through a method of synthesizing real data and virtual data, so that all objects except normal food are foreign objects I am trying to learn to be able to classify as

본 개시의 실시 예의 일 과제는, 정상식품 이미지와 이물질 이미지를 인위적으로 합성하여 겹쳐진 이물질 이미지를 생성하고, 해당 이미지를 이물질 클래스로 분류하여 학습에 사용하여, 정상식품과 이물질이 겹쳐진 경우 정상식품의 특정부위 특징을 학습한 인공신경망이 정상식품과 겹쳐진 이물질을 이물질이 아닌 정상식품으로 오판하는 문제를 극복할 수 있도록 하는데 있다. One task of the embodiment of the present disclosure is to artificially synthesize a normal food image and a foreign material image to create an overlapping foreign material image, classify the image into a foreign material class and use it for learning, and when normal food and foreign material overlap, normal food The goal is to overcome the problem that an artificial neural network that has learned the characteristics of a specific part of a food can mistakenly judge a foreign substance that overlaps with a normal food as a normal food rather than a foreign substance.

본 개시의 실시 예의 일 과제는, 특정 객체(예를 들어, 식품 이미지)를 촬영한 이미지를 입력으로 하여 해당 객체의 정상 또는 비정상 여부를 분류하는 이미지 처리 기반 딥러닝 알고리즘을 이용해, 복수 개의 특정 객체들 사이에서 이물질을 선별하고자 하는데 있다.One task of an embodiment of the present disclosure is to use an image processing-based deep learning algorithm that classifies whether a specific object (eg, a food image) is normal or abnormal by inputting an image of a specific object (eg, a food image) to a plurality of specific objects It is trying to select foreign substances from among them.

본 개시의 실시 예의 일 과제는, 이미지 처리 기반 딥러닝 알고리즘을 이용하여 이물질 선별을 간단하고 정확하게 수행할 수 있도록 하여, 정상 식품 내 이물질 선별에 소요되는 시간과 비용을 줄이고자 하는데 있다.An object of an embodiment of the present disclosure is to reduce the time and cost required for sorting foreign substances in normal food by making it possible to perform simple and accurate foreign material selection using an image processing-based deep learning algorithm.

본 개시의 실시 예의 일 과제는, 제조단계에서 이물질 선별을 위한 딥러닝 알고리즘을 통해 정상식품과 이물질을 구분하고, 이물질 제거 후 소비자에게 안전한 식품이 제공되도록 하여, 사용자 만족도 및 신뢰도를 향상시키고자 하는데 있다.One task of the embodiment of the present disclosure is to distinguish normal food from foreign substances through a deep learning algorithm for screening foreign substances in the manufacturing stage, and to provide safe food to consumers after removing foreign substances, thereby improving user satisfaction and reliability. have.

본 개시의 실시 예의 목적은 이상에서 언급한 과제에 한정되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시 예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 알 수 있을 것이다.The object of the embodiment of the present disclosure is not limited to the above-mentioned tasks, and other objects and advantages of the present invention not mentioned may be understood by the following description, and will be more clearly understood by the embodiment of the present invention will be. It will also be appreciated that the objects and advantages of the present invention may be realized by means of the instrumentalities and combinations thereof indicated in the claims.

본 개시의 일 실시 예에 따른 이물질 선별 방법은, 딥러닝 기반 이미지 처리 기술에 있어, 이물질 선별을 위한 인공신경망 학습 데이터 증강을 통해 데이터간의 균형을 맞추는 단계를 포함할 수 있다.The foreign material selection method according to an embodiment of the present disclosure may include, in the deep learning-based image processing technology, balancing data through augmentation of artificial neural network learning data for foreign material selection.

구체적으로 본 개시의 일 실시 예에 따른 이물질 선별 방법은, 이물질 선별 대상 객체를 촬영한 이미지를 획득하는 단계와, 특정 객체를 정상 또는 비정상으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩하는 단계와, 획득한 대상 객체 이미지에 학습 모델을 적용하여 대상 객체에 대해 정상 또는 비정상 여부를 출력하는 단계와, 학습 모델을 통해 출력된 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시하는 단계를 포함할 수 있다.Specifically, the foreign material screening method according to an embodiment of the present disclosure includes: obtaining an image of a foreign material selection target object; loading an image processing-based learning model trained to classify a specific object as normal or abnormal; , outputting whether the target object is normal or abnormal by applying the learning model to the acquired target object image, and selecting the abnormal object as a foreign material based on whether the target object output through the learning model is normal or abnormal It may include a step of displaying it.

본 개시의 일 실시 예에 따른 이물질 선별 방법을 통하여, 현장에서 구하기 힘든 다양한 형태의 이물질 클래스를 외부에서 수집하여 현장에서 자주 발생하는 클래스 간 발생하는 데이터 불균형으로 문제를 해결할 뿐만 아니라, 실제 데이터와 가상 데이터를 합성하는 방법을 통해 신경망이 정상식품을 제외한 모든 객체를 이물질로 분류가 가능하도록 학습하여 이물질 선별을 위한 학습 모델의 정확도를 향상시킬 수 있다.Through the foreign material screening method according to an embodiment of the present disclosure, various types of foreign material classes that are difficult to obtain in the field are collected from the outside to solve the problem of data imbalance occurring between classes that occur frequently in the field, as well as real data and virtual Through the method of synthesizing data, the neural network learns to classify all objects except normal food as foreign substances, thereby improving the accuracy of the learning model for foreign substances selection.

이 외에도, 본 발명의 구현하기 위한 다른 방법, 다른 시스템 및 상기 방법을 실행하기 위한 컴퓨터 프로그램이 저장된 컴퓨터로 판독 가능한 기록매체가 더 제공될 수 있다.In addition to this, another method for implementing the present invention, another system, and a computer-readable recording medium storing a computer program for executing the method may be further provided.

전술한 것 외의 다른 측면, 특징, 이점이 이하의 도면, 특허청구범위 및 발명의 상세한 설명으로부터 명확해질 것이다.Other aspects, features and advantages other than those described above will become apparent from the following drawings, claims, and detailed description of the invention.

본 개시의 실시 예에 의하면, 정상식품과 이물질이 학습된 인공신경망에 있어, 합성 이물질 데이터를 이물질 클래스로 분류하여 함께 학습하여, 정상식품의 특정부위의 특징보다 정상식품이라도 이물질 형태의 객체가 있는지 없는지의 여부가 중요한 학습 평가의 척도가 되도록 함으로써, 단순히 정상식품의 특징만의 학습이 아닌 정상식품이어도 내부에 이물질의 특징을 갖는 요소가 있는지를 파악하는 학습효과를 기대할 수 있다.According to an embodiment of the present disclosure, in the artificial neural network in which normal food and foreign substances are learned, synthetic foreign material data is classified into foreign material classes and learned together, and whether there is an object in the form of a foreign substance even in normal food rather than a characteristic of a specific part of normal food By making the absence or nonexistence as an important criterion for evaluation of learning, it is possible to expect a learning effect of not only learning the characteristics of normal food, but also identifying whether there are elements with the characteristics of foreign substances inside even in normal food.

또한, 정상식품 이미지와 이물질 이미지를 인위적으로 합성하여 겹쳐진 이물질 이미지를 생성하고, 해당 이미지를 이물질 클래스로 분류하여 학습에 사용함으로써, 정상식품과 이물질이 겹쳐진 경우 이물질이 아닌 정상식품으로 오판하는 오류를 방지할 수 있다.In addition, by artificially synthesizing a normal food image and a foreign material image to create an overlapping foreign material image, classifying the image into a foreign material class and using it for learning, when normal food and foreign material overlap, the error of erroneous judgment as normal food rather than foreign material can be prevented

또한, 분류하고자 하는 클래스의 특징을 제공 받은 데이터를 통해 스스로 찾고 이를 학습하는 인공신경망을 적용함으로써, 처음 보는 데이터도 실제 클래스로 정확하게 분류하도록 할 수 있다.In addition, by applying an artificial neural network that finds and learns by itself through the data provided with the characteristics of the class to be classified, it is possible to accurately classify data that is seen for the first time into an actual class.

또한, 데이터를 단순히 수집에서 그치지 않고 식품 제조현장에서 발생하는 겹쳐진 이물질을 학습하기 위해, 실제 이미지와 수집 이미지를 합성하여 학습함으로써, 학습 모델의 정확도를 향상시킬 수 있다.In addition, it is possible to improve the accuracy of the learning model by synthesizing and learning the actual image and the collected image in order to learn not only the data collection but also the overlapping foreign substances occurring at the food manufacturing site.

또한, 전체 데이터(실제 정상식품 이미지, 실제 이물질 이미지, 가상 이물질 이미지, 이물질 합성 이미지)를 사용해 이물질 검출을 위한 인공신경망을 학습함으로써, 가상 이물질과 겹쳐진 이물질에 의해 기존 데이터 수 대비 전체 데이터 수를 증가시킬 수 있으며, 인공신경망 학습에 문제가 되었던 데이터 불균형 문제가 해소되도록 하여, 학습 모델의 성능을 향상시킬 수 있다.In addition, by learning an artificial neural network for foreign material detection using the entire data (real normal food image, real foreign material image, virtual foreign material image, and foreign material composite image), the total number of data compared to the number of existing data is increased by the foreign material overlapping with the virtual foreign material The performance of the learning model can be improved by solving the problem of data imbalance, which has been a problem in artificial neural network learning.

본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.Effects of the present invention are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

도 1은 본 개시의 일 실시 예에 따른 이물질 선별 시스템의 개략적인 예시도이다.
도 2는 본 개시의 일 실시 예에 따른 정상 이미지, 이물질 이미지 및 정상 객체에 이물질이 겹쳐진 이미지를 나타낸 예시도이다.
도 3은 본 개시의 일 실시 예에 따른 이물질 선별 장치를 개략적으로 나타낸 블록도이다.
도 4는 본 개시의 일 실시 예에 따른 가상 이물질 이미지를 나타낸 예시도이다.
도 5는 본 개시의 일 실시 예에 따른 이물질 합성 과정을 설명하기 위한 도면이다.
도 6은 본 개시의 일 실시 예에 따른 합성 이미지를 나타낸 예시도이다.
도 7은 본 개시의 일 실시 예에 따른 이물질 선별 출력 화면을 나타낸 예시도이다.
도 8은 본 개시의 일 실시 예에 따른 미세한 이물질 선별 방법을 설명하기 위한 예시도이다.
도 9는 본 개시의 일 실시 예에 따른 이물질 선별 방법을 설명하기 위한 흐름도이다.
도 10은 본 개시의 일 실시 예에 따른 이물질 선별 학습 모델의 학습 방법을 설명하기 위한 흐름도이다.
1 is a schematic illustration of a foreign material sorting system according to an embodiment of the present disclosure.
2 is an exemplary diagram illustrating a normal image, a foreign material image, and an image in which a foreign material is superimposed on a normal object according to an embodiment of the present disclosure.
3 is a block diagram schematically illustrating a foreign material sorting apparatus according to an embodiment of the present disclosure.
4 is an exemplary diagram illustrating a virtual foreign material image according to an embodiment of the present disclosure.
5 is a view for explaining a foreign material synthesis process according to an embodiment of the present disclosure.
6 is an exemplary diagram illustrating a composite image according to an embodiment of the present disclosure.
7 is an exemplary view illustrating a foreign material sorting output screen according to an embodiment of the present disclosure.
8 is an exemplary view for explaining a method for selecting a fine foreign material according to an embodiment of the present disclosure.
9 is a flowchart illustrating a method for screening foreign substances according to an embodiment of the present disclosure.
10 is a flowchart illustrating a learning method of a foreign material selection learning model according to an embodiment of the present disclosure.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 설명되는 실시 예들을 참조하면 명확해질 것이다.Advantages and features of the present invention, and a method for achieving them will become apparent with reference to the detailed description in conjunction with the accompanying drawings.

그러나 본 발명은 아래에서 제시되는 실시 예들로 한정되는 것이 아니라, 서로 다른 다양한 형태로 구현될 수 있고, 본 발명의 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 아래에 제시되는 실시 예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.However, the present invention is not limited to the embodiments presented below, it can be implemented in a variety of different forms, and should be understood to include all transformations, equivalents, and substitutes included in the spirit and scope of the present invention. . The embodiments presented below are provided so that the disclosure of the present invention is complete, and to completely inform those of ordinary skill in the art to which the present invention pertains to the scope of the invention. In describing the present invention, if it is determined that a detailed description of a related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted.

본 출원에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof. Terms such as first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.

이하, 본 발명에 따른 실시 예들을 첨부된 도면을 참조하여 상세히 설명하기로 하며, 첨부 도면을 참조하여 설명함에 있어, 동일하거나 대응하는 구성요소는 동일한 도면번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings, and in the description with reference to the accompanying drawings, the same or corresponding components are given the same reference numerals, and overlapping descriptions thereof are omitted. decide to do

도 1은 본 개시의 일 실시 예에 따른 이물질 선별 시스템의 개략적인 예시도이다.1 is a schematic illustration of a foreign material sorting system according to an embodiment of the present disclosure.

도 1에 도시된 바와 같이, 이물질 선별 시스템(1)은 이물질 선별 장치(100), 사용자 단말(200), 서버(300) 및 네트워크(400)를 포함할 수 있다.As shown in FIG. 1 , the foreign material sorting system 1 may include a foreign material sorting apparatus 100 , a user terminal 200 , a server 300 , and a network 400 .

본 실시 예에서, 이물질 선별 시스템(1)은 딥러닝 기반 이미지 처리 기술을 이용하여 이미지를 분류하는 것으로, 예를 들어, 식품 제조 현장에서 식품을 촬영하여 식품 내 이물질을 선별하고자 하는 것이다. 즉 정상적인 식품과 이물질(정상적인 식품을 제외한 모든 객체)을 분류하여, 식품 내에서 이물질을 제거할 수 있도록 하는 것이다. 이에 본 실시 예에서는, 식품 클래스(정상 객체)와 이물질 클래스(비정상 객체)를 학습하고 분류하는 것을 실시 예로 하여 설명하도록 한다.In this embodiment, the foreign material sorting system 1 classifies images using deep learning-based image processing technology, for example, to select foreign substances in food by photographing food at a food manufacturing site. That is, by classifying normal food and foreign substances (all objects except normal food), foreign substances can be removed from the food. Accordingly, in this embodiment, learning and classifying a food class (normal object) and a foreign material class (abnormal object) will be described as an embodiment.

본 실시 예에서, 딥러닝 기반 이미지 처리를 수행하는데 있어, 분류하고자 하는 클래스 간의 데이터가 균형을 이룰 때 각 클래스의 특징을 잘 학습하므로, 분류하고자 하는 클래스 간의 데이터의 균형을 맞추는 것이 매우 중요하다. 그러나 실제 식품 제조현장에서 발견되는 이물질의 개수가 정상 식품에 비해 워낙 적어 이물질 클래스의 이미지 획득이 상대적으로 어렵다. 따라서 식품 이미지와 이물질 이미지 간의 데이터 불균형이 발생하고 데이터 불균형은 이물질 분류를 수행하는 인공신경망이 제대로 학습되지 않는 문제를 야기할 수 있다.In this embodiment, in performing deep learning-based image processing, when the data between the classes to be classified is balanced, the characteristics of each class are well learned, so it is very important to balance the data between the classes to be classified. However, since the number of foreign substances found in actual food manufacturing sites is so small compared to normal food, it is relatively difficult to acquire images of foreign substances class. Therefore, data imbalance occurs between the food image and the foreign material image, and the data imbalance may cause a problem that the artificial neural network that performs the foreign material classification is not properly trained.

이에 본 실시 예에서는, 이물질 선별을 위한 인공신경망 학습 데이터 증강을 통해 데이터 간의 균형을 맞춰 학습 정확도를 향상시킬 수 있도록 하고자 하는 것이다.Accordingly, in this embodiment, it is intended to improve the learning accuracy by balancing the data through augmentation of the artificial neural network learning data for foreign material selection.

예를 들어, 본 실시 예에서는, 실제 현장에서 획득되는 이물질 이미지를 서버(예를 들어, 데이터베이스 서버, 인터넷 등)를 통해 검색하여 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집할 수 있다. 이는 인터넷, 빅데이터 등이 발달했기 때문이며, 다양한 이미지가 공유되고 있다. 따라서, 본 실시 예에서는, 식품에서 발생한 이물질 이미지 또는 식품에서 발견되진 않았지만 식품에서 발생 가능한 이물질과 유사한 형태의 이미지를 용이하게 수집할 수 있다.For example, in the present embodiment, a virtual foreign material image similar to an actual foreign material image may be collected by searching for a foreign material image obtained in an actual field through a server (eg, a database server, the Internet, etc.). This is because the Internet and big data have developed, and various images are being shared. Accordingly, in the present embodiment, it is possible to easily collect images of foreign substances generated in food or images of a shape similar to foreign substances that are not found in food but may occur in food.

또한 본 실시 예에서는, 식품 이미지를 회득하여 해당 이미지를 딥러닝을 기반으로 정상 식품과 이물질로 분류할 수 있는데, 정상 식품과 이물질이 겹쳐져 있는 상태에 대해서도 고려해야 한다.In addition, in this embodiment, food images can be acquired and the images can be classified into normal food and foreign substances based on deep learning, but the overlapping state of normal food and foreign substances must also be considered.

도 2는 본 개시의 일 실시 예에 따른 정상 이미지, 이물질 이미지 및 정상 객체에 이물질이 겹쳐진 이미지를 나타낸 예시도이다.2 is an exemplary diagram illustrating a normal image, a foreign material image, and an image in which a foreign material is superimposed on a normal object according to an embodiment of the present disclosure.

도 2를 참조하면, 도 2(a)는 정상 식품 이미지를 나타내는 것으로, 예를 들어, 원재료 상태의 대파분태 이미지이다. 그리고 도2(b)는 이물질 이미지를 나타내는 것으로, 예를 들어, 원재료에서 자연적으로 발생 가능한 나뭇가지, 벌레, 흙, 돌 등과 현장에서 인공적으로 발생 가능한 플라스틱, 고무, 머리카락, 실리콘 등의 이미지이다.Referring to Fig. 2, Fig. 2 (a) shows an image of a normal food, for example, an image of a green onion in the state of a raw material. And Figure 2 (b) shows the image of the foreign material, for example, it is an image of plastic, rubber, hair, silicone, etc. that can occur artificially in the field such as tree branches, insects, soil, stones, etc. that can occur naturally in the raw material.

특히, 도 2(c)는 정상 식품과 이물질이 함께 겹쳐져 있는 이미지를 나타내는 것으로, 정상 식품과 이물질 두 객체의 특징을 모두 갖고 있다. 따라서 인공신경망은 정상 식품의 특징과 이물질의 특징을 모두 갖는 겹쳐진 이물질을 분류할 수 있어야 한다. 따라서 본 실시 예에서는, 정상 식품의 특징과 이물질의 특징을 모두 갖는 겹쳐진 이미지에 대해서도 이물질 클래스로 학습하여, 이물질 선별의 정확도를 향상시킬 수 있다. 이에 본 실시 예의 이물질 선별 시스템(1)은 제조 단계에서 정상 식품과 이물질을 보다 정확하게 구분하여 이물질을 제거한 후 소비자에게 안전한 식품을 제공할 수 있도록 할 수 있다.In particular, Fig. 2(c) shows an image in which a normal food and a foreign substance are overlapped together, and has both the characteristics of the normal food and the foreign substance. Therefore, the artificial neural network should be able to classify overlapping foreign substances that have both the characteristics of normal food and the characteristics of foreign substances. Therefore, in the present embodiment, even the superimposed image having both the characteristics of the normal food and the characteristics of the foreign material can be learned as a foreign material class, thereby improving the accuracy of foreign material selection. Accordingly, the foreign material sorting system 1 of the present embodiment can more accurately distinguish normal food from foreign substances in the manufacturing step, remove foreign substances, and then provide safe food to consumers.

한편 본 실시 예에서는, 사용자들이 사용자 단말(200)에서 구현되는 어플리케이션 또는 웹사이트에 접속하여, 이물질 선별을 위한 대상 객체 이미지(예를 들어, 제조 단계에서 이물질 식별을 위해 식품을 촬영한 이미지)를 입력하거나, 이물질 선별 결과에 따라 이물질을 제거하거나, 이물질 선별 결과를 확인하는 등의 과정을 수행할 수 있다. 이러한 사용자 단말(200)은 이물질 선별 어플리케이션 또는 이물질 선별 웹사이트에 접속한 후 인증 과정을 통하여 이물질 선별 서비스를 제공받을 수 있다. 인증 과정은 회원가입 등 사용자 정보를 입력하는 인증, 사용자 단말에 대한 인증 등을 포함할 수 있으나, 이에 한정되지 않고 이물질 선별 장치(100) 및/또는 서버(300)에서 전송되는 링크에 접속하는 것만으로 인증 과정이 수행될 수도 있다. 또한 본 실시 예에서, 사용자는 식품 제조 단계에서 식품 내 이물질 선별 등의 업무를 수행하는 사용자를 의미할 수 있다. Meanwhile, in this embodiment, users access an application or website implemented in the user terminal 200, and obtain a target object image (eg, an image obtained by photographing food to identify a foreign substance in the manufacturing step) for screening foreign substances. input, removing the foreign material according to the foreign material selection result, or confirming the foreign material selection result may be performed. The user terminal 200 may receive a foreign material screening service through an authentication process after accessing a foreign material selection application or a foreign material selection website. The authentication process may include authentication for inputting user information such as membership registration, authentication for a user terminal, etc., but is not limited thereto, and only accessing a link transmitted from the foreign material sorting device 100 and/or the server 300 The authentication process may be performed. Also, in this embodiment, the user may mean a user who performs tasks such as screening foreign substances in food in the food manufacturing step.

본 실시 예에서, 사용자 단말(200)은 사용자가 조작하는 데스크 탑 컴퓨터, 스마트폰, 노트북, 태블릿 PC, 스마트 TV, 휴대폰, PDA(personal digital assistant), 랩톱, 미디어 플레이어, 마이크로 서버, GPS(global positioning system) 장치, 전자책 단말기, 디지털방송용 단말기, 네비게이션, 키오스크, MP3 플레이어, 디지털 카메라, 가전기기 및 기타 모바일 또는 비모바일 컴퓨팅 장치일 수 있으나, 이에 제한되지 않는다. 또한, 사용자 단말(200)은 통신 기능 및 데이터 프로세싱 기능을 구비한 시계, 안경, 헤어 밴드 및 반지 등의 웨어러블 단말기 일 수 있다. 사용자 단말(200)은 상술한 내용에 제한되지 아니하며, 웹 브라우징이 가능한 단말기는 제한 없이 차용될 수 있다.In this embodiment, the user terminal 200 is a desktop computer, a smartphone, a notebook computer, a tablet PC, a smart TV, a mobile phone, a personal digital assistant (PDA), a laptop, a media player, a micro server, a GPS (global) operated by the user positioning system) devices, e-book terminals, digital broadcast terminals, navigation devices, kiosks, MP3 players, digital cameras, home appliances, and other mobile or non-mobile computing devices, but are not limited thereto. Also, the user terminal 200 may be a wearable terminal such as a watch, glasses, a hair band, and a ring having a communication function and a data processing function. The user terminal 200 is not limited to the above, and a terminal capable of web browsing may be borrowed without limitation.

한편, 본 실시 예에서 이물질 선별 시스템(1)은 이물질 선별 장치(100) 및/또는 서버(300)에 의해 구현될 수 있다.Meanwhile, in the present embodiment, the foreign material sorting system 1 may be implemented by the foreign material sorting apparatus 100 and/or the server 300 .

도 3은 본 개시의 일 실시 예에 따른 이물질 선별 장치를 개략적으로 나타낸 블록도이다.3 is a block diagram schematically illustrating a foreign material sorting apparatus according to an embodiment of the present disclosure.

도 3에 도시된 바와 같이, 이물질 선별 장치(100)는 메모리(110), 통신부(120), 프로세서(130) 및 사용자 인터페이스(140)를 포함할 수 있다.As shown in FIG. 3 , the foreign material sorting apparatus 100 may include a memory 110 , a communication unit 120 , a processor 130 , and a user interface 140 .

메모리(110)는 이물질 선별 장치(100)의 동작에 필요한 각종 정보들을 저장하고, 이물질 선별 장치(100)를 동작시킬 수 있는 제어 소프트웨어를 저장할 수 있는 것으로, 휘발성 또는 비휘발성 기록 매체를 포함할 수 있다. The memory 110 may store various types of information necessary for the operation of the foreign material sorting apparatus 100 , and may store control software capable of operating the foreign material sorting apparatus 100 , and may include a volatile or non-volatile recording medium. have.

메모리(110)는 하나 이상의 프로세서(130)와 연결되는 것으로, 프로세서(130)에 의해 실행될 때, 프로세서(130)로 하여금 이물질 선별 장치(100)를 제어하도록 야기하는(cause) 코드들을 저장할 수 있다.The memory 110 is connected to one or more processors 130 , and when executed by the processor 130 , may store codes causing the processor 130 to control the foreign material sorting apparatus 100 . .

여기서, 메모리(110)는 자기 저장 매체(magnetic storage media) 또는 플래시 저장 매체(flash storage media)를 포함할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 이러한 메모리(110)는 내장 메모리 및/또는 외장 메모리를 포함할 수 있으며, DRAM, SRAM, 또는 SDRAM 등과 같은 휘발성 메모리, OTPROM(one time programmable ROM), PROM, EPROM, EEPROM, mask ROM, flash ROM, NAND 플래시 메모리, 또는 NOR 플래시 메모리 등과 같은 비휘발성 메모리, SSD. CF(compact flash) 카드, SD 카드, Micro-SD 카드, Mini-SD 카드, Xd 카드, 또는 메모리 스틱(memory stick) 등과 같은 플래시 드라이브, 또는 HDD와 같은 저장 장치를 포함할 수 있다.Here, the memory 110 may include magnetic storage media or flash storage media, but the scope of the present invention is not limited thereto. Such memory 110 may include internal memory and/or external memory, and may include volatile memory such as DRAM, SRAM, or SDRAM, one time programmable ROM (OTPROM), PROM, EPROM, EEPROM, mask ROM, flash ROM, Non-volatile memory, such as NAND flash memory, or NOR flash memory, SSD. It may include a flash drive such as a compact flash (CF) card, an SD card, a Micro-SD card, a Mini-SD card, an Xd card, or a memory stick, or a storage device such as an HDD.

특히, 본 실시 예에서, 메모리(110)에는 본 개시에 따른 신경망 모델, 신경망 모델을 이용하여 본 개시의 다양할 실시 예를 구현할 수 있도록 구현된 모듈이 저장될 수 있다. 그리고, 메모리(110)에는 본 개시에 따른 학습을 수행하기 위한 알고리즘에 관련된 정보가 저장될 수 있다. 그 밖에도 본 개시의 목적을 달성하기 위한 범위 내에서 필요한 다양한 정보가 메모리(110)에 저장될 수 있으며, 메모리(110)에 저장된 정보는 서버 또는 외부 장치로부터 수신되거나 사용자에 의해 입력됨에 따라 갱신될 수도 있다. In particular, in the present embodiment, a neural network model according to the present disclosure and a module implemented to implement various embodiments of the present disclosure using the neural network model may be stored in the memory 110 . In addition, information related to an algorithm for performing learning according to the present disclosure may be stored in the memory 110 . In addition, various information necessary within the scope for achieving the object of the present disclosure may be stored in the memory 110, and the information stored in the memory 110 may be updated as it is received from a server or an external device or input by a user. may be

이때, 서버(300)는 이물질 선별 장치(100)가 포함되는 이물질 선별 시스템(1)을 운용하기 위한 서버일 수 있다. 또한 서버(300)는 각종 인공 지능 알고리즘을 적용하는데 필요한 빅데이터와, 이물질 선별 장치(100)를 동작시키는 데이터를 제공하는 데이터베이스 서버일 수 있다. 그 밖에 서버(300)는 이물질 선별 시스템(1)이 구현될 수 있도록 하는 웹 서버 또는 어플리케이션 서버, 그리고 딥러닝 등의 인공지능 프로세스를 수행하는 학습 서버 등을 포함할 수 있다. 본 실시 예에서, 서버(300)는 상술하는 서버들을 포함하거나 이러한 서버들과 네트워킹 할 수 있다.In this case, the server 300 may be a server for operating the foreign material sorting system 1 including the foreign material sorting apparatus 100 . In addition, the server 300 may be a database server that provides big data necessary for applying various artificial intelligence algorithms and data for operating the foreign material sorting apparatus 100 . In addition, the server 300 may include a web server or an application server that enables the foreign material screening system 1 to be implemented, and a learning server that performs an artificial intelligence process such as deep learning. In this embodiment, the server 300 may include or network with the above-described servers.

특히, 본 실시 예에서, 서버(300)는 이물질 선별 장치(100)로부터 이물질 선별을 하기 위한 식품 이미지를 수신하고, 식품 이미지에 이물질 선별 학습 알고리즘을 적용하여, 상기 식품에 대한 정상 또는 비정상(이물질) 여부를 판단하고 분석할 수 있다.In particular, in this embodiment, the server 300 receives a food image for sorting foreign substances from the foreign substance sorting apparatus 100, and applies a foreign substance sorting learning algorithm to the food image, so that the food is normal or abnormal (foreign substance). ) can be judged and analyzed.

통신부(120)는 네트워크(400)와 연동하여 외부 장치(서버를 포함) 간의 송수신 신호를 패킷 데이터 형태로 제공하는 데 필요한 통신 인터페이스를 제공할 수 있다. 또한 통신부(120)는 다른 네트워크 장치와 유무선 연결을 통해 제어 신호 또는 데이터 신호와 같은 신호를 송수신하기 위해 필요한 하드웨어 및 소프트웨어를 포함하는 장치일 수 있다. 이러한 통신부(120)는 각종 사물 지능 통신(IoT(internet of things), IoE(internet of everything), IoST(internet of small things) 등)을 지원할 수 있으며, M2M(machine to machine) 통신, V2X(vehicle to everything communication) 통신, D2D(device to device) 통신 등을 지원할 수 있다. The communication unit 120 may provide a communication interface necessary to provide a transmission/reception signal between external devices (including a server) in the form of packet data by interworking with the network 400 . Also, the communication unit 120 may be a device including hardware and software necessary for transmitting and receiving signals such as control signals or data signals through wired/wireless connection with other network devices. The communication unit 120 may support various kinds of intelligent communication (internet of things (IoT), internet of everything (IoE), internet of small things (IoST), etc.), and M2M (machine to machine) communication, V2X (vehicle) to everything communication) communication, D2D (device to device) communication, and the like may be supported.

이때, 네트워크(400)는 이물질 선별 시스템(1)에서 이물질 선별 장치(100), 서버(300) 및 사용자 단말(200)을 연결하는 역할을 수행할 수 있다. 이러한 네트워크(400)는 예컨대 LANs(local area networks), WANs(Wide area networks), MANs(metropolitan area networks), ISDNs(integrated service digital networks) 등의 유선 네트워크나, 무선 LANs, CDMA, 블루투스, 위성 통신 등의 무선 네트워크를 망라할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 또한 네트워크(400)는 근거리 통신 및/또는 원거리 통신을 이용하여 정보를 송수신할 수 있다. 여기서 근거리 통신은 블루투스(bluetooth), RFID(radio frequency identification), 적외선 통신(IrDA, infrared data association), UWB(ultra-wideband), ZigBee, Wi-Fi(Wireless fidelity) 기술을 포함할 수 있고, 원거리 통신은 CDMA(code division multiple access), FDMA(frequency division multiple access), TDMA(time division multiple access), OFDMA(orthogonal frequency division multiple access), SC-FDMA(single carrier frequency division multiple access) 기술을 포함할 수 있다.In this case, the network 400 may serve to connect the foreign material sorting apparatus 100 , the server 300 , and the user terminal 200 in the foreign material sorting system 1 . The network 400 is, for example, wired networks such as local area networks (LANs), wide area networks (WANs), metropolitan area networks (MANs), and integrated service digital networks (ISDNs), wireless LANs, CDMA, Bluetooth, and satellite communication. It may cover a wireless network such as, but the scope of the present invention is not limited thereto. Also, the network 400 may transmit/receive information using short-distance communication and/or long-distance communication. Here, the short-range communication may include Bluetooth (bluetooth), radio frequency identification (RFID), infrared data association (IrDA), ultra-wideband (UWB), ZigBee, and Wireless fidelity (Wi-Fi) technologies. Communication may include code division multiple access (CDMA), frequency division multiple access (FDMA), time division multiple access (TDMA), orthogonal frequency division multiple access (OFDMA), single carrier frequency division multiple access (SC-FDMA) technology. can

네트워크(400)는 허브, 브리지, 라우터, 스위치 및 게이트웨이와 같은 네트워크 요소들의 연결을 포함할 수 있다. 네트워크(400)는 인터넷과 같은 공용 네트워크 및 안전한 기업 사설 네트워크와 같은 사설 네트워크를 비롯한 하나 이상의 연결된 네트워크들, 예컨대 다중 네트워크 환경을 포함할 수 있다. 네트워크(400)에의 액세스는 하나 이상의 유선 또는 무선 액세스 네트워크들을 통해 제공될 수 있다. 더 나아가 네트워크(400)는 사물 등 분산된 구성 요소들 간에 정보를 주고받아 처리하는 IoT(Internet of Things, 사물인터넷) 망 및/또는 5G 통신을 지원할 수 있다.Network 400 may include connections of network elements such as hubs, bridges, routers, switches, and gateways. Network 400 may include one or more connected networks, eg, multiple network environments, including public networks such as the Internet and private networks such as secure enterprise private networks. Access to network 400 may be provided via one or more wired or wireless access networks. Furthermore, the network 400 may support an Internet of Things (IoT) network and/or 5G communication that exchanges and processes information between distributed components such as things.

즉, 프로세서(130)는 통신부(120)를 통해 연결된 외부 장치로부터 각종 데이터 또는 정보를 수신할 수 있으며, 외부 장치로 각종 데이터 또는 정보를 전송할 수도 있다. 그리고, 통신부(120)는 WiFi 모듈, Bluetooth 모듈, 무선 통신 모듈, 및 NFC 모듈 중 적어도 하나를 포함할 수 있다.That is, the processor 130 may receive various data or information from an external device connected through the communication unit 120 , and may transmit various data or information to the external device. In addition, the communication unit 120 may include at least one of a WiFi module, a Bluetooth module, a wireless communication module, and an NFC module.

사용자 인터페이스(140)는 이물질 선별을 위해 이물질 선별 장치(100)에 적용되는 정상 식품 이미지 및 이물질 이미지들이 획득 및 수집되고, 이물질 선별을 위한 사용자 요청 및 명령들이 입력되는 입력 인터페이스를 포함할 수 있다. 이때 정상 식품 이미지 및 이물질 이미지들은 사용자에 의해 입력되거나 서버로부터 획득될 수 있다.The user interface 140 may include an input interface through which normal food images and foreign material images applied to the foreign material sorting apparatus 100 are acquired and collected for foreign material sorting, and user requests and commands for foreign material sorting are input. In this case, the normal food image and foreign material images may be input by a user or obtained from a server.

그리고 사용자 인터페이스(140)는 이물질 선별 장치(100)에서 수행된 결과가 출력되는 출력 인터페이스를 포함할 수 있다. 예를 들어, 이물질 판단 결과에 따른 이물질 선별 표시가 출력될 수 있으며, 그 외 식품 내 이물질 비율 등이 출력될 수 있다. 즉 사용자 인터페이스(140)는 이물질 선별을 위한 사용자 요청 및 명령에 따른 결과를 출력할 수 있다.In addition, the user interface 140 may include an output interface through which a result performed by the foreign material sorting apparatus 100 is output. For example, a foreign material selection mark according to the foreign material determination result may be output, and a ratio of foreign matter in other foods may be output. That is, the user interface 140 may output a result according to a user request and command for sorting foreign substances.

이러한 사용자 인터페이스(140)의 입력 인터페이스와 출력 인터페이스는 동일한 인터페이스에서 구현될 수 있다.The input interface and the output interface of the user interface 140 may be implemented in the same interface.

프로세서(130)는 이물질 선별 장치(100)의 전반적인 동작을 제어할 수 있다. 구체적으로, 프로세서(130)는 상술한 바와 같은 메모리(110)를 포함하는 이물질 선별 장치(100)의 구성과 연결되며, 상술한 바와 같은 메모리(110)에 저장된 적어도 하나의 명령을 실행하여 이물질 선별 장치(100)의 동작을 전반적으로 제어할 수 있다.The processor 130 may control the overall operation of the foreign material sorting apparatus 100 . Specifically, the processor 130 is connected to the configuration of the foreign material sorting apparatus 100 including the memory 110 as described above, and executes at least one command stored in the memory 110 as described above to sort the foreign matter It is possible to control overall operation of the device 100 .

프로세서(130)는 다양한 방식으로 구현될 수 있다. 예를 들어, 프로세서(130)는 주문형 집적 회로(Application Specific Integrated Circuit, ASIC), 임베디드 프로세서, 마이크로 프로세서, 하드웨어 컨트롤 로직, 하드웨어 유한 상태 기계(Hardware Finite State Machine, FSM), 디지털 신호 프로세서(Digital Signal Processor, DSP) 중 적어도 하나로 구현될 수 있다. The processor 130 may be implemented in various ways. For example, the processor 130 may include an application specific integrated circuit (ASIC), an embedded processor, a microprocessor, hardware control logic, a hardware finite state machine (FSM), and a digital signal processor (Digital Signal). Processor, DSP).

프로세서(130)는 일종의 중앙처리장치로서 메모리(110)에 탑재된 제어 소프트웨어를 구동하여 이물질 선별 장치(100) 전체의 동작을 제어할 수 있다. 프로세서(130)는 데이터를 처리할 수 있는 모든 종류의 장치를 포함할 수 있다. 여기서, '프로세서(processor)'는, 예를 들어 프로그램 내에 포함된 코드 또는 명령어로 표현된 기능을 수행하기 위해 물리적으로 구조화된 회로를 갖는, 하드웨어에 내장된 데이터 처리 장치를 의미할 수 있다. 이와 같이 하드웨어에 내장된 데이터 처리 장치의 일 예로써, 마이크로프로세서(microprocessor), 중앙처리장치(central processing unit: CPU), 프로세서 코어(processor core), 멀티프로세서(multiprocessor), ASIC(application-specific integrated circuit), FPGA(field programmable gate array) 등의 처리 장치를 망라할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다.The processor 130 as a kind of central processing unit may control the operation of the entire foreign material sorting apparatus 100 by driving control software mounted on the memory 110 . The processor 130 may include any type of device capable of processing data. Here, the 'processor' may refer to a data processing device embedded in hardware having a physically structured circuit to perform a function expressed by, for example, a code or an instruction included in a program. As an example of the data processing apparatus embedded in the hardware as described above, a microprocessor, a central processing unit (CPU), a processor core, a multiprocessor, an application-specific integrated (ASIC) circuit) and a processing device such as a field programmable gate array (FPGA), but the scope of the present invention is not limited thereto.

본 실시 예에서 프로세서(130)는 이물질 선별 장치(100)가 최적의 이물질 선별 결과를 출력하도록, 획득된 이물질 선별 대상 객체 이미지(식품 이미지)에 대하여 딥러닝(Deep Learning) 등 머신 러닝(machine learning)을 수행할 수 있고, 메모리(110)는, 머신 러닝에 사용되는 데이터, 결과 데이터 등을 저장할 수 있다.In this embodiment, the processor 130 performs machine learning, such as deep learning, on the acquired foreign material sorting target object image (food image) so that the foreign material sorting apparatus 100 outputs an optimal foreign material sorting result. ), and the memory 110 may store data used for machine learning, result data, and the like.

즉 본 실시 예에서, 프로세서(130)는 딥러닝 기반 이미지 처리 기술을 활용한 이물질 선별을 수행하는 것으로, 이물질을 선별하고자 하는 이물질 선별 대상 객체를 촬영한 이미지(식품 이미지)를 획득하고, 특정 객체를 정상(정상 식품) 또는 비정상(이물질)으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩할 수 있다. 본 실시 예에서, 이물질 선별 장치(100)는 카메라(미도시)를 구비하여 대상 객체를 촬영할 수 있고 대상 객체에 대한 이미지를 획득할 수 있다.That is, in this embodiment, the processor 130 performs foreign material selection using deep learning-based image processing technology, and acquires an image (food image) of a foreign material selection target object to be screened, and a specific object It is possible to load an image processing-based learning model trained to classify as normal (normal food) or abnormal (foreign matter). In the present embodiment, the foreign material sorting apparatus 100 may include a camera (not shown) to photograph a target object and acquire an image of the target object.

그리고 프로세서(130)는 획득한 대상 객체 이미지에 상기 로딩한 학습 모델을 적용하여 대상 객체에 대해 정상 또는 비정상 여부를 출력하고, 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시할 수 있다. 예를 들어, 대파분태 사이의 이물질들을 분류하고자 하는 경우, 복수 개의 대파분태들과 대파분태를 제외한 나머지 이물질들을 분류하고, 이물질에 대해서만 선별하여 표시하거나 대파분태와 이물질을 구분할 수 있도록 서로 다르게 표시하여, 사용자에게 제공할 수 있다. 따라서 사용자는 표시된 이물질을 확인하여 이물질이 제거되도록 할 수 있다.Then, the processor 130 applies the loaded learning model to the acquired target object image to output whether the target object is normal or abnormal, and based on whether the target object is normal or abnormal, selects the abnormal object as a foreign material can be displayed. For example, if you want to classify foreign substances between scallions, classify the remaining foreign substances except for a plurality of scallions and scallions, and select and display only foreign substances or display them differently so that you can distinguish between leeks and foreign substances. , can be provided to users. Therefore, the user can check the displayed foreign material to remove the foreign material.

즉 본 실시 예는, 식품 제조 현장에서 발생하는 이물질을 분류하는 인공신경망의 효과적인 학습방법을 제안하는 것으로, 인공신경망은 분류하고자 하는 클래스의 특징을 제공 받은 데이터를 통해 스스로 찾고 이를 학습할 수 있다. 잘 학습된 인공신경망은 처음 보는 데이터도 실제 클래스로 잘 분류할 수 있다.That is, this embodiment proposes an effective learning method of an artificial neural network for classifying foreign substances generated at a food manufacturing site, and the artificial neural network can find and learn the characteristics of a class to be classified by itself through data provided. A well-trained artificial neural network can classify even first-time data into real classes.

이와 같이, 본 실시 예에서의 특정 객체를 정상 또는 비정상으로 분류하도록 훈련된 이미지 처리 기반 학습 모델은 딥러닝 기반 인공신경망에 기반하여 구현될 수 있다. As such, the image processing-based learning model trained to classify a specific object as normal or abnormal in the present embodiment may be implemented based on a deep learning-based artificial neural network.

특히 인공신경망은 분류하고자 하는 클래스의 데이터가 균형을 이룰 때 클래스별 특징을 잘 학습하기 때문에, 본 실시 예에서는, 정상 클래스와 비정상 클래스의 데이터가 균형을 이룰 수 있도록 하여 학습 모델을 학습할 수 있다. 즉 본 실시 예에서는, 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집하고, 정상 식품 이미지와 이물질 이미지를 합성하여 정상 식품 이미지와 이물질 이미지 간의 데이터가 균형을 이룰 수 있도록 할 수 있다.In particular, since the artificial neural network learns the characteristics of each class well when the data of the class to be classified is balanced, in this embodiment, the learning model can be learned by allowing the data of the normal class and the abnormal class to be balanced. . That is, in the present embodiment, a virtual foreign material image similar to an actual foreign material image may be collected, and a normal food image and a foreign material image may be synthesized so that data between the normal food image and the foreign material image can be balanced.

또한, 인공신경망은 서로 독립된 위치에 존재하는 정상식품과 이물질을 학습할 경우, 정상 식품의 특정부위 특징을 학습하여 정상 제품과 이물질을 분류할 수 있으나, 정상 식품과 이물질이 겹쳐진 경우에는 정상 식품의 특정부위 특징을 학습했기 때문에 정상 식품과 겹쳐진 이물질을 이물질이 아닌 정상 식품으로 오판할 수 있다. 따라서 본 실시 예에서는, 정상 식품 이미지와 이물질 이미지를 인위적으로 합성하여 겹쳐진 이물질 이미지를 생성하고 해당 이미지를 이물질 클래스로 분류하여 학습에 사용할 수 있다. In addition, when the artificial neural network learns normal food and foreign substances that exist in independent positions, it can classify normal products and foreign substances by learning the characteristics of specific parts of normal food. Because it has learned the characteristics of specific parts, it is possible to mistakenly judge a foreign substance that overlaps with a normal food as a normal food rather than a foreign substance. Therefore, in this embodiment, an overlapping foreign material image is created by artificially synthesizing a normal food image and a foreign material image, and the image can be classified into a foreign material class and used for learning.

이와 같이, 인공신경망이 정상 식품과 이물질을 잘 학습된 상황에서 합성 이물질 데이터를 이물질 클래스로 분류하여 함께 학습하는 경우, 인공신경망은 정상 식품의 특정부위의 특징보다 정상 식품이라도 이물질 형태의 객체가 있는지 없는지의 여부가 중요한 학습 평가의 척도가 된다. 따라서 단순히 정상 식품의 특징만의 학습이 아닌 정상 식품이어도 내부에 이물질의 특징을 갖는 요소가 있는지를 파악하는 학습 효과를 기대할 수 있다.In this way, when the artificial neural network classifies the synthetic foreign material data into a foreign material class and learns them together in a situation in which normal food and foreign substances are well learned, the artificial neural network determines whether there is an object in the form of a foreign substance even in normal food rather than the characteristic of a specific part of normal food. The absence or absence is an important measure of learning evaluation. Therefore, it is possible to expect the learning effect of not only learning the characteristics of normal food, but also identifying whether there are elements with the characteristics of foreign substances in the normal food.

보다 구체적으로 설명하면, 프로세서(130)는 이물질 선별을 위한 학습 모델을 학습하는 모델 생성부(131)를 포함할 수 있으며, 모델 생성부(131)는 먼저 특정 객체에 대한 실제 정상 이미지 및 실제 이물질 이미지를 획득할 수 있다. 예를 들어, 본 실시 예에서는, 대파분태 제조현장에서 대파분태 이미지와 실제 발견되는 이물질 이미지를 수집할 수 있으며, 수집한 이미지들을 메모리(110)에 저장할 수 있다. 대파분태 이미지는 제조현장에서 필요로 하는 정상적인 식품을 의미하고, 이물질 이미지는 대파분태를 제외한 모든 객체를 의미한다.More specifically, the processor 130 may include a model generating unit 131 that learns a learning model for foreign material screening, and the model generating unit 131 first includes an actual normal image for a specific object and an actual foreign material. image can be obtained. For example, in the present embodiment, it is possible to collect the image of the image of the image of the image of the image of the scallion and the foreign material image that is actually found, and the collected images may be stored in the memory 110 . The image of green onion means normal food required at the manufacturing site, and the foreign material image means all objects except for green onion.

그리고 모델 생성부(131)는 실제 정상 이미지를 정상 데이터 셋으로 레이블링 하고, 실제 이물질 이미지를 비정상 데이터 셋으로 레이블링 할 수 있다. 예를 들어, 본 실시 예에서는, 대파분태 이미지(실제 정상 이미지)를 정상 식품으로 분류할 수 있도록 '정상'으로 레이블링 할 수 있고, 대파분태를 제외한 객체들의 이미지(실제 이물질 이미지)를 이물질으로 분류할 수 있도록 '비정상'으로 레이블링 할 수 있다.In addition, the model generator 131 may label an actual normal image as a normal data set, and may label an actual foreign material image as an abnormal data set. For example, in this embodiment, it is possible to label the green onion image (actually normal image) as 'normal' so that it can be classified as normal food, and the images of objects except for the green onion (actual foreign material image) are classified as foreign substances. You can label it as 'abnormal' so you can do it.

이때, 본 실시 예에서는, 정상 클래스와 비정상 클래스 간의 균형을 이룰 수 있도록 하기 위하여, 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이 값에 기반하여 이물질 선별 알고리즘 학습 수행 여부를 설정할 수 있다. At this time, in this embodiment, in order to achieve a balance between the normal class and the abnormal class, it is possible to set whether to perform the foreign material selection algorithm learning based on a difference value between the number of normal data sets and the number of abnormal data sets.

모델 생성부(131)는 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이가 설정치 미만인 경우, 정상 데이터 셋 및 비정상 데이터 셋으로 이물질 선별 알고리즘을 학습할 수 있다. 즉 본 실시 예에서는, 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이가 설정치 미만으로, 학습을 수행하기에 적절한 데이터 균형이 이루어졌다고 판단되는 경우 학습이 수행되도록 할 수 있다. 다만 이에 한정되는 것은 아니며 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이 값에 상관없이 학습이 수행되도록 할 수 있으나, 학습 정확도 향상을 위해서 데이터 수의 균형이 맞추어졌을 때 학습이 수행되도록 하는 것이 바람직할 것이다.When the difference between the number of normal data sets and the number of abnormal data sets is less than a set value, the model generator 131 may learn a foreign material screening algorithm using the normal data set and the abnormal data set. That is, in the present embodiment, when the difference between the number of normal data sets and the number of abnormal data sets is less than a set value, and it is determined that an appropriate data balance for performing learning is achieved, learning may be performed. However, the present invention is not limited thereto, and learning can be performed regardless of the difference between the number of normal data sets and the number of abnormal data sets. However, in order to improve learning accuracy, learning is performed when the number of data is balanced in order to improve learning accuracy. It would be desirable

따라서, 모델 생성부(131)는 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이가 설정치 이상인 경우, 이물질 이미지를 수집 및 생성하여 비정상 데이터 셋을 추가할 수 있다.Accordingly, when the difference between the number of normal data sets and the number of abnormal data sets is equal to or greater than a set value, the model generator 131 may collect and generate foreign material images to add the abnormal data set.

이때, 모델 생성부(131)는 획득한 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집하고, 수집한 가상 이물질 이미지를 비정상 데이터 셋으로 레이블링 할 수 있다. 모델 생성부(131)는 실제 이물질 이미지를 기반으로 키워드를 설정하여, 서버로부터 실제 이물질 이미지에 대한 이미지 크롤링(crawling)을 수행하여, 도 4에 도시된 것과 같은 가상 이물질 이미지를 수집할 수 있다.In this case, the model generator 131 may collect a virtual foreign material image similar to the acquired real foreign material image, and may label the collected virtual foreign material image as an abnormal data set. The model generating unit 131 may collect a virtual foreign material image as shown in FIG. 4 by setting keywords based on the actual foreign material image, performing image crawling on the actual foreign material image from the server.

이미지 크롤링은 인터넷에 데이터가 방대해지면서 그런 정보들을 활용하기 위해 데이터를 수집하는 행위를 말하며, 예를 들어, 본 실시 예에서는, 서버(예를 들어, 인터넷이나 이미지 데이터베이스 서버 등)에서 실제 이물질과 유사한 가상의 이물질 이미지를 검색할 수 있다. 즉, 본 실시 예에서, 이물질 선별 장치(100) 및/또는 서버(300)는 다양한 형태의 콘텐츠를 제공하는 서버에 접속하여(또는 연동하여), 이물질 이미지를 크롤링 방식을 통해 수집할 수 있다. 여기서, 서버는 상술하는 서버뿐만 아니라, 소셜 네트워크 서비스(Social Network Service: SNS) 서버, 이미지 콘텐츠 제공 서버, 클라우드 서버 등도 포함할 수 있다.Image crawling refers to the act of collecting data in order to utilize such information as the amount of data on the Internet increases. A virtual foreign object image can be searched. That is, in the present embodiment, the foreign material sorting apparatus 100 and/or the server 300 may access (or interwork with) a server that provides various types of content and collect foreign material images through a crawling method. Here, the server may include not only the above-described server, but also a social network service (SNS) server, an image content providing server, a cloud server, and the like.

이때, 이미지 크롤링에 필요한 키워드는 현장에서 획득한 이물질을 학습하여 분류(Classification)를 통해 이물질에 대한 객체 특징을 추출하고 매칭시켜주는 방법을 고려하여 설정될 수 있다. 여기서, 가상 이물질은 실제 현장에서 발견한 이물질과 유사하지만 실제 현장에서 발견된 이물질은 아니며, 즉 다른 환경에서 발견되지만 현장의 이물질과 유사한 형태를 갖는 객체를 의미할 수 있다. In this case, the keywords required for image crawling may be set in consideration of a method of learning foreign substances obtained in the field and extracting object features of the foreign substances through classification and matching. Here, the virtual foreign material is similar to the foreign material found in the real field, but is not a foreign material found in the real field, that is, it may mean an object found in another environment but having a shape similar to the foreign material in the field.

이미지 크롤링은 한정되지 않고 다양한 방법에 의해 구현될 수 있으나, 본 실시 예에서는, 웹 기반의 이미지 크롤링을 수행할 수 있으며, 웹 상에 존재하는 방대한 양의 데이터들 중 분석에 필요한 데이터들만을 수집할 수 있다. 즉 본 실시 예에서는, 키워드에 대응하는 이미지를 검색하고, 검색된 이미지의 소스 URL을 추출할 수 있으며, 키워드에 대한 검색에 응답하여 웹 서버로부터 웹 소스(이미지가 포함된 웹 페이지의 소스 데이터)를 획득할 수 있다. 그리고 본 실시 예에서는,획득된 웹 소스에 기반하여 웹 서버로부터 제공되는 이미지를 포함하는 웹 페이지(즉, 검색 결과 페이지)의 구조를 분석하기 위해 파싱(parsing)을 수행할 수 있으며, 이후, 파싱을 통해 웹 페이지에 포함된 각 이미지의 소스 URL을 추출할 수 있다. 이때, 이미지의 소스 URL을 추출할 때에는, 웹 페이지 내에서의 각 이미지들의 태그 정보와 위치 정보 등이 더 추출될 수 있다. 웹 페이지로부터 이미지의 소스 URL을 추출하는 과정의 경우, 웹 페이지의 구조가 동일한 경우에 대해서는 어떠한 객체 이미지가 입력되더라도 동일하게 적용될 수 있으며, 웹 서버의 특성을 고려하여, 해당 웹 서버에서 제공하는 웹 페이지의 구조에 맞추어 크롤링 프로세스(즉, 객체 이미지들의 소스 URL 값을 추출하는 과정)가 구현될 수 있다.Image crawling is not limited and may be implemented by various methods, but in this embodiment, web-based image crawling may be performed, and only data necessary for analysis among a vast amount of data existing on the web may be collected. can That is, in the present embodiment, it is possible to search for an image corresponding to the keyword, extract the source URL of the searched image, and retrieve the web source (source data of the web page including the image) from the web server in response to the search for the keyword. can be obtained And in this embodiment, parsing may be performed to analyze the structure of a web page (ie, a search result page) including an image provided from a web server based on the obtained web source, and then, parsing can extract the source URL of each image included in the web page. In this case, when extracting the source URL of the image, tag information and location information of each image in the web page may be further extracted. In the case of the process of extracting the source URL of the image from the web page, if the structure of the web page is the same, the same can be applied no matter what object image is input. A crawling process (ie, a process of extracting source URL values of object images) may be implemented according to the structure of the page.

또한 모델 생성부(131)는 실제 이물질 이미지의 형태 및 색상을 랜덤으로 변경하여 가상 이물질 이미지를 생성하고, 생성한 가상 이물질 이미지를 수집할 수 있다. 예를 들어, 본 실시 예에서는, 이물질은 정상 식품에 비해 형태가 일정하게 정해져 있지 않기 때문에, 랜덤의 형태(N각형(삼각형, 사각형 등등))와 색상 등을 변경하여 실제 이물질 이미지에 합성함으로써 가상 이물질을 생성할 수도 있다.Also, the model generator 131 may generate a virtual foreign material image by randomly changing the shape and color of the actual foreign material image, and collect the generated virtual foreign material image. For example, in this embodiment, since the shape of foreign substances is not fixed compared to normal food, by changing the random shape (N-gonal (triangle, square, etc.)) and color and synthesizing it with the actual foreign material image, virtual It can also create foreign substances.

도 5는 본 개시의 일 실시 예에 따른 이물질 합성 과정을 설명하기 위한 도면이고, 도 6은 본 개시의 일 실시 예에 따른 합성 이미지를 나타낸 예시도이다.5 is a view for explaining a foreign material synthesis process according to an embodiment of the present disclosure, and FIG. 6 is an exemplary view showing a composite image according to an embodiment of the present disclosure.

도 5에 도시된 바와 같이, 모델 생성부(131)는 수집한 가상 이물질 이미지 및 획득한 실제 이물질 이미지를 실제 정상 이미지에 합성하고, 합성한 이미지를 비정상 데이터 셋으로 레이블링 할 수 있다. 예를 들어, 본 실시 예에서는, 메모리(110)에 저장된 실제 정상 이미지(예를 들어, 대파분태 이미지)와 가상 이물질 이미지를 합성하여 도 6에 도시된 것과 같은 겹쳐진 이물질 이미지를 생성할 수 있다.As shown in FIG. 5 , the model generator 131 may synthesize the collected virtual foreign material image and the acquired real foreign material image into an actual normal image, and may label the synthesized image as an abnormal data set. For example, in the present embodiment, an overlapping foreign material image as shown in FIG. 6 may be created by synthesizing an actual normal image (eg, a large wave image) and a virtual foreign material image stored in the memory 110 .

이때, 본 실시 예에서는, 실제 이물질 이미지를 획득할 때와 가상 이물질 이미지를 수집할 때, 실제 이물질 이미지 및 가상 이물질 이미지 각각에 대한 사본을 생성할 수 있으며, 생성된 실제 이물질 이미지 사본 및 생성된 가상 이물질 사본으로 합성을 수행할 수 있다. 즉 본 실시 예에서는, 가상 이물질 이미지의 원본은 메모리(110)에 저장하고 사본은 이미지 합성에 사용할 수 있다. 따라서, 메모리(110)에 저장된 가상 이물질 이미지 원본은 이물질 식별 알고리즘 학습 시 정상 식품 이미지와 이물질 이미지 간의 데이터 불균형 해소를 위해 사용될 수 있다.At this time, in this embodiment, when acquiring a real foreign material image and when collecting a virtual foreign material image, a copy for each of the real foreign material image and the virtual foreign material image may be created, and the generated real foreign material image copy and the generated virtual foreign material image copy Synthesis can be performed with foreign copies. That is, in the present embodiment, the original of the virtual foreign material image may be stored in the memory 110 and the copy may be used for image synthesis. Accordingly, the original virtual foreign material image stored in the memory 110 may be used to resolve data imbalance between the normal food image and the foreign material image when learning the foreign material identification algorithm.

한편 본 실시 예에서는, 실제 이물질 이미지에 기반하여 수집된 가상 이물질 이미지만을 이용하여 실제 정상 이미지와 합성할 수 있으나, 가상 이물질 이미지뿐만 아니라 실제로 획득된 실제 이물질 이미지들도 이용하여 실제 정상 이미지와 합성을 수행할 수 있다.On the other hand, in this embodiment, only the virtual foreign material image collected based on the real foreign material image can be synthesized with the real normal image. can be done

본 실시 예에서, 모델 생성부(131)는 실제 이물질 이미지 및 가상 이물질 이미지를 실제 정상 이미지의 임의의 위치에 합성할 수 있다. 그리고 모델 생성부(131)는 모든 실제 정상 이미지에 대해, 실제 이물질 이미지 및 가상 이물질 이미지를 임의의 위치에 합성하는 과정을 설정 횟수 반복할 수 있다. 즉 이물질이 식품의 모든 위치에 위치할 수 있기 때문에, 임의의 위치들에 합성할 수 있으며, 획득된 모든 실제 정상 이미지에 대해서 모든 이물질 이미지들로 합성을 수행하거나, 실시 예에 따라서 의의로 실제 정상 이미지 및 이물질 이미지가 선택되어 합성이 수행될 수 있다. 합성을 수행하는 횟수는 설정에 따라 달라질 수 있으며, 정상 데이터 셋과 비정상 데이터 셋의 데이터 수 차이가 기준치에 도달할 때까지로 설정될 수 있다.In the present embodiment, the model generator 131 may synthesize the real foreign material image and the virtual foreign material image at an arbitrary position of the actual normal image. In addition, the model generating unit 131 may repeat the process of synthesizing the real foreign material image and the virtual foreign material image at an arbitrary location for all actual normal images a set number of times. That is, since foreign substances can be located in all positions of the food, they can be synthesized at arbitrary positions, and synthesizing is performed with all foreign substances images for all acquired real normal images, or according to an embodiment, the actual normal images are meaningfully normal. An image and a foreign object image may be selected and compositing may be performed. The number of times the synthesis is performed may vary depending on the setting, and may be set until the difference in the number of data between the normal data set and the abnormal data set reaches a reference value.

또한 본 실시 예에서는, 도 5에 도시된 바와 같이, 합성을 수행할 수 있다. 즉 모델 생성부(131)는 RGB 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 그레이 스케일(GrayScale) 기반의 이미지로 변경하고, 그레이 스케일 기반의 이미지에서, 이물질 부분은 1의 값을 갖고 배경 부분은 0의 값을 갖는 바이너리 값의 제 1 마스크 이미지를 생성할 수 있다. In addition, in this embodiment, as shown in FIG. 5 , synthesis may be performed. That is, the model generating unit 131 changes the RGB-based virtual foreign material image and the real foreign material image to a grayscale-based image, and in the grayscale-based image, the foreign material part has a value of 1 and the background part has a value of 0 A first mask image of a binary value having a value of may be generated.

그리고 모델 생성부(131)는 제 1 마스크 이미지와, RGB 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 AND 연산하여, 배경 부분은 0의 값을 갖고 이물질 부분은 RGB값을 갖는 제 1 이미지를 생성할 수 있다. 또한 모델 생성부(131)는 그레이 스케일 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 반전하여 배경은 1의 값을 갖고 이물질 부분은 0의 값을 갖는 바이너리 값의 제 2 마스크 이미지를 생성할 수 있다.And the model generating unit 131 performs an AND operation on the first mask image, the RGB-based virtual foreign material image, and the real foreign material image to generate a first image in which the background part has a value of 0 and the foreign substance part has an RGB value. can In addition, the model generator 131 may invert the gray scale-based virtual foreign material image and the actual foreign material image to generate a second mask image having a binary value having a value of 1 for the background and 0 for the foreign material.

그리고 모델 생성부(131)는 제 2 마스크 이미지와, RGB 기반의 실제 정상 이미지의 AND 연산을 통해 이물질 부분의 RGB 값은 0이고 나머지 부분은 실제 정상 이미지의 RGB 값을 갖는 제 2 이미지를 생성할 수 있으며, 마지막으로 제 1 이미지와 제 2 이미지를 합성할 수 있다.And the model generating unit 131 generates a second image having the RGB value of the foreign material part of 0 and the remaining part having the RGB value of the actual normal image through the AND operation of the second mask image and the RGB-based real normal image. and finally, the first image and the second image may be synthesized.

즉 본 실시 예에서, 모델 생성부(131)는 실제 정상 이미지, 실제 이물질 이미지, 가상 이물질 이미지, 합성 이미지를 포함하는 전체 데이터를 이용하여 이물질 선별 알고리즘을 학습할 수 있다. 예를 들어, 본 실시 예에서는, 전체 데이터(대파분태 이미지, 실제 이물질 이미지, 가상 이물질 이미지, 겹쳐진 이물질 이미지)를 사용해 이물질 검출을 위한 인공신경망을 학습할 수 있다. 따라서 본 실시 예에서는, 가상 이물질과 겹쳐진 이물질에 의해 기존 데이터 수 대비 전체 데이터 수가 증가되도록 할 수 있으며, 인공신경망 학습에 문제가 되었던 데이터 불균형 문제가 해소되도록 할 수 있다.That is, in the present embodiment, the model generator 131 may learn the foreign material selection algorithm by using the entire data including the actual normal image, the real foreign material image, the virtual foreign material image, and the composite image. For example, in this embodiment, an artificial neural network for detecting foreign substances can be learned using all data (a large wave image, an actual foreign material image, a virtual foreign material image, and an overlapping foreign material image). Therefore, in the present embodiment, the total number of data compared to the number of existing data can be increased by the foreign material overlapping the virtual foreign material, and the problem of data imbalance, which has been a problem in artificial neural network learning, can be resolved.

그리고 모델 생성부(131)는 상기의 과정을 통해 학습된 이물질 선별 알고리즘의 가중치를 내부 인공신경망에 저장할 수 있다. 즉 본 실시 예에서, 프로세서(130)는 이물질 선별 대상 객체를 촬영한 이미지를 입력으로 하여, 이물질 선별 알고리즘을 통해 해당 이미지의 이물질 여부 또는 해당 이미지 내의 이물질 포함 여부를 판단할 수 있으며, 그 결과를 출력할 수 있다. 예를 들어, 본 실시 예에서는, 식품 제조 현장에서 식품 이미지를 촬영하고, 해당 이미지가 인공신경망의 입력 값으로 제공되어 이미지 내 이물질 포함 여부가 판단되면, 도 7에 도시된 것과 같이, 최종 이물질 선별 결과를 표시하여 출력할 수 있다. 도 7의 초록색 박스는 대파분태를 의미하며 빨간색 박스는 이물질을 의미한다.In addition, the model generator 131 may store the weights of the foreign material selection algorithm learned through the above process in the internal artificial neural network. That is, in the present embodiment, the processor 130 may determine whether a foreign material is a foreign material in the image or whether the foreign material is included in the image through a foreign material selection algorithm by receiving an image of a foreign material selection target object as an input, and the result is can be printed out. For example, in this embodiment, when a food image is taken at a food manufacturing site and the image is provided as an input value of an artificial neural network to determine whether a foreign material is included in the image, as shown in FIG. 7 , the final foreign material is selected Results can be displayed and printed. A green box in FIG. 7 means a green onion, and a red box means a foreign substance.

한편, 본 실시 예에서는, 이물질 선별 학습 모델의 정확도 향상을 위해 테스트를 수행할 수 있으며, 정상 데이터 셋과 비정상 데이터 셋에서 일부를 테스트 셋으로 설정하여 테스트를 수행할 수 있다. 이때, 테스트 셋 설정 방법은 한정되지 않고 다양한 방법이 적용될 수 있다. Meanwhile, in the present embodiment, a test may be performed to improve the accuracy of the foreign material selection learning model, and a test may be performed by setting some of the normal data set and the abnormal data set as the test set. In this case, the test set setting method is not limited and various methods may be applied.

도 8은 본 개시의 일 실시 예에 따른 미세한 이물질 선별 방법을 설명하기 위한 예시도이다.8 is an exemplary view for explaining a method for selecting a fine foreign material according to an embodiment of the present disclosure.

도 8을 참조하면 본 실시 예에서는, 매우 미세하거나 색상이 유사한 이물질이 식품에 겹쳐져 있는 합성 이미지들을 이용하여 보다 정확하게 이물질을 선별할 수 있는데, 이때 미세한 이물질을 선별하는 방법은 합성한 이물질을 원하는 이물질의 최소 크기로 그리드로 분류하여 딥러닝의 학습 데이터로 입력할 수 있다. 그리고 그리드로 인해 조각난 부분을 확대하여 네트워크의 입력 값으로 입력할 수 있다. 이 경우, 그리드를 확대하여 미세한 이물질도 크게 확대되는 효과를 가질 수 있는 것이다. 이때 딥러닝 네트워크는 한정되지 않고 분류 네트워크 중 가장 최신의 성능을 발휘하는 네트워크로 선정될 수 있다.Referring to FIG. 8 , in this embodiment, foreign substances can be more accurately selected using composite images in which very fine or similar foreign substances are overlapped on food. It can be input as training data for deep learning by classifying it into a grid with the smallest size of . In addition, the fragmented part due to the grid can be enlarged and input as an input value of the network. In this case, by enlarging the grid, it is possible to have the effect of greatly expanding even fine foreign substances. In this case, the deep learning network is not limited and may be selected as a network that exhibits the latest performance among classification networks.

따라서, 본 실시 예에서는, 부족한 클래스의 데이터를 수집하여 클래스 간 발생하는 데이터 불균형으로 인한 문제를 해소할 뿐만 아니라 실제 데이터와 가상 데이터를 합성하는 방법을 통해 신경망이 보다 정확하게 정상 식품을 제외한 모든 객체를 이물질로 분류할 수 있도록 학습이 수행되도록 할 수 있다.Therefore, in this embodiment, the neural network collects data of insufficient classes to solve the problem of data imbalance that occurs between classes, as well as synthesizes real data and virtual data, so that the neural network more accurately collects all objects except for normal food. Learning can be performed so that it can be classified as a foreign substance.

도 9는 본 개시의 일 실시 예에 따른 이물질 선별 방법을 설명하기 위한 흐름도이다.9 is a flowchart illustrating a method for screening foreign substances according to an embodiment of the present disclosure.

도 9를 참조하면, S10단계에서, 이물질 선별 시스템(1)은 이물질 선별 대상 객체를 촬영한 이미지를 획득한다. 즉 본 실시 예에서, 이물질 선별 시스템(1)은 이물질을 선별하고자 하는 이물질 선별 대상 객체를 촬영한 이미지(식품 이미지)를 획득할 수 있다.Referring to FIG. 9 , in step S10 , the foreign material sorting system 1 acquires an image of the foreign material sorting target object. That is, in the present embodiment, the foreign material sorting system 1 may acquire an image (food image) obtained by photographing a foreign material sorting target object for which a foreign material is to be sorted.

S20단계에서, 이물질 선별 시스템(1)은 특정 객체를 정상 또는 비정상으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩한다. 즉 본 실시 예에서, 이물질 선별 시스템(1)은 특정 객체를 정상(정상 식품) 또는 비정상(이물질)으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩할 수 있다. In step S20, the foreign material screening system 1 loads an image processing-based learning model trained to classify a specific object as normal or abnormal. That is, in the present embodiment, the foreign material screening system 1 may load an image processing-based learning model trained to classify a specific object as normal (normal food) or abnormal (foreign substance).

S30단계에서, 이물질 선별 시스템(1)은 획득한 대상 객체 이미지에 학습 모델을 적용하여 대상 객체에 대해 정상 또는 비정상 여부를 판단하고, S40단계에서, 학습 모델을 통해 출력된 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시한다.In step S30, the foreign material screening system 1 applies the learning model to the acquired target object image to determine whether the target object is normal or abnormal, and in step S40, normal or abnormal for the target object output through the learning model Based on the abnormality, abnormal objects are selected and displayed as foreign substances.

즉, 본 실시 예에서, 이물질 선별 시스템(1)은 획득한 대상 객체 이미지에 상기 로딩한 학습 모델을 적용하여 대상 객체에 대해 정상 또는 비정상 여부를 출력하고, 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시할 수 있다. 예를 들어, 대파분태 사이의 이물질들을 분류하고자 하는 경우, 복수 개의 대파분태들과 대파분태를 제외한 나머지 이물질들을 분류하고, 이물질에 대해서만 선별하여 표시하거나 대파분태와 이물질을 구분할 수 있도록 서로 다르게 표시하여, 사용자에게 제공할 수 있다. 따라서 사용자는 표시된 이물질을 확인하여 이물질이 제거되도록 할 수 있다.That is, in this embodiment, the foreign material screening system 1 applies the loaded learning model to the acquired target object image to output whether the target object is normal or abnormal, and based on whether the target object is normal or abnormal Accordingly, abnormal objects can be selected and displayed as foreign substances. For example, if you want to classify foreign substances between scallions, classify the remaining foreign substances except for a plurality of scallions and scallions, and select and display only foreign substances or display them differently so that you can distinguish between leeks and foreign substances. , can be provided to users. Therefore, the user can check the displayed foreign material to remove the foreign material.

한편, 본 실시 예에서는, 부족한 클래스의 데이터를 수집하여 클래스 간 발생하는 데이터 불균형으로 인한 문제를 해소할 뿐만 아니라 실제 데이터와 가상 데이터를 합성하는 방법을 통해 신경망이 보다 정확하게 정상 식품을 제외한 모든 객체를 이물질로 분류할 수 있도록 학습을 수행할 수 있는데, 도 10을 참조하여 설명하도록 한다.On the other hand, in this embodiment, the neural network collects data of insufficient classes and solves problems caused by data imbalance between classes, as well as synthesizes real data and virtual data, so that the neural network more accurately collects all objects except normal food. Learning can be performed so that it can be classified as a foreign substance, which will be described with reference to FIG. 10 .

도 10은 본 개시의 일 실시 예에 따른 이물질 선별 학습 모델의 학습 방법을 설명하기 위한 흐름도이다. 도 10에 도시된 바와 같이, S21단계에서, 이물질 선별 시스템(1)은 특정 객체에 대한 실제 정상 이미지 및 실제 이물질 이미지를 획득한다. 이때 이물질 선별 시스템(1)은 실제 정상 이미지를 정상 데이터 셋으로 레이블링 하고, 실제 이물질 이미지를 비정상 데이터 셋으로 레이블링 할 수 있다.10 is a flowchart illustrating a learning method of a foreign material selection learning model according to an embodiment of the present disclosure. As shown in FIG. 10 , in step S21 , the foreign material sorting system 1 acquires an actual normal image and an actual foreign material image for a specific object. At this time, the foreign material sorting system 1 may label an actual normal image as a normal data set, and may label an actual foreign material image as an abnormal data set.

특히 본 실시 예에서는, 정상 클래스와 비정상 클래스 간의 균형을 이룰 수 있도록 하기 위하여, 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이 값에 기반하여 이물질 선별 알고리즘 학습 수행 여부를 설정할 수 있다.In particular, in this embodiment, in order to achieve a balance between the normal class and the abnormal class, it is possible to set whether to learn the foreign material selection algorithm based on a difference value between the number of normal data sets and the number of abnormal data sets.

따라서, 이물질 선별 시스템(1)은 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이가 설정치 미만인 경우, 정상 데이터 셋 및 비정상 데이터 셋으로 이물질 선별 알고리즘을 학습할 수 있다. 즉 본 실시 예에서는, 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이가 설정치 미만으로, 학습을 수행하기에 적절한 데이터 균형이 이루어졌다고 판단되는 경우 학습이 수행되도록 할 수 있다. 다시 말해, 본 실시 예에서는, 정상 데이터 셋의 수와 비정상 데이터 셋의 수의 차이가 설정치 이상인 경우, 이물질 이미지를 수집 및 생성하여 비정상 데이터 셋을 추가할 수 있다.Accordingly, when the difference between the number of normal data sets and the number of abnormal data sets is less than a set value, the foreign material sorting system 1 may learn the foreign material sorting algorithm using the normal data set and the abnormal data set. That is, in the present embodiment, when the difference between the number of normal data sets and the number of abnormal data sets is less than a set value, and it is determined that an appropriate data balance for performing learning is achieved, learning may be performed. In other words, in the present embodiment, when the difference between the number of normal data sets and the number of abnormal data sets is equal to or greater than a set value, the foreign material image may be collected and generated to add the abnormal data set.

즉 S22단계에서, 이물질 선별 시스템(1)은 획득한 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집한다. 이때, 이물질 선별 시스템(1)은 획득한 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집하고, 수집한 가상 이물질 이미지를 비정상 데이터 셋으로 레이블링 할 수 있다. 그리고 이물질 선별 시스템(1)은 실제 이물질 이미지를 기반으로 키워드를 설정하여, 서버로부터 실제 이물질 이미지에 대한 이미지 크롤링 (crawling)을 수행하여, 가상 이물질 이미지를 수집할 수 있다. 예를 들어, 본 실시 예에서는, 서버(예를 들어, 인터넷이나 이미지 데이터베이스 서버 등)에서 실제 이물질과 유사한 가상의 이물질 이미지를 검색할 수 있다.That is, in step S22, the foreign material sorting system 1 collects a virtual foreign material image similar to the acquired real foreign material image. In this case, the foreign material sorting system 1 may collect a virtual foreign material image similar to the acquired real foreign material image, and label the collected virtual foreign material image as an abnormal data set. In addition, the foreign material sorting system 1 may collect a virtual foreign material image by setting keywords based on the actual foreign material image, and performing image crawling on the actual foreign material image from the server. For example, in the present embodiment, a virtual foreign material image similar to an actual foreign material may be searched for in a server (eg, the Internet or an image database server).

그 외에도 본 실시 예에서는, 실제 이물질 이미지의 형태 및 색상을 랜덤으로 변경하여 가상 이물질 이미지를 생성하고, 생성한 가상 이물질 이미지를 수집할 수 있다. 예를 들어, 본 실시 예에서는, 이물질은 정상 식품에 비해 형태가 일정하게 정해져 있지 않기 때문에, 랜덤의 형태(N각형(삼각형, 사각형 등등))와 색상 등을 변경하여 실제 이물질 이미지에 합성함으로써 가상 이물질을 생성할 수도 있다.In addition, in the present embodiment, a virtual foreign material image may be generated by randomly changing the shape and color of the actual foreign material image, and the generated virtual foreign material image may be collected. For example, in this embodiment, since the shape of foreign substances is not fixed compared to normal food, by changing the random shape (N-gonal (triangle, square, etc.)) and color and synthesizing it with the actual foreign material image, virtual It can also create foreign substances.

그리고 S23단계에서, 이물질 선별 시스템(1)은 이물질 이미지와 정상 이미지를 합성한다. 즉 이물질 선별 시스템(1)은 이물질 이미지(수집한 가상 이물질 이미지 및 획득한 실제 이물질 이미지)를 실제 정상 이미지에 합성하고, 합성한 이미지를 비정상 데이터 셋으로 레이블링 할 수 있다. And in step S23, the foreign material sorting system 1 synthesizes the foreign material image and the normal image. That is, the foreign material sorting system 1 may synthesize the foreign material image (collected virtual foreign material image and acquired real foreign material image) into an actual normal image, and label the synthesized image as an abnormal data set.

이때, 이물질 선별 시스템(1)은 실제 이물질 이미지 및 가상 이물질 이미지를 실제 정상 이미지의 임의의 위치에 합성할 수 있으며, 모든 실제 정상 이미지에 대해, 이물질 이미지를 임의의 위치에 합성하는 과정을 설정 횟수 반복할 수 있다. At this time, the foreign material sorting system 1 can synthesize the real foreign material image and the virtual foreign material image at any position of the real normal image, and for all real normal images, the process of synthesizing the foreign material image at an arbitrary position is set number of times Can be repeated.

또한 이물질 선별 시스템(1)은 RGB 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 그레이 스케일(GrayScale) 기반의 이미지로 변경하고, 그레이 스케일 기반의 이미지에서, 이물질 부분은 1의 값을 갖고 배경 부분은 0의 값을 갖는 바이너리 값의 제 1 마스크 이미지를 생성할 수 있다. 그리고 이물질 선별 시스템(1)은 제 1 마스크 이미지와, RGB 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 AND 연산하여, 배경 부분은 0의 값을 갖고 이물질 부분은 RGB값을 갖는 제 1 이미지를 생성할 수 있다. 또한 이물질 선별 시스템(1)은 그레이 스케일 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 반전하여 배경은 1의 값을 갖고 이물질 부분은 0의 값을 갖는 바이너리 값의 제 2 마스크 이미지를 생성할 수 있다. 그리고 이물질 선별 시스템(1)은 제 2 마스크 이미지와, RGB 기반의 실제 정상 이미지의 AND 연산을 통해 이물질 부분의 RGB 값은 0이고 나머지 부분은 실제 정상 이미지의 RGB 값을 갖는 제 2 이미지를 생성할 수 있으며, 제 1 이미지와 제 2 이미지를 합성할 수 있다.In addition, the foreign material sorting system 1 changes the RGB-based virtual foreign material image and the real foreign material image to a gray scale-based image, and in the gray scale-based image, the foreign material part has a value of 1 and the background part has a value of 0 A first mask image of a binary value having a value of may be generated. And the foreign material sorting system 1 performs an AND operation on the first mask image, the RGB-based virtual foreign material image, and the real foreign material image to generate a first image with a background part having a value of 0 and a foreign substance part having an RGB value. can In addition, the foreign material sorting system 1 may invert the gray scale-based virtual foreign material image and the real foreign material image to generate a second mask image of a binary value in which the background has a value of 1 and the foreign material part has a value of 0. And the foreign material sorting system 1 generates a second image with the RGB value of the foreign material part being 0 and the remaining part having the RGB value of the actual normal image through the AND operation of the second mask image and the RGB-based real normal image. and the first image and the second image may be synthesized.

마지막으로, S24단계에서, 이물질 선별 시스템(1)은 실제 정상 이미지, 실제 이물질 이미지, 가상 이물질 이미지, 합성 이미지를 포함하는 전체 데이터를 이용하여 이물질 선별 알고리즘을 학습한다. 예를 들어, 본 실시 예에서는, 전체 데이터(대파분태 이미지, 실제 이물질 이미지, 가상 이물질 이미지, 겹쳐진 이물질 이미지)를 사용해 이물질 검출을 위한 인공신경망을 학습할 수 있다. 따라서 본 실시 예에서는, 가상 이물질과 겹쳐진 이물질에 의해 기존 데이터 수 대비 전체 데이터 수가 증가되도록 할 수 있으며, 인공신경망 학습에 문제가 되었던 데이터 불균형 문제가 해소되도록 할 수 있다. 그리고 이물질 선별 시스템(1)은 상기의 과정을 통해 학습된 이물질 선별 알고리즘의 가중치를 내부 인공신경망에 저장할 수 있다.Finally, in step S24, the foreign material sorting system 1 learns the foreign material sorting algorithm by using the entire data including the real normal image, the real foreign material image, the virtual foreign material image, and the composite image. For example, in this embodiment, an artificial neural network for detecting foreign substances can be learned using all data (a large wave image, an actual foreign material image, a virtual foreign material image, and an overlapping foreign material image). Therefore, in the present embodiment, the total number of data compared to the number of existing data can be increased by the foreign material overlapping the virtual foreign material, and the problem of data imbalance, which has been a problem in artificial neural network learning, can be resolved. In addition, the foreign material selection system 1 may store the weight of the foreign material selection algorithm learned through the above process in the internal artificial neural network.

이상 설명된 본 발명에 따른 실시 예는 컴퓨터 상에서 다양한 구성요소를 통하여 실행될 수 있는 컴퓨터 프로그램의 형태로 구현될 수 있으며, 이와 같은 컴퓨터 프로그램은 컴퓨터로 판독 가능한 매체에 기록될 수 있다. 이때, 매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등과 같은, 프로그램 명령어를 저장하고 실행하도록 특별히 구성된 하드웨어 장치를 포함할 수 있다.The above-described embodiment according to the present invention may be implemented in the form of a computer program that can be executed through various components on a computer, and such a computer program may be recorded in a computer-readable medium. In this case, the medium includes a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floppy disk, and a ROM. , RAM, flash memory, and the like, and hardware devices specially configured to store and execute program instructions.

한편, 상기 컴퓨터 프로그램은 본 발명을 위하여 특별히 설계되고 구성된 것이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수 있다. 컴퓨터 프로그램의 예에는, 컴파일러에 의하여 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용하여 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함될 수 있다.Meanwhile, the computer program may be specially designed and configured for the present invention, or may be known and used by those skilled in the computer software field. Examples of the computer program may include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.

본 발명의 명세서(특히 특허청구범위에서)에서 "상기"의 용어 및 이와 유사한 지시 용어의 사용은 단수 및 복수 모두에 해당하는 것일 수 있다. 또한, 본 발명에서 범위(range)를 기재한 경우 상기 범위에 속하는 개별적인 값을 적용한 발명을 포함하는 것으로서(이에 반하는 기재가 없다면), 발명의 상세한 설명에 상기 범위를 구성하는 각 개별적인 값을 기재한 것과 같다.In the specification of the present invention (especially in the claims), the use of the term "above" and similar referential terms may be used in both the singular and the plural. In addition, when a range is described in the present invention, each individual value constituting the range is described in the detailed description of the invention as including the invention to which individual values belonging to the range are applied (unless there is a description to the contrary). same as

본 발명에 따른 방법을 구성하는 단계들에 대하여 명백하게 순서를 기재하거나 반하는 기재가 없다면, 상기 단계들은 적당한 순서로 행해질 수 있다. 반드시 상기 단계들의 기재 순서에 따라 본 발명이 한정되는 것은 아니다. 본 발명에서 모든 예들 또는 예시적인 용어(예들 들어, 등등)의 사용은 단순히 본 발명을 상세히 설명하기 위한 것으로서 특허청구범위에 의해 한정되지 않는 이상 상기 예들 또는 예시적인 용어로 인해 본 발명의 범위가 한정되는 것은 아니다. 또한, 당업자는 다양한 수정, 조합 및 변경이 부가된 특허청구범위 또는 그 균등물의 범주 내에서 설계 조건 및 팩터에 따라 구성될 수 있음을 알 수 있다.The steps constituting the method according to the present invention may be performed in an appropriate order unless the order is explicitly stated or there is no description to the contrary. The present invention is not necessarily limited to the order in which the steps are described. The use of all examples or exemplary terms (eg, etc.) in the present invention is merely for the purpose of describing the present invention in detail, and the scope of the present invention is limited by the examples or exemplary terms unless limited by the claims. it is not going to be In addition, those skilled in the art will appreciate that various modifications, combinations, and changes may be made in accordance with design conditions and factors within the scope of the appended claims or their equivalents.

따라서, 본 발명의 사상은 상기 설명된 실시 예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 또는 이로부터 등가적으로 변경된 모든 범위는 본 발명의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the scope of the spirit of the present invention is not limited to the scope of the scope of the present invention. will be said to belong to

1 : 이물질 선별 시스템
100 : 이물질 선별 장치
110 : 메모리
120 : 통신부
130 : 프로세서
131 : 모델 생성부
140 : 사용자 인터페이스
200 : 사용자 단말
300 : 서버
400 : 네트워크
1: Foreign material sorting system
100: foreign material sorting device
110: memory
120: communication department
130: processor
131: model generation unit
140 : user interface
200: user terminal
300 : server
400: network

Claims (20)

딥러닝 기반 이미지 처리 기술을 활용한 이물질 선별 방법으로서,
이물질 선별 대상 객체를 촬영한 이미지를 획득하는 단계;
특정 객체를 정상 또는 비정상으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩하는 단계;
상기 획득한 대상 객체 이미지에 상기 학습 모델을 적용하여 상기 대상 객체에 대해 정상 또는 비정상 여부를 출력하는 단계; 및
상기 학습 모델을 통해 출력된 상기 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시하는 단계를 포함하는,
이물질 선별 방법.
As a foreign material screening method using deep learning-based image processing technology,
acquiring an image of a foreign material selection target object;
loading an image processing-based learning model trained to classify a specific object as normal or abnormal;
outputting whether the target object is normal or abnormal by applying the learning model to the acquired target object image; and
Based on whether the target object output through the learning model is normal or abnormal, selecting and displaying the abnormal object as a foreign material,
How to sort foreign substances.
제 1 항에 있어서,
상기 학습 모델을 학습하는 단계를 더 포함하고,
상기 학습 모델을 학습하는 단계는,
특정 객체에 대한 실제 정상 이미지 및 실제 이물질 이미지를 획득하는 단계;
상기 실제 정상 이미지를 정상 데이터 셋으로 레이블링 하고, 상기 실제 이물질 이미지를 비정상 데이터 셋으로 레이블링 하는 단계; 및
상기 정상 데이터 셋의 수와 상기 비정상 데이터 셋의 수의 차이가 설정치 미만인 경우, 상기 정상 데이터 셋 및 상기 비정상 데이터 셋으로 이물질 선별 알고리즘을 학습하는 단계를 포함하는,
이물질 선별 방법.
The method of claim 1,
Further comprising the step of learning the learning model,
The step of learning the learning model is,
acquiring a real normal image and a real foreign material image for a specific object;
labeling the actual normal image as a normal data set and labeling the actual foreign material image as an abnormal data set; and
When the difference between the number of the normal data set and the number of the abnormal data set is less than a set value, the step of learning a foreign material screening algorithm with the normal data set and the abnormal data set,
How to sort foreign substances.
제 2 항에 있어서,
상기 학습 모델을 학습하는 단계는,
상기 정상 데이터 셋의 수와 상기 비정상 데이터 셋의 수의 차이가 설정치 이상인 경우, 이물질 이미지를 수집 및 생성하여 상기 비정상 데이터 셋을 추가하는 단계를 포함하는,
이물질 선별 방법.
3. The method of claim 2,
The step of learning the learning model is,
When the difference between the number of the normal data sets and the number of the abnormal data sets is equal to or greater than a set value, collecting and generating a foreign material image and adding the abnormal data set,
How to sort foreign substances.
제 3 항에 있어서,
상기 추가하는 단계는,
상기 획득한 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집하는 단계; 및
상기 수집한 가상 이물질 이미지를 상기 비정상 데이터 셋으로 레이블링 하는 단계를 포함하는,
이물질 선별 방법.
4. The method of claim 3,
The adding step is
collecting a virtual foreign material image similar to the acquired real foreign material image; and
Labeling the collected virtual foreign material image with the abnormal data set,
How to sort foreign substances.
제 4 항에 있어서,
상기 수집하는 단계는,
상기 실제 이물질 이미지를 기반으로 키워드를 설정하여, 외부 서버로부터 상기 실제 이물질 이미지에 대한 이미지 크롤링(crawling)을 수행하는 단계를 포함하는,
이물질 선별 방법.
5. The method of claim 4,
The collecting step is
Setting a keyword based on the actual foreign material image, comprising the step of performing image crawling on the actual foreign material image from an external server,
How to sort foreign substances.
제 4 항에 있어서,
상기 수집하는 단계는,
상기 실제 이물질 이미지의 형태 및 색상을 랜덤으로 변경하여 가상 이물질 이미지를 생성하는 단계를 포함하는,
이물질 선별 방법.
5. The method of claim 4,
The collecting step is
generating a virtual foreign material image by randomly changing the shape and color of the actual foreign material image;
How to sort foreign substances.
제 4 항에 있어서,
상기 추가하는 단계는,
상기 수집한 가상 이물질 이미지 및 상기 획득한 실제 이물질 이미지를 상기 실제 정상 이미지에 합성하는 단계; 및
상기 합성한 이미지를 상기 비정상 데이터 셋으로 레이블링 하는 단계를 포함하는,
이물질 선별 방법.
5. The method of claim 4,
The adding step is
synthesizing the collected virtual foreign material image and the acquired real foreign material image with the real normal image; and
Including the step of labeling the synthesized image as the abnormal data set,
How to sort foreign substances.
제 7 항에 있어서,
상기 합성하는 단계는,
상기 실제 이물질 이미지 및 상기 가상 이물질 이미지를 상기 실제 정상 이미지의 임의의 위치에 합성하는 단계; 및
모든 실제 정상 이미지에 대해, 상기 실제 이물질 이미지 및 상기 가상 이물질 이미지를 임의의 위치에 합성하는 단계를 설정 횟수 반복하는 단계를 포함하는,
이물질 선별 방법.
8. The method of claim 7,
The synthesizing step is
synthesizing the real foreign material image and the virtual foreign material image at an arbitrary position in the real normal image; and
For all real normal images, comprising repeating the step of synthesizing the real foreign material image and the virtual foreign material image at an arbitrary location a set number of times,
How to sort foreign substances.
제 7 항에 있어서,
상기 합성하는 단계는,
RGB 기반의 상기 가상 이물질 이미지 및 상기 실제 이물질 이미지를 그레이 스케일(GrayScale) 기반의 이미지로 변경하는 단계;
그레이 스케일 기반의 이미지에서, 이물질 부분은 1의 값을 갖고 배경 부분은 0의 값을 갖는 바이너리 값의 제 1 마스크 이미지를 생성하는 단계;
상기 제 1 마스크 이미지와, 상기 RGB 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 AND 연산하여, 배경 부분은 0의 값을 갖고 이물질 부분은 RGB값을 갖는 제 1 이미지를 생성하는 단계;
상기 그레이 스케일 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 반전하여 배경은 1의 값을 갖고 이물질 부분은 0의 값을 갖는 바이너리 값의 제 2 마스크 이미지를 생성하는 단계;
상기 제 2 마스크 이미지와, RGB 기반의 상기 실제 정상 이미지의 AND 연산을 통해 이물질 부분의 RGB 값은 0이고 나머지 부분은 상기 실제 정상 이미지의 RGB 값을 갖는 제 2 이미지를 생성하는 단계; 및
상기 제 1 이미지와 상기 제 2 이미지를 합성하는 단계를 포함하는,
이물질 선별 방법.
8. The method of claim 7,
The synthesizing step is
changing the RGB-based virtual foreign material image and the real foreign material image to a grayscale-based image;
generating a first mask image of a binary value in the gray scale-based image, in which the foreign material part has a value of 1 and the background part has a value of 0;
generating a first image in which a background portion has a value of 0 and a foreign material portion has an RGB value by performing an AND operation on the first mask image, the RGB-based virtual foreign material image, and the real foreign material image;
generating a second mask image of a binary value by inverting the gray scale-based virtual foreign material image and the real foreign material image, wherein the background has a value of 1 and the foreign material part has a value of 0;
generating a second image in which the RGB value of the foreign material part is 0 and the remaining part has the RGB value of the actual normal image through AND operation of the second mask image and the RGB-based real normal image; and
Comprising the step of synthesizing the first image and the second image,
How to sort foreign substances.
제 7 항에 있어서,
상기 실제 이물질 이미지를 획득할 때와 상기 가상 이물질 이미지를 수집할 때, 상기 실제 이물질 이미지 및 상기 가상 이물질 이미지 각각에 대한 사본을 생성하는 단계를 더 포함하고,
상기 합성하는 단계는,
상기 생성된 실제 이물질 이미지 사본 및 상기 생성된 가상 이물질 사본으로 합성을 수행하는 단계를 포함하는,
이물질 선별 방법.
8. The method of claim 7,
generating a copy for each of the real foreign object image and the virtual foreign object image when acquiring the real foreign object image and when collecting the virtual foreign object image;
The synthesizing step is
Comprising the step of performing compositing with the generated copy of the real foreign material image and the generated virtual foreign material copy,
How to sort foreign substances.
딥러닝 기반 이미지 처리 기술을 활용한 이물질 선별 장치로서,
메모리; 및
상기 메모리와 연결되고, 상기 메모리에 포함된 컴퓨터 판독 가능한 명령들을 실행하도록 구성된 적어도 하나의 프로세서를 포함하고,
상기 적어도 하나의 프로세서는,
이물질 선별 대상 객체를 촬영한 이미지를 획득하는 동작,
특정 객체를 정상 또는 비정상으로 분류하도록 훈련된 이미지 처리 기반 학습 모델을 로딩하는 동작,
상기 획득한 대상 객체 이미지에 상기 학습 모델을 적용하여 상기 대상 객체에 대해 정상 또는 비정상 여부를 출력하는 동작, 및
상기 학습 모델을 통해 출력된 상기 대상 객체에 대한 정상 또는 비정상 여부에 기반하여, 비정상 객체를 이물질로 선별하여 표시하는 동작을 수행하도록 구성되는,
이물질 선별 장치.
As a foreign material sorting device using deep learning-based image processing technology,
Memory; and
at least one processor coupled to the memory and configured to execute computer readable instructions contained in the memory;
The at least one processor,
The operation of acquiring an image of the object to be screened for foreign substances,
loading an image processing-based learning model trained to classify a specific object as normal or abnormal;
outputting whether the target object is normal or abnormal by applying the learning model to the acquired target object image; and
configured to perform an operation of selecting and displaying an abnormal object as a foreign material based on whether the target object output through the learning model is normal or abnormal,
foreign material sorting device.
제 11 항에 있어서,
상기 적어도 하나의 프로세서는,
상기 학습 모델을 학습하는 동작을 더 수행하도록 구성되고,
상기 학습 모델을 학습하는 동작은,
특정 객체에 대한 실제 정상 이미지 및 실제 이물질 이미지를 획득하는 동작,
상기 실제 정상 이미지를 정상 데이터 셋으로 레이블링 하고, 상기 실제 이물질 이미지를 비정상 데이터 셋으로 레이블링 하는 동작, 및
상기 정상 데이터 셋의 수와 상기 비정상 데이터 셋의 수의 차이가 설정치 미만인 경우, 상기 정상 데이터 셋 및 상기 비정상 데이터 셋으로 이물질 선별 알고리즘을 학습하는 동작을 포함하는,
이물질 선별 장치.
12. The method of claim 11,
The at least one processor,
configured to further perform the operation of learning the learning model,
The operation of learning the learning model is,
the operation of acquiring a real normal image and a real foreign object image for a specific object;
Labeling the actual normal image as a normal data set and labeling the actual foreign material image as an abnormal data set, and
When a difference between the number of the normal data sets and the number of abnormal data sets is less than a set value, learning a foreign material screening algorithm using the normal data set and the abnormal data set,
foreign material sorting device.
제 12 항에 있어서,
상기 학습 모델을 학습하는 동작은,
상기 정상 데이터 셋의 수와 상기 비정상 데이터 셋의 수의 차이가 설정치 이상인 경우, 이물질 이미지를 수집 및 생성하여 상기 비정상 데이터 셋을 추가하는 동작을 포함하는,
이물질 선별 장치.
13. The method of claim 12,
The operation of learning the learning model is,
When the difference between the number of the normal data sets and the number of the abnormal data sets is equal to or greater than a set value, collecting and generating a foreign material image and adding the abnormal data set,
foreign material sorting device.
제 13 항에 있어서,
상기 추가하는 동작은,
상기 획득한 실제 이물질 이미지와 유사한 가상 이물질 이미지를 수집하는 동작, 및
상기 수집한 가상 이물질 이미지를 상기 비정상 데이터 셋으로 레이블링 하는 동작을 포함하는,
이물질 선별 장치.
14. The method of claim 13,
The adding operation is
collecting a virtual foreign material image similar to the acquired real foreign material image; and
Including the operation of labeling the collected virtual foreign material image with the abnormal data set,
foreign material sorting device.
제 14 항에 있어서,
상기 수집하는 동작은,
상기 실제 이물질 이미지를 기반으로 키워드를 설정하여, 외부 서버로부터 상기 실제 이물질 이미지에 대한 이미지 크롤링(crawling)을 수행하는 동작을 포함하는,
이물질 선별 장치.
15. The method of claim 14,
The collecting operation is
setting a keyword based on the actual foreign material image, and performing image crawling on the actual foreign material image from an external server;
foreign material sorting device.
제 14 항에 있어서,
상기 수집하는 동작은,
상기 실제 이물질 이미지의 형태 및 색상을 랜덤으로 변경하여 가상 이물질 이미지를 생성하는 동작을 포함하는,
이물질 선별 장치.
15. The method of claim 14,
The collecting operation is
and generating a virtual foreign material image by randomly changing the shape and color of the actual foreign material image.
foreign material sorting device.
제 14 항에 있어서,
상기 추가하는 동작은,
상기 수집한 가상 이물질 이미지 및 상기 획득한 실제 이물질 이미지를 상기 실제 정상 이미지에 합성하는 동작, 및
상기 합성한 이미지를 상기 비정상 데이터 셋으로 레이블링 하는 동작을 포함하는,
이물질 선별 장치.
15. The method of claim 14,
The adding operation is
an operation of synthesizing the collected virtual foreign material image and the acquired real foreign material image to the real normal image; and
Including the operation of labeling the synthesized image as the abnormal data set,
foreign material sorting device.
제 17 항에 있어서,
상기 합성하는 동작은,
상기 실제 이물질 이미지 및 상기 가상 이물질 이미지를 상기 실제 정상 이미지의 임의의 위치에 합성하는 동작, 및
모든 실제 정상 이미지에 대해, 상기 실제 이물질 이미지 및 상기 가상 이물질 이미지를 임의의 위치에 합성하는 과정을 설정 횟수 반복하는 동작을 포함하는,
이물질 선별 장치.
18. The method of claim 17,
The synthesizing operation is
synthesizing the real foreign material image and the virtual foreign material image at an arbitrary position of the real normal image; and
For all real normal images, comprising repeating the process of synthesizing the real foreign material image and the virtual foreign material image at an arbitrary location a set number of times,
foreign material sorting device.
제 17 항에 있어서,
상기 합성하는 동작은,
RGB 기반의 상기 가상 이물질 이미지 및 상기 실제 이물질 이미지를 그레이 스케일(GrayScale) 기반의 이미지로 변경하는 동작,
그레이 스케일 기반의 이미지에서, 이물질 부분은 1의 값을 갖고 배경 부분은 0의 값을 갖는 바이너리 값의 제 1 마스크 이미지를 생성하는 동작,
상기 제 1 마스크 이미지와, 상기 RGB 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 AND 연산하여, 배경 부분은 0의 값을 갖고 이물질 부분은 RGB값을 갖는 제 1 이미지를 생성하는 동작,
상기 그레이 스케일 기반의 가상 이물질 이미지 및 실제 이물질 이미지를 반전하여 배경은 1의 값을 갖고 이물질 부분은 0의 값을 갖는 바이너리 값의 제 2 마스크 이미지를 생성하는 동작,
상기 제 2 마스크 이미지와, RGB 기반의 상기 실제 정상 이미지의 AND 연산을 통해 이물질 부분의 RGB 값은 0이고 나머지 부분은 상기 실제 정상 이미지의 RGB 값을 갖는 제 2 이미지를 생성하는 동작, 및
상기 제 1 이미지와 상기 제 2 이미지를 합성하는 동작을 포함하는,
이물질 선별 장치.
18. The method of claim 17,
The synthesizing operation is
Changing the RGB-based virtual foreign material image and the real foreign material image to a grayscale-based image;
In the gray scale-based image, generating a first mask image of a binary value in which the foreign material part has a value of 1 and the background part has a value of 0;
generating a first image in which the background part has a value of 0 and the foreign substance part has an RGB value by performing an AND operation on the first mask image, the RGB-based virtual foreign material image, and the real foreign material image;
Inverting the gray-scale-based virtual foreign material image and the real foreign material image to generate a second mask image of a binary value in which the background has a value of 1 and the foreign material part has a value of 0;
generating a second image in which the RGB value of the foreign material part is 0 and the remaining part has the RGB value of the real normal image through AND operation of the second mask image and the RGB-based real normal image; and
Comprising the operation of synthesizing the first image and the second image,
foreign material sorting device.
제 17 항에 있어서,
상기 적어도 하나의 프로세서는,
상기 실제 이물질 이미지를 획득할 때와 상기 가상 이물질 이미지를 수집할 때, 상기 실제 이물질 이미지 및 상기 가상 이물질 이미지 각각에 대한 사본을 생성하는 동작을 더 수행하도록 구성되고,
상기 합성하는 동작은,
상기 생성된 실제 이물질 이미지 사본 및 상기 생성된 가상 이물질 사본으로 합성을 수행하는 동작을 포함하는,
이물질 선별 장치.
18. The method of claim 17,
The at least one processor,
and when acquiring the real foreign object image and when collecting the virtual foreign object image, further perform an operation of generating a copy for each of the real foreign object image and the virtual foreign object image,
The synthesizing operation is
Comprising the operation of performing compositing with the generated copy of the real foreign material image and the generated virtual foreign material copy,
foreign material sorting device.
KR1020200174893A 2020-12-14 2020-12-14 Method and apparatus for classifying foreign matter KR102451758B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200174893A KR102451758B1 (en) 2020-12-14 2020-12-14 Method and apparatus for classifying foreign matter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200174893A KR102451758B1 (en) 2020-12-14 2020-12-14 Method and apparatus for classifying foreign matter

Publications (2)

Publication Number Publication Date
KR20220084931A true KR20220084931A (en) 2022-06-21
KR102451758B1 KR102451758B1 (en) 2022-10-05

Family

ID=82221302

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200174893A KR102451758B1 (en) 2020-12-14 2020-12-14 Method and apparatus for classifying foreign matter

Country Status (1)

Country Link
KR (1) KR102451758B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102009757B1 (en) * 2019-03-21 2019-08-12 (주)싸이젠텍 Apparatus for sorting pellet with foreign matter based on artificial intelligence program
KR20200003137A (en) * 2016-05-03 2020-01-08 오펙스 코포레이션 Apparatus and method for handling articles for automatic and manual sorting of items using dynamically configurable sorting arrays
KR102116137B1 (en) 2019-11-07 2020-05-28 주식회사 대양식품 Method and apparatus for controlling foreign matter sorter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200003137A (en) * 2016-05-03 2020-01-08 오펙스 코포레이션 Apparatus and method for handling articles for automatic and manual sorting of items using dynamically configurable sorting arrays
KR102009757B1 (en) * 2019-03-21 2019-08-12 (주)싸이젠텍 Apparatus for sorting pellet with foreign matter based on artificial intelligence program
KR102116137B1 (en) 2019-11-07 2020-05-28 주식회사 대양식품 Method and apparatus for controlling foreign matter sorter

Also Published As

Publication number Publication date
KR102451758B1 (en) 2022-10-05

Similar Documents

Publication Publication Date Title
CN109471938B (en) Text classification method and terminal
EP3754549B1 (en) A computer vision method for recognizing an object category in a digital image
Kampffmeyer et al. Urban land cover classification with missing data modalities using deep convolutional neural networks
CN112434721A (en) Image classification method, system, storage medium and terminal based on small sample learning
Khan et al. Real-time plant health assessment via implementing cloud-based scalable transfer learning on AWS DeepLens
JP2017538195A (en) Hierarchical deep convolutional neural network
Alkhudaydi et al. An exploration of deep-learning based phenotypic analysis to detect spike regions in field conditions for UK bread wheat
CN111259219B (en) Malicious webpage identification model establishment method, malicious webpage identification method and malicious webpage identification system
CN112673386A (en) Integration-based data management pipeline for efficient tag propagation
CN114389966A (en) Network traffic identification method and system based on graph neural network and stream space-time correlation
Sami et al. Waste management using machine learning and deep learning algorithms
KR101942173B1 (en) Image analyzing method based on random tree cnn and image analyzing method based on forest cnn
Mimma et al. Fruits classification and detection application using deep learning
Pavel et al. Deep residual learning approach forplant disease recognition
EP3983953A1 (en) Understanding deep learning models
Selcuk et al. A comparison of yolov5 and yolov8 in the context of mobile ui detection
KR102451758B1 (en) Method and apparatus for classifying foreign matter
Monteiro et al. Fish recognition model for fraud prevention using convolutional neural networks
CN114443878A (en) Image classification method, device, equipment and storage medium
Krishnan et al. Computer aided detection of leaf disease in agriculture using convolution neural network based squeeze and excitation network
Goez Mora et al. Automatic visual classification of parking lot spaces: A comparison between bof and cnn approaches
CN111310806B (en) Classification network, image processing method, device, system and storage medium
CN116993996B (en) Method and device for detecting object in image
Olejniczak et al. Taming the HoG: The Influence of Classifier Choice on Histogram of Oriented Gradients Person Detector Performance
Balasubramaniam et al. Batch-mode active learning-based superpixel library generation for very high-resolution aerial image classification

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant