KR20230074354A - Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof - Google Patents

Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof Download PDF

Info

Publication number
KR20230074354A
KR20230074354A KR1020210160455A KR20210160455A KR20230074354A KR 20230074354 A KR20230074354 A KR 20230074354A KR 1020210160455 A KR1020210160455 A KR 1020210160455A KR 20210160455 A KR20210160455 A KR 20210160455A KR 20230074354 A KR20230074354 A KR 20230074354A
Authority
KR
South Korea
Prior art keywords
images
gamma
artificial intelligence
electronic device
ray image
Prior art date
Application number
KR1020210160455A
Other languages
Korean (ko)
Other versions
KR102594184B1 (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 KR1020210160455A priority Critical patent/KR102594184B1/en
Publication of KR20230074354A publication Critical patent/KR20230074354A/en
Application granted granted Critical
Publication of KR102594184B1 publication Critical patent/KR102594184B1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/02Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
    • G01N23/04Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and forming images of the material
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/02Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
    • G01N23/06Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and measuring the absorption
    • G01N23/083Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and measuring the absorption the radiation being X-rays
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/02Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
    • G01N23/06Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and measuring the absorption
    • G01N23/10Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and measuring the absorption the material being confined in a container, e.g. in a luggage X-ray scanners
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/10Different kinds of radiation or particles
    • G01N2223/101Different kinds of radiation or particles electromagnetic radiation
    • G01N2223/1016X-ray
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/30Accessories, mechanical or electrical features
    • G01N2223/303Accessories, mechanical or electrical features calibrating, standardising
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/40Imaging
    • G01N2223/401Imaging image processing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/40Imaging
    • G01N2223/408Imaging display on monitor
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/40Imaging
    • G01N2223/42Imaging image digitised, -enhanced in an image processor
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/60Specific applications or type of materials
    • G01N2223/639Specific applications or type of materials material in a container
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10116X-ray image

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Theoretical Computer Science (AREA)
  • Immunology (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Toxicology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Analysing Materials By The Use Of Radiation (AREA)

Abstract

The present invention relates to a method for detecting a dangerous object and an electronic device performing the same. To this end, the method for an electronic device to detect a dangerous object according to one embodiment of the present invention may comprise: a step of acquiring an X-ray image including at least one object to be inspected; a step of dividing the acquired X-ray image into a plurality of frame images with a predetermined frame interval; a step of acquiring gamma-conversion images by performing gamma correction with respect to the plurality of divided frame images; a step of acquiring an object detection result from the artificial intelligence model by inputting the gamma-conversion images in the artificial intelligence model outputting the dangerous object detection result within the X-ray image when the gamma conversion images are inputted; a step of visualizing the object detection result to generate visual contents; and a step of outputting the generated visual contents.

Description

인공 지능 모델을 기반으로 엑스레이 이미지상에서 위험 물체를 검출하는 전자 장치 및 이의 동작 방법 {ELECTRONIC DEVICE DETECTING DANGEROUS OBJECT ON X-RAY IMAGE BASED ON ARTIFICIAL INTELLIGENCE MODEL AND OPERATING METHOD THEREOF}Electronic device for detecting a dangerous object on an X-ray image based on an artificial intelligence model and its operating method

본 개시는 X선 검사 장비 및 이의 동작 방법에 관한 것이다. 보다 상세하게는 엑스레이 이미지상에서 위험 물체를 검출하는 방법 및 이를 수행하는 전자 장치에 관한 것이다.The present disclosure relates to X-ray inspection equipment and an operating method thereof. More specifically, it relates to a method for detecting a dangerous object on an X-ray image and an electronic device for performing the same.

X선 검사 장비의 종류는 소형 수하물 검사 장비와 대형 화물 검사 장비로 구분될 수 있다. 엑스레이 검색 장비를 이용한 검사의 경우 화물을 개봉하지 않고 엑스레이를 통과하여 실시간으로 무단 운송품, 은닉물을 쉽게 식별할 수 있는 장점이 있다.Types of X-ray inspection equipment can be divided into small baggage inspection equipment and large cargo inspection equipment. In the case of inspection using X-ray scanning equipment, there is an advantage in that unauthorized transport goods and concealed goods can be easily identified in real time by passing through the X-ray without opening the cargo.

엑스레이 이미지는 투과력이 강한 엑스선을 이용하여 물체를 투사한 후, 검출기를 이용하여 빔을 흡수하여 생성된 이미지이다. 엑스레이 이미지는 전자기파의 일종으로 공항에서 보안 검색에 사용되고 있다.An X-ray image is an image generated by projecting an object using X-rays having strong penetrating power and then absorbing the beam using a detector. X-ray images are a type of electromagnetic wave and are used for security checks at airports.

엑스선은 전자기파의 일종으로 파장이 짧고 주파수가 높으며 투과력이 강한 특징이 있으나, 물체가 서로 겹쳐지거나 중첩되는 경우, 물체의 밀도 차이로 인해 엑스선의 흡수력이 달라질 수 있다. 밀도가 낮은 물체는 빛을 투과하지 못할 수 있으며, 반대로 밀도가 너무 높으면 이미지가 쉽게 드러나지 않아, 엑스선을 이용한 보안 검색에 제한이 있을 수 있다.X-rays are a type of electromagnetic wave and are characterized by a short wavelength, high frequency, and strong penetrating power. However, when objects overlap or overlap each other, the absorption power of X-rays may vary due to differences in density of the objects. Objects with low density may not be able to transmit light, and conversely, if the density is too high, images may not be easily revealed, which may limit security screening using X-rays.

따라서, 물체가 겹쳐지거나, 중첩되는 경우에도 엑스레이 이미지를 이용하여 물체를 정확하게 식별하기 위한 기술 개발이 요구되고 있다.Therefore, there is a demand for developing a technology for accurately identifying an object using an X-ray image even when the objects overlap or overlap.

한국등록특허 제2063859호Korea Patent No. 2063859

일 실시 예에 따르면, 전자 장치가 엑스레이 이미지를 이용하여 위험 물체를 검출하는 방법 및 이를 수행하는 전자 장치가 제공될 수 있다.According to an embodiment, a method of detecting a dangerous object using an X-ray image by an electronic device and an electronic device performing the same may be provided.

일 실시 예에 의하면, 인공 지능 모델을 이용하여 전자 장치가 엑스레이 이미지상에서 위험 물체를 검출하는 방법 및 이를 수행하는 전자 장치가 제공될 수 있다.According to an embodiment, a method for an electronic device to detect a dangerous object on an X-ray image using an artificial intelligence model and an electronic device for performing the detection may be provided.

상술한 기술적 과제를 달성하기 위한 본 개시의 일 실시 예에 따라, 전자 장치가 위험 물체를 검출하는 방법에 있어서, 검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하는 단계; 상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하는 단계; 상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하는 단계; 상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하는 단계; 상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하는 단계; 및 상기 생성된 시각 컨텐츠를 출력하는 단계; 를 포함하는, 방법이 제공될 수 있다.According to an embodiment of the present disclosure for achieving the above technical problem, a method for detecting a dangerous object by an electronic device includes obtaining an X-ray image including at least one object to be inspected; Dividing the obtained X-ray image into a plurality of frame images having a preset frame interval; acquiring gamma-converted images by performing gamma correction on the divided plurality of frame images; obtaining an object detection result from the artificial intelligence model by inputting the gamma-converted images to an artificial intelligence model that outputs a dangerous object detection result in the X-ray image when the gamma-converted images are input; generating visual content by visualizing the object detection result; and outputting the generated visual content. Including, a method may be provided.

상술한 기술적 과제를 달성하기 위한 또 다른 실시 예에 의하면, 위험 물체를 검출하는 전자 장치에 있어서, 디스플레이; 네트워크 인터페이스; 하나 이상의 인스트럭션을 저장하는 메모리; 및 상기 하나 이상의 인스트럭션을 실행하는 적어도 하나의 프로세서; 를 포함하고, 상기 적어도 하나의 프로세서는 상기 하나 이상의 인스트럭션을 실행함으로써, 검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하고, 상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하고, 상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하고, 상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하고, 상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하고, 상기 생성된 시각 컨텐츠를 출력하는, 전자 장치가 제공될 수 있다.According to another embodiment for achieving the above-described technical problem, an electronic device for detecting a dangerous object includes a display; network interface; a memory that stores one or more instructions; and at least one processor executing the one or more instructions; wherein the at least one processor obtains an X-ray image including at least one object to be inspected by executing the one or more instructions, and converts the acquired X-ray image into a plurality of frames having a preset frame interval. An artificial intelligence model that acquires gamma-converted images by dividing into images and performing gamma correction on the divided plurality of frame images, and outputs a dangerous object detection result in the X-ray image when the gamma-converted images are input. , An electronic device may be provided that obtains an object detection result from the artificial intelligence model by inputting the gamma-converted images, generates visual content by visualizing the object detection result, and outputs the generated visual content. .

상술한 기술적 과제를 달성하기 위한 또 다른 실시 예에 의하면, 전자 장치가 위험 물체를 검출하는 방법에 있어서, 검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하는 단계; 상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하는 단계; 상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하는 단계; 상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하는 단계; 상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하는 단계; 및 상기 생성된 시각 컨텐츠를 출력하는 단계; 를 포함하는, 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체가 제공될 수 있다.According to another embodiment for achieving the above-described technical problem, a method for detecting a dangerous object by an electronic device includes obtaining an X-ray image including at least one object to be inspected; Dividing the obtained X-ray image into a plurality of frame images having a preset frame interval; acquiring gamma-converted images by performing gamma correction on the divided plurality of frame images; obtaining an object detection result from the artificial intelligence model by inputting the gamma-converted images to an artificial intelligence model that outputs a dangerous object detection result in the X-ray image when the gamma-converted images are input; generating visual content by visualizing the object detection result; and outputting the generated visual content. A computer-readable recording medium recording a program for executing the method on a computer, including, may be provided.

일 실시 예에 의하면, 엑스레이 이미지상에서 위험 물체를 정확하게 검출할 수 있다.According to an embodiment, a dangerous object may be accurately detected on an X-ray image.

일 실시 예에 의하면, 물체가 중첩되거나 겹쳐지는 경우에도, 인공 지능 모델을 기반으로 위험 물체를 효과적으로 검출할 수 있다.According to an embodiment, even when objects overlap or overlap, a dangerous object can be effectively detected based on an artificial intelligence model.

도 1은 일 실시 예에 따른 전자 장치가 위험 물체를 검출하는 과정을 개략적으로 나타내는 도면이다.
도 2는 일 실시 예에 따른 전자 장치가 위험 물체를 검출하는 방법의 흐름도이다.
도 3은 일 실시 예에 따른 전자 장치가 인공지능 모델을 학습시키는 과정을 설명하기 위한 도면이다.
도 4는 일 실시 예에 따른 Faster R-CNN 모델과 Cascade R-CNN 모델의 구조를 설명하기 위한 도면이다.
도 5는 일 실시 예에 따른 Res2Net의 구조를 설명하기 위한 도면이다.
도 6은 일 실시 예에 따른 전자 장치가 감마 보정을 수행하는 과정을 설명하기 위한 도면이다.
도 7은 일 실시 예에 따른 전자 장치가 이용하는 위험 물체들에 관한 엑스레이 이미지의 예시를 나타내는 도면이다.
도 8은 일 실시 예에 따른 전자 장치가 이용하는 인공 지능 모델의 손실 값과 모델 별 성능을 비교 설명하기 위한 도면이다.
도 9는 일 실시 예에 따른 전자 장치의 블록도이다.
도 10은 또 다른 실시 예에 따른 전자 장치가 위험 물체를 검출하는 방법의 흐름도이다.
1 is a diagram schematically illustrating a process of detecting a dangerous object by an electronic device according to an exemplary embodiment.
2 is a flowchart of a method of detecting a dangerous object by an electronic device according to an exemplary embodiment.
3 is a diagram for explaining a process of learning an artificial intelligence model by an electronic device according to an embodiment.
4 is a diagram for explaining structures of a Faster R-CNN model and a Cascade R-CNN model according to an embodiment.
5 is a diagram for explaining the structure of Res2Net according to an embodiment.
6 is a diagram for explaining a process of performing gamma correction by an electronic device according to an exemplary embodiment.
7 is a diagram illustrating examples of X-ray images of dangerous objects used by an electronic device according to an exemplary embodiment.
8 is a diagram for explaining a comparison between a loss value of an artificial intelligence model used by an electronic device and performance of each model according to an exemplary embodiment.
9 is a block diagram of an electronic device according to an embodiment.
10 is a flowchart of a method of detecting a dangerous object by an electronic device according to another embodiment.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 개시에 대해 구체적으로 설명하기로 한다. Terms used in this specification will be briefly described, and the present disclosure will be described in detail.

본 개시에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다. The terms used in the present disclosure have been selected from general terms that are currently widely used as much as possible while considering the functions in the present disclosure, but they may vary according to the intention or precedent of a person skilled in the art, the emergence of new technologies, and the like. In addition, in a specific case, there is also a term arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the invention. Therefore, terms used in the present disclosure should be defined based on the meaning of the term and the general content of the present disclosure, not simply the name of the term.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 "...부", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.When it is said that a certain part "includes" a certain component throughout the specification, it means that it may further include other components without excluding other components unless otherwise stated. In addition, terms such as "...unit" and "module" described in the specification mean a unit that processes at least one function or operation, which may be implemented as hardware or software or a combination of hardware and software. .

아래에서는 첨부한 도면을 참고하여 본 개시의 실시예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 개시를 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, with reference to the accompanying drawings, embodiments of the present disclosure will be described in detail so that those skilled in the art can easily carry out the present disclosure. However, the present disclosure may be implemented in many different forms and is not limited to the embodiments described herein. And in order to clearly describe the present disclosure in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.

도 1은 일 실시 예에 따른 전자 장치가 위험 물체를 검출하는 과정을 개략적으로 나타내는 도면이다.1 is a diagram schematically illustrating a process of detecting a dangerous object by an electronic device according to an exemplary embodiment.

일반적으로 x선은 투과율이 높기 때문에 엑스레이 영상에서 모든 물체는 원근법을 통해 영상화될 수 있다. 그러나, x선은 서로 다른 물체가 중첩될 때 밀도가 다르기 때문에 발생하는 빛의 흡수력이 다를 수 있고, 밀도가 낮은 물체는 빛을 투과하지 못할 수 있다. 반대로 물체의 밀도가 너무 높은 경우, 이미지가 쉽게 드러나지 않아 수하물 검색이 어려울 수 있다. In general, since x-rays have high transmittance, all objects in an x-ray image can be imaged through perspective. However, since x-rays have different densities when different objects overlap each other, light absorbing power may be different, and objects with low density may not transmit light. Conversely, if the density of the object is too high, the image may not be easily revealed, making it difficult to search for baggage.

또한, 보안 검색대상에 나타나는 다양한 종류의 위험물들은 그 크기가 위험물의 종류에 따라 크게 다르고, 같은 카테고리의 위험물이라도 보안 검색대를 통과할 때 크기나 모양이 다르게 나타나도록 아이템을 랜던하게 배치하여 카테고리 내에서 편차가 발생할 수 있는 한계가 있어 종래 보안 검색 기술의 경우, 이를 정확하게 인식하기 어려운 한계가 있다.In addition, the size of various types of dangerous objects that appear in security screening varies greatly depending on the type of dangerous object. In the case of conventional security search technology, there is a limitation in that it is difficult to accurately recognize it.

또한, 종래 보안 검색 기술의 경우 엑스레이 이미지의 배경이 복잡하고 위험물체가 있는 영역을 찾기 어려운 한계가 있으며, 이미지의 위험물들이 겹치거나 중첩됨으로 인해 동일한 재질의 물체가 동일한 색상을 가짐으로 인한 인식의 어려움, 동일한 밀도의 물체가 겹치는 경우, 물체를 관측하기 어려운 한계가 있었다.In addition, in the case of the conventional security search technology, the background of the X-ray image is complicated and there is a limit to finding an area with a dangerous object, and due to overlapping or overlapping of dangerous objects in the image, objects made of the same material have the same color, making it difficult to recognize , there was a limitation that it was difficult to observe the object when objects of the same density overlapped.

그러나, 본 개시에 따른 전자 장치(1000)는 물체의 밀도 또는 물체의 겹침에 의한 물체 인식 한계를 해결하기 위해 Cascade R-CNN 모델을 이용하여 물체를 정확하게 검출할 수 있고, 인공 지능 모델의 정확도를 향상시키기 위해 CP 알고리즘, 지도 학습 및 반지도 학습을 혼합하여 데이터 레이블링 문제를 해결할 수 있다.However, the electronic device 1000 according to the present disclosure may accurately detect an object using a Cascade R-CNN model to solve object recognition limitations due to object density or object overlap, and improve the accuracy of the artificial intelligence model. In order to improve, the data labeling problem can be solved by mixing CP algorithm, supervised learning and semi-supervised learning.

일 실시 예에 따른 전자 장치(1000)는 엑스선을 이용하여 획득되는 엑스레이 이미지 또는 복수의 프레임 간격의 엑스레이 이미지들을 포함하는 엑스레이 영상(102)을 획득하고, 획득된 엑스레이 이미지 또는 엑스레이 영상에서 소정의 물체를 검출할 수 있다. 예를 들어, 전자 장치(1000)는 하나 이상의 인스트럭션을 저장하는 메모리(120) 및 상기 하나 이상의 인스트럭션을 실행하는 적어도 하나의 프로세서(140)를 포함하고, 상기 메모리(120)에는 인공 지능 모델이 저장될 수 있다. 본 개시에 따른 전자 장치(1000)는 인공 지능 모델(122)을 이용하여 엑스레이 이미지 또는 엑스레이 영상을 분석함으로써 엑스레이 이미지 또는 엑스레이 영상에서 나타나는 위험 물체를 검출할 수 있다.The electronic device 1000 according to an embodiment obtains an X-ray image obtained using X-rays or an X-ray image 102 including X-ray images at a plurality of frame intervals, and obtains a predetermined object from the obtained X-ray image or X-ray image. can be detected. For example, the electronic device 1000 includes a memory 120 that stores one or more instructions and at least one processor 140 that executes the one or more instructions, and an artificial intelligence model is stored in the memory 120. It can be. The electronic device 1000 according to the present disclosure may detect a dangerous object appearing in the X-ray image or the X-ray image by analyzing the X-ray image or the X-ray image using the artificial intelligence model 122 .

일 실시 예에 의하면, 전자 장치(1000)는 위험 물질, 위험 물체, 저장 매체, 총기 또는 칼과 같은 소정의 위험 물체를 엑스레이 이미지 또는 엑스레이 영상에서 검출할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 엑스선을 이용하여 수하물을 검사하는 공항 또는 건물 검색대에 위치하여 위험 물체를 감지함으로써 공항 또는 대상 건물의 안전을 유지하는데 사용될 수 있다.According to an embodiment, the electronic device 1000 may detect a dangerous object such as a dangerous substance, a dangerous object, a storage medium, a gun, or a knife from an X-ray image or an X-ray image. According to an embodiment, the electronic device 1000 may be used to maintain the safety of an airport or target building by being located at an airport or building search counter that inspects baggage using X-rays and detects a dangerous object.

본 개시에 따른 전자 장치(1000)가 이용하는 인공 지능 모델은 캐스케이드(Cascade) R-CNN 모델일 수 있다. 전자 장치(1000)는 캐스케이드 R-CNN 모델을 이용하여 엑스레이 영상으로부터 위험 물체를 감지할 수 있고, 인공지능 모델 학습에 사용할 데이터가 부족하여 발생하는 과적합 문제를 최소화하기 위해 기존 데이터에 cp(copy-paste) 알고리즘을 사용하여 학습 데이터 샘플을 증가시킬 수 있으며, 지도 학습과 반지도(semi-supervised)학습을 혼합하여 사용함으로써 데이터 레이블링 문제를 해결할 수 있다.An artificial intelligence model used by the electronic device 1000 according to the present disclosure may be a Cascade R-CNN model. The electronic device 1000 can detect a dangerous object from an X-ray image using a cascade R-CNN model, and cp (copy -paste) algorithm can be used to increase training data samples, and the data labeling problem can be solved by using a mixture of supervised learning and semi-supervised learning.

일 실시 예에 의하면 전자 장치(1000)는 엑스레이 스캐닝 장치를 포함할 수 있으나, 전자 장치(1000)와 연결된 엑스레이 스캐닝 장치로부터, 수하물에 대한 엑스레이를 생성하고, 검출기로 빔을 흡수하여 생성되는 엑스레이 영상(102) 또는 엑스레이 이미지를 획득할 수 있다. 전자 장치(1000)는 인공 지능 모델(122)을 이용하여 엑스레이 이미지 또는 엑스레이 영상을 분석함으로써, 엑스레이 영상 내 물체가 유기물인지 무기물인지 분류할 수 있다. According to an embodiment, the electronic device 1000 may include an X-ray scanning device, but an X-ray image generated by generating X-rays for baggage from the X-ray scanning device connected to the electronic device 1000 and absorbing the beam with a detector. (102) Alternatively, an X-ray image may be acquired. The electronic device 1000 may classify whether an object in the X-ray image is organic or inorganic by analyzing the X-ray image or the X-ray image using the artificial intelligence model 122 .

일 실시 예에 의하면, 전자 장치(1000)는 엑스레이 영상(102)을 인공 지능 모델을 이용하여 분석함으로써 시각 컨텐츠(142)를 생성할 수 있다. 일 실시 예에 의하면, 전자 장치(1000)는 생성된 시각 컨텐츠(1420)를 디스플레이 또는 기타 출력부를 통해 사용자에게 제공할 수 있으며, 시각 컨텐츠에 대한 정보를 전자 장치와 연결된 외부 디바이스로 전송할 수도 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 시각 컨텐츠(142)를 제공함과 함께 인공 지능 모델(122)을 이용하여 엑스레이 영상을 분석한 결과인, 검출 결과(144)를 제공할 수도 있다. 일 실시 예에 의하면 검출 결과(144)는 엑스레이 영상으로부터 검출된 위험 물체의 종류, 위험 물체의 위치, 위험 물체 주변의 경계 박스의 위치 정보를 포함할 수 있다.According to an embodiment, the electronic device 1000 may generate visual content 142 by analyzing the X-ray image 102 using an artificial intelligence model. According to an embodiment, the electronic device 1000 may provide the generated visual content 1420 to a user through a display or other output unit, and may transmit information about the visual content to an external device connected to the electronic device. Also, according to an embodiment, the electronic device 1000 may provide a detection result 144, which is a result of analyzing an X-ray image using an artificial intelligence model 122, along with providing visual content 142. . According to an embodiment, the detection result 144 may include the type of dangerous object detected from the X-ray image, the location of the dangerous object, and location information of a bounding box around the dangerous object.

일 실시 예에 의하면 전자 장치(1000)는 물체의 밀도가 낮은 유/무기 재료는 희미하고 옅게 표시할 수 있고, 물체의 밀도가 높은 유/무기 재료는 어둡게 표시할 수 있다. 또한, 일 실시 예에 의하면, 전자 장치(1000)는 엑스레이 이미지를 분석함으로써 컬러 이미지를 생성할 수 있다. 전자 장치(1000)는 컬러 이미지 내에서 유기물은 주황색, 유기물과 무기물의 혼합물은 초록색, 무기물은 청색으로 표시할 수 있으며, 물체의 두께와 밀도로 인하여 엑스선이 투과하지 못하는 물체들은 검은색으로 표시할 수 있다. 그러나 상술한 예에 한정되는 것은 아니며, 전자 장치(1000)는 인공 지능 모델을 이용하여, 물체의 밀도 또는 물체가 유기물/무기물인지 여부 중 적어도 하나에 기초하여 물체를 서로 다른 방법으로 표시할 수 있다. According to an embodiment, the electronic device 1000 may display organic/inorganic materials having a low density in a faint and light manner, and display organic/inorganic materials having a high density in a dark color. Also, according to an embodiment, the electronic device 1000 may generate a color image by analyzing an X-ray image. The electronic device 1000 can display organic materials in orange, a mixture of organic and inorganic materials in green, and inorganic materials in blue in a color image, and can display objects that cannot transmit X-rays due to their thickness and density in black. can However, it is not limited to the above example, and the electronic device 1000 may display objects in different ways based on at least one of density of the object or whether the object is an organic/inorganic material using an artificial intelligence model. .

도 2는 일 실시 예에 따른 전자 장치가 위험 물체를 검출하는 방법의 흐름도이다.2 is a flowchart of a method of detecting a dangerous object by an electronic device according to an exemplary embodiment.

S210에서, 전자 장치(1000)는 검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득할 수 있다. 예를 들어, 전자 장치(1000)는 전자 장치와 연결된 엑스레이 스캐닝 장치로부터 엑스레이 영상을 획득할 수도 있으나, 전자 장치(1000)내 포함된 엑스레이 스캐닝 장치를 이용하여 엑스레이 영상을 획득할 수 있다. 전자 장치(1000)가 획득하는 엑스레이 영상은 복수의 엑스레이 이미지들을 포함할 수 있다.In S210, the electronic device 1000 may obtain an X-ray image including at least one object to be inspected. For example, the electronic device 1000 may obtain an X-ray image from an X-ray scanning device connected to the electronic device, or may obtain an X-ray image using an X-ray scanning device included in the electronic device 1000. An X-ray image obtained by the electronic device 1000 may include a plurality of X-ray images.

S220에서, 전자 장치(1000)는 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할 할 수 있다. S230에서, 전자 장치(1000)는 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득할 수 있다. 본 개시에 따른 전자 장치(1000)는 물체의 X선 흡수도 및 밀도가 다름으로 인해 물체가 겹치는 부분이 흐려짐에 따른 정확도 한계를 해결하기 위해, 엑스레이 영상을 향상시킬 수 있는 감마 보정(Gamma-enhanced Data Enhancement) 방법을 이용하여 엑스레이 영상 내 물체가 겹치는 부분의 색상과 선명도를 향상시킬 수 있다.In S220, the electronic device 1000 may divide the obtained X-ray image into a plurality of frame images having a preset frame interval. In S230, the electronic device 1000 may obtain gamma-converted images by performing gamma correction on the divided plurality of frame images. The electronic device 1000 according to the present disclosure provides gamma-correction (Gamma-enhanced Data Enhancement) method can be used to improve the color and sharpness of the part where objects overlap in the X-ray image.

일 실시 예에 의하면, 전자 장치(1000)는 너무 높거나 너무 낮은 그레이 레벨로 엑스레이 영상을 보정함으로써 색상 선명도를 향상시킬 수 있으며, 비선형 처리 방법을 사용하여 엑스레이 영상 내 밝은 부분과 어두운 부분의 색상 대비를 높일 수 있다.According to an embodiment, the electronic device 1000 may improve color sharpness by correcting an X-ray image with a gray level that is too high or too low, and color contrast between bright and dark parts in the X-ray image by using a nonlinear processing method. can increase

S240에서, 전자 장치(1000)는 감마 변환 이미지들이 입력되면, 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 감마 변환 이미지들을 입력함으로써 인공 지능 모델로부터 물체 검출 결과를 획득할 수 있다.In S240, when the gamma-converted images are input, the electronic device 1000 may obtain an object detection result from the artificial intelligence model by inputting the gamma-converted images to the artificial intelligence model that outputs the dangerous object detection result in the X-ray image.

S250에서, 전자 장치(1000)는 인공 지능 모델에서 출력된 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성할 수 있다. S260에서, 전자 장치(1000)는 생성된 시각 컨텐츠를 출력할 수 있다.In S250, the electronic device 1000 may generate visual content by visualizing the object detection result output from the artificial intelligence model. In S260, the electronic device 1000 may output the generated visual content.

도 3은 일 실시 예에 따른 전자 장치가 인공지능 모델을 학습시키는 과정을 설명하기 위한 도면이다.3 is a diagram for explaining a process of learning an artificial intelligence model by an electronic device according to an embodiment.

S310에서, 전자 장치(1000)는 엑스레이 영상을 획득하는 단계 이전에 소정의 위험 물체로 식별될 수 있는 학습 엑스레이 이미지들을 획득할 수 있다. 예를 들어, 전자 장치(1000)는 소정의 위험 물체를 포함하는 학습 엑스레이 영상을 획득할 수도 있다. 또한, 전자 장치(1000)는 소정의 위험 물체를 포함하지 않는 학습 엑스레이 영상을 획득할 수도 있다.In S310, the electronic device 1000 may obtain training X-ray images that may be identified as a predetermined dangerous object prior to acquiring the X-ray images. For example, the electronic device 1000 may obtain a learning X-ray image including a predetermined dangerous object. Also, the electronic device 1000 may obtain a learning X-ray image that does not include a predetermined dangerous object.

S320에서, 전자 장치(1000)는 학습 엑스레이 이미지들에 기초하여 인공 지능 모델을 학습시킬 수 있다. 예를 들어, 전자 장치(1000)는 소정의 위험 물체를 포함하는 학습 엑스레이 영상 또는 소정의 위험 물체를 포함하지 않는 학습 엑스레이 영상들을 모두 포함하는 학습 데이터에 기초하여 인공 지능 모델을 학습시킬 수 있다. 일 실시 예에 의하면, 전자 장치(1000)가 인공 지능 모델을 학습시키기 위해 이용하는 학습 데이터는 이미지 또는 복수의 이미지들을 포함하는 영상 형태의 데이터일 수 있다.In S320, the electronic device 1000 may train an artificial intelligence model based on the learning X-ray images. For example, the electronic device 1000 may train an artificial intelligence model based on training data including all training X-ray images including a dangerous object or training X-ray images not including a predetermined dangerous object. According to an embodiment, the training data used by the electronic device 1000 to train the artificial intelligence model may be an image or video-type data including a plurality of images.

전자 장치(1000)는 인공 지능 모델이 학습되면, 학습된 인공 지능 모델에 감마 변환에 따른 감마 변환 이미지들을 입력함으로써, 인공 지능 모델로부터 엑스레이 영상 내 위험 물체 검출 결과를 획득할 수 있다.When the artificial intelligence model is learned, the electronic device 1000 may obtain a dangerous object detection result in the X-ray image from the artificial intelligence model by inputting gamma-converted images according to gamma conversion into the learned artificial intelligence model.

도 4는 일 실시 예에 따른 Faster R-CNN 모델과 Cascade R-CNN 모델의 구조를 설명하기 위한 도면이다.4 is a diagram for explaining structures of a Faster R-CNN model and a Cascade R-CNN model according to an embodiment.

도 4의 그림 (410) 및 그림 (420)에는 Faster R-CNN 모델과 Cascade R-CNN 모델의 구조가 도시된다. 본 개시에 따른 전자 장치(1000)가 이용하는 Cascade R-CNN 모델은, Faster R-CNN 모델과 매우 유사하며 크게 두 단계의 동작을 수행할 수 있다. 예를 들어, Cascade R-CNN 모델로 엑스레이 이미지 또는 감마 보정 변환 이미지들이 입력되면, Cascade R-CNN 모델 내부의 특징 추출 네트워크를 이용하여 특징 추출을 통해 엑스레이 이미지에 대한 특징 맵을 획득할 수 있다. Figures 410 and 420 of FIG. 4 show the structures of the Faster R-CNN model and the Cascade R-CNN model. The Cascade R-CNN model used by the electronic device 1000 according to the present disclosure is very similar to the Faster R-CNN model and can largely perform two-step operations. For example, when X-ray images or gamma-correction converted images are input to the Cascade R-CNN model, a feature map for the X-ray image may be obtained through feature extraction using a feature extraction network inside the Cascade R-CNN model.

RPN(Region Proposal Network)은 특징 맵에서 후보 대상을 찾고 서로 다른 IOU(Intersection over Union) 임계값을 연결하여 해당 샘플을 생성할 수 있다. 본 개시에 따른 IOU 임계값은 객체 감지의 정확도를 평가하기 위한 인덱스로써, 일반적으로 전자 장치(1000)는 0 내지 1사이의 범위를 가지는 IOU 임계값에 기초하여 물체 감지 성공 여부를 판단할 수 있다.A Region Proposal Network (RPN) can generate corresponding samples by finding candidate targets in a feature map and concatenating different Intersection over Union (IOU) thresholds. The IOU threshold according to the present disclosure is an index for evaluating the accuracy of object detection, and generally, the electronic device 1000 can determine whether object detection is successful or not based on the IOU threshold having a range of 0 to 1. .

일 실시 예에 의하면, 전자 장치(1000)가 이용하는 Cascade R-CNN 모델은 다중 검색기(searcher)를 사용할 수 있으나, Faster R-CNN은 하나의 검색기(searcher)를 사용한다. Cascade R-CNN 모델 내 각 검색기(searcher)는 서로 다른 IoU 임계값의 Positive 및 Negative 샘플을 기반으로 학습될 수 있으며, 이전 검색기의 출력 값은 다음에 입력할 검색기의 값으로 사용될 수 있다.According to an embodiment, the Cascade R-CNN model used by the electronic device 1000 may use multiple searchers, but Faster R-CNN uses one searcher. Each searcher in the Cascade R-CNN model can be learned based on positive and negative samples of different IoU thresholds, and the output value of the previous searcher can be used as the value of the next searcher to be input.

상기 복수의 검색기 각각은 서로 다른 IOU(Intersection over Union) 임계값을 가지는 긍정 및 부정 샘플을 기초로 학습되고, 상기 복수의 검색기들은 상기 서로 다른 IOU 임계값을 점진적으로 증가시킴으로써 상기 인공 지능 모델의 검출 결과의 정확도를 향상시키며, 상기 인공 지능 모델의 과적합 문제를 억제할 수 있다.Each of the plurality of searchers is learned based on positive and negative samples having different Intersection over Union (IOU) thresholds, and the plurality of searchers detects the artificial intelligence model by gradually increasing the different IOU thresholds. It is possible to improve the accuracy of the result and suppress the overfitting problem of the artificial intelligence model.

그림 (410)에서 pool은 풀링 레이어이고, FC1은 풀리커넥티드 레이어, BO는 후보 영역의 경계 상자, B1은 예측된 경계 상자, C1은 최종 분류 예측값을 나타낸다. 그림 (420)에서, pool은 특징 맵에 대한 풀링 레이어이고, FC1, FC2 및 FC3는 완전 연결 계층이며, B0, B1 및 B2는 후보 영역의 경계 상자를 나타낼 수 있다. B3는 구조에서 예측된 경계 상자를 나타내고, C1 및 C2는 예측된 분류 결과를 나타내며, C3는 최종 분류 예측 값을 나타낼 수 있다. In Figure 410, pool is a pooling layer, FC1 is a fully connected layer, BO is a bounding box of a candidate region, B1 is a predicted bounding box, and C1 is the final classification predicted value. In Figure 420, pool is a pooling layer for feature maps, FC1, FC2, and FC3 are fully connected layers, and B0, B1, and B2 may represent bounding boxes of candidate regions. B3 represents a predicted bounding box in the structure, C1 and C2 represent predicted classification results, and C3 may represent a final classification prediction value.

Cascade R-CNN은 Cascade 방식을 사용하므로 이전 분류기의 출력 값을 다음 분류기의 입력 값으로 사용함으로써, 다음 분류기에 더 나은 데이터를 제공할 수 있고, 결과적으로 더 높은 효율성을 보이는 장점이 있다.Cascade R-CNN uses the cascade method, so by using the output value of the previous classifier as the input value of the next classifier, it can provide better data to the next classifier, resulting in higher efficiency.

일 실시 예에 의하면, Cascade R-CNN은 분류 및 회귀 단계에서 3개의 cascade 감지기를 사용하며 IoU 임계값을 점진적으로 증가시켜 후보 프레임을 지속적으로 최적화하고 감지 결과를 보다 정확하게 만들 수 있다. 본 개시에 따른 전자 장치(1000)는 이를 통해 너무 높거나 낮은 고정 IoU 임계값으로 인해 발생하는 과적합 및 오탐을 효과적으로 방지할 수 있다.According to an embodiment, Cascade R-CNN uses three cascade detectors in the classification and regression stages and can continuously optimize candidate frames and make detection results more accurate by gradually increasing the IoU threshold. Through this, the electronic device 1000 according to the present disclosure can effectively prevent overfitting and false positives caused by a fixed IoU threshold that is too high or too low.

일 실시 예에 의하면 전자 장치가 이용하는 인공 지능 모델은 RPN(Region Proposal Network)를 포함할 수 있고, 각 RPN 모델은 복수의 검색기들을 사용하며, 복수의 검색기 들 중 이전 검색기는 복수의 검색기들 내 상기 이전 검색기와 연결된 다음 검색기의 입력 값으로 마련될 수 있다. According to an embodiment, an artificial intelligence model used by an electronic device may include a Region Proposal Network (RPN), each RPN model uses a plurality of searchers, and a previous searcher among the plurality of searchers is the above search engine within the plurality of searchers. It can be prepared as an input value of the next searcher connected to the previous searcher.

일 실시 예에 의하면, 엑스선 영상의 고해상도와 특징 부분의 비율이 매우 작은 경우가 많기 때문에 제1 스테이지의 검출기는 고밀도(High-density) 검출기이고, 제2 스테이지의 검출기는 많은 수의 배경 영역이 쉽게 생성됨에 따른 모델의 훈련이 어렵기 때문에 사용되며, 제2 단계에서는 RPN(Region Proposal Network)을 사용하여 관련 없는 많은 배경 영역을 필터링함으로써 탐지를 수행할 수 있다. RPN에서 탐지를 위해 고정 IoU 임계값을 사용하는 것은 복잡한 배경에서 발생할 수 있는 많은 오탐지를 고려하여 위험한 객체를 탐지하는데 도움이 되지 않을 수 있다.According to an embodiment, since the ratio between the high resolution of the X-ray image and the feature part is very small in many cases, the detector of the first stage is a high-density detector, and the detector of the second stage is a large number of background regions. It is used because it is difficult to train the model as it is generated. In the second step, detection can be performed by filtering out many irrelevant background regions using a Region Proposal Network (RPN). Using a fixed IoU threshold for detection in RPN may not be helpful in detecting dangerous objects considering the many false positives that can occur in a complex background.

따라서, 본 개시에 따른 전자 장치(1000)는 Cascade R-CNN 모델을 이용하고, Cascade 예측 방법을 사용하여 관련 없는 배경 영역을 필터링할 수 있으며, 더 나은 검출 위치 좌표를 획득할 수 있는 장점이 있다. 또한, 본 개시에 따른 Cascade R-CNN 모델은 이전 검출기의 보다 정확한 후보 영역 출력은 다음 검출기의 입력으로 사용함으로써, 인공 지능 모델의 최종 출력의 정확도를 점차적으로 향상시킬 수 있을 뿐만 아니라, 과적합 문제도 효과적으로 억제할 수 있는 장점이 있다.Therefore, the electronic device 1000 according to the present disclosure has the advantage of using the Cascade R-CNN model, filtering irrelevant background areas using the Cascade prediction method, and obtaining better detection position coordinates. . In addition, the Cascade R-CNN model according to the present disclosure not only gradually improves the accuracy of the final output of the artificial intelligence model by using the more accurate candidate region output of the previous detector as the input of the next detector, but also solves the overfitting problem. It also has the advantage of being able to effectively suppress it.

도 5는 일 실시 예에 따른 Res2Net의 구조를 설명하기 위한 도면이다.5 is a diagram for explaining the structure of Res2Net according to an embodiment.

그림 (510)을 참조하면 Res2Net 구조가 도시된다. 본 개시에 따른 전자 장치(1000)가 이용하는 인공 지능 모델은 도 5에 도시된 구조를 기반으로 하는 백본 네트워크로써, 특징 추출 네트워크를 포함할 수 있고, 특징 추출 네트워크를 이용하여 엑스레이 이미지들로부터 소정의 특징들을 추출할 수 있다.Referring to Figure 510, the Res2Net structure is shown. The artificial intelligence model used by the electronic device 1000 according to the present disclosure is a backbone network based on the structure shown in FIG. 5 and may include a feature extraction network. features can be extracted.

Res2Net 네트워크는 난카이 대학과 외부의 여러 유명 대학의 연구자들이 2019년에 공동으로 제안한 새로운 유형의 표적 탐지 네트워크로써, Res2Net 네트워크 모듈은 성능이 좋은 다른 네트워크 모델과 잘 융합될 수 있다. Res2Net은 더 미세한 컨볼루션 커널을 사용하여 더 미세한 다중 스케일 기능을 추출하고 각 네트워크 계층의 수신 필드 범위를 확장할 수 있으며, 기존의 3*3 컨볼루션 커널을 대체하기 위해 여러 개의 작은 컨볼루션 커널을 사용할 수 있다.The Res2Net network is a new type of target detection network jointly proposed in 2019 by researchers from Nankai University and several well-known external universities. The Res2Net network module can be well integrated with other network models with good performance. Res2Net uses a finer convolution kernel to extract finer multi-scale features and can extend the receive field range of each network layer, and uses multiple smaller convolution kernels to replace the traditional 3*3 convolution kernel. can be used

작은 컨볼루션 커널은 계층적 잔차 네트워크처럼 서로 연결된 출력 특성을 증가시키기 때문에 특성 손실을 줄일 수 있고, Res2Net의 기본 구조는 그림 (510)에 도시된 바와 같다.A small convolutional kernel can reduce feature loss because it increases output features connected to each other like a hierarchical residual network, and the basic structure of Res2Net is shown in Figure 510.

일 실시 예에 의하면 Res2Net은 ResNet의 잔차 블록에서 3*3 컨볼루션을 여러 기능 하위 집합으로 나누어 연결 방법을 사용하며, 여러 기능 하위 집합에서 추출한 기능을 결합하면 이미지 기능이 더욱 풍부해질 수 있고, 다중 스케일 특징을 추출하는 능력을 향상시킬 수 있다. 따라서, 계산 부하를 늘리지 않고도 탐지 성능을 향상시킬 수도 있는 장점이 있어, 본 개시에 따른 전자 장치(1000)는 엑스레이 영상에서 위험물체의 특징을 추출하기 위해, Res2Net-101 모델을 이용할 수 있으나, 이에 한정되는 것은 아니다.According to an embodiment, Res2Net uses a connection method by dividing a 3*3 convolution from the residual block of ResNet into several feature subsets, and combining features extracted from multiple feature subsets can enrich image features, The ability to extract scale features can be improved. Therefore, there is an advantage in that detection performance can be improved without increasing the computational load, so the electronic device 1000 according to the present disclosure can use the Res2Net-101 model to extract the features of a dangerous object from an X-ray image. It is not limited.

도 6은 일 실시 예에 따른 전자 장치가 감마 보정을 수행하는 과정을 설명하기 위한 도면이다.6 is a diagram for explaining a process of performing gamma correction by an electronic device according to an exemplary embodiment.

본 개시에 따른 전자 장치(1000)는 물체의 X선 흡수도 및 밀도가 다름으로 인해 물체가 겹치는 부분이 흐려짐에 따른 정확도 한계를 해결하기 위해, 엑스레이 영상을 향상시킬 수 있는 감마 보정(Gamma-enhanced Data Enhancement) 방법을 이용하여 엑스레이 영상 내 물체가 겹치는 부분의 색상과 선명도를 향상시킬 수 있다.The electronic device 1000 according to the present disclosure provides gamma-correction (Gamma-enhanced Data Enhancement) method can be used to improve the color and sharpness of the part where objects overlap in the X-ray image.

예를 들어, S610에서, 전자 장치(1000)는 소정의 감마 보정 함수를 이용하여 복수의 프레임 이미지들 내 픽셀 값을 소정의 임계치 이상 또는 임계치 이하의 그레이 스케일 값으로 변환할 수 있다. 전자 장치(1000)가 이용하는 감마 보정 함수는 하기 수학식 1과 같다.For example, in S610, the electronic device 1000 may convert pixel values within a plurality of frame images into gray scale values above or below a predetermined threshold by using a predetermined gamma correction function. A gamma correction function used by the electronic device 1000 is expressed in Equation 1 below.

Figure pat00001
Figure pat00001

상기 감마 보정 함수는 상기 프레임 이미지들 내 픽셀 그라데이션 값, 상기 프레임 이미지들 내 최대 그레이 스케일 값 및 상기 프레임 이미지들 내 픽셀 그라데이션의 변화 정도를 결정하는 파라미터를 변수로 포함하고, 상기 프레임 이미지들 내 픽셀의 그레이 스케일 값을 출력값으로 포함하는, 비선형 처리 함수일 수 있다.The gamma correction function includes, as variables, a pixel gradation value within the frame images, a maximum gray scale value within the frame images, and a parameter determining a degree of change in pixel gradation within the frame images as variables, and It may be a nonlinear processing function that includes the gray scale value of as an output value.

상기 수학식 1에서 a는 입력 프레임 이미지들 내 픽셀 그라데이션 값이고, G는 프레임 이미지들 내 픽셀의 그레이 스케일 값이며, amax는 프레임 이미지들 내 픽셀 최대 그레이 스케일 값일 수 있다. 또한, 일 실시 예에 의하면, 감마 보정 함수는 감마 변환에 의해 이미지 내 그라데이션 변화 정도를 결정하는 사용자 파라미터를 더 포함할 수 있고, 일 실시 예에 의하면 0.3으로 마련될 수 있으나, 이에 한정되는 것은 아니다. In Equation 1, a may be a pixel gradation value within the input frame images, G may be a gray scale value of a pixel within the frame images, and amax may be a maximum gray scale value of a pixel within the frame images. In addition, according to an embodiment, the gamma correction function may further include a user parameter for determining the degree of gradation change in an image by gamma conversion, and according to an embodiment, it may be set to 0.3, but is not limited thereto. .

S620에서, 전자 장치(1000)는 상기 수학식 1에 따른 감마 보정 함수를 이용하여, 소정의 그레이 스케일 값으로 변환된 픽셀을 포함하는 복수의 프레임 이미지들을 감마 변환 이미지들로 획득할 수 있다.In S620, the electronic device 1000 may obtain a plurality of frame images including pixels converted to a predetermined gray scale value as gamma converted images by using the gamma correction function according to Equation 1 above.

도 7은 일 실시 예에 따른 전자 장치가 이용하는 위험 물체들에 관한 엑스레이 이미지의 예시를 나타내는 도면이다.7 is a diagram illustrating examples of X-ray images of dangerous objects used by an electronic device according to an exemplary embodiment.

도 7의 그림 (720)을 참조하면 전자 장치(1000)가 엑스레이 영상을 통해 검출하는 위험물체의 예들이 도시된다. 일 실시 예에 의하면, 전자 장치(1000)는 인공 지능 모델을 이용하여 엑스레이 영상을 분석함으로서, 칼, 가위, 날카로운 도구, 작은 유리 조각, 전기적 장비, 배터리, 우산, 플라스틱 음료 바틀, 노즐이 있는 플라스틱 바틀, 길이 연장 가능한 봉(예컨대 호신봉) 등을 위험 물체로 검출할 수 있다.Referring to a drawing 720 of FIG. 7 , examples of dangerous objects that the electronic device 1000 detects through an X-ray image are shown. According to an embodiment, the electronic device 1000 analyzes an X-ray image using an artificial intelligence model, such as a knife, scissors, sharp tools, small pieces of glass, electrical equipment, batteries, umbrellas, plastic beverage bottles, and plastics with nozzles. A bottle, a rod that can be extended in length (eg, a self-defense rod), etc. can be detected as a dangerous object.

도 8은 일 실시 예에 따른 전자 장치가 이용하는 인공 지능 모델의 손실 값과 모델 별 성능을 비교 설명하기 위한 도면이다.8 is a diagram for explaining a comparison between a loss value of an artificial intelligence model used by an electronic device and performance of each model according to an exemplary embodiment.

본 개시에 따른 전자 장치(1000)는 Cascade R-CNN 모델을 이용하여 위험물을 탐지하기 위한 인공 지능 모델을 구성할 수 있으며, 인공 지능 모델 훈련 시 손실 값은 그림 (810)에 도시된 바와 같다. 전자 장치(1000)는 인공 지능 모델 학습을 약 160,000회 수행하고, 첫 번째 단계에서 손실 값이 0.4511에 도달함에 따라 손실 값이 크게 변하지 않고 모델이 안정화되는 경향을 나타내는 것을 볼 수 있다.The electronic device 1000 according to the present disclosure may construct an artificial intelligence model for detecting dangerous substances using the Cascade R-CNN model, and a loss value during training of the artificial intelligence model is as shown in Figure 810. It can be seen that the electronic device 1000 performs training of the artificial intelligence model about 160,000 times, and as the loss value reaches 0.4511 in the first stage, the loss value does not change significantly and the model shows a tendency to stabilize.

또한, 그림 (820)을 참조하면 Faster R-CNN 모델과 Cascade R-CNN 모델을 비교한 표가 도시된다. Cascade R-CNN의 AP(IoU=0.5)는 Faster R-CNN보다 4.2%, AP(IoU=0.75)는 2.7%, Recall은 6.8% 높은 것을 볼 수 있다. 따라서, 본 개시에 따른 전자 장치(1000)가 이용하는 Cascade R-CNN이 Faster R-CNN보다 더 뛰어난 성능을 나타내는 것을 볼 수 있다.Also, referring to figure 820, a table comparing the Faster R-CNN model and the Cascade R-CNN model is shown. Cascade R-CNN's AP (IoU=0.5) is 4.2% higher than Faster R-CNN's, AP (IoU=0.75) is 2.7%, and Recall is 6.8% higher. Accordingly, it can be seen that Cascade R-CNN used by the electronic device 1000 according to the present disclosure exhibits better performance than Faster R-CNN.

도 9는 일 실시 예에 따른 전자 장치의 블록도이다.9 is a block diagram of an electronic device according to an embodiment.

일 실시 예에 따른 전자 장치(1000)는 디스플레이(1200), 프로세서(1300), 네트워크 인터페이스(1500) 및 메모리(1700)를 포함할 수 있다. 그러나 상술한 예에 한정되는 것은 아니며, 전자 장치(1000)가 위험 물체를 검출하는 방법을 수행하는데 필요한 더 많은 구성 요소를 포함할 수 있음은 물론이다. 또 다른 실시 예에 의하면, 전자 장치(1000)는 도 9에 도시된 구성 요소 보다 더 적은 수의 구성 요소를 포함할 수도 있다.An electronic device 1000 according to an embodiment may include a display 1200, a processor 1300, a network interface 1500, and a memory 1700. However, it is not limited to the above example, and it goes without saying that the electronic device 1000 may include more components required to perform the method of detecting a dangerous object. According to another embodiment, the electronic device 1000 may include fewer components than those shown in FIG. 9 .

프로세서(1300)는, 통상적으로 전자 장치(1000)의 전반적인 동작을 제어한다. 예를 들어, 프로세서(1300)는, 메모리(1700)에 저장된 프로그램들을 실행함으로써, 네트워크 인터페이스(1500) 및 디스플레이(1200)를 전반적으로 제어할 수 있다.The processor 1300 typically controls overall operations of the electronic device 1000 . For example, the processor 1300 may generally control the network interface 1500 and the display 1200 by executing programs stored in the memory 1700 .

일 실시 예에 의하면, 프로세서(1300)는 하나 이상의 인스트럭션을 수행함으로써, 검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하고, 상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하고, 상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하고, 상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하고, 상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하고, 상기 생성된 시각 컨텐츠를 출력할 수 있다.According to an embodiment, the processor 1300 obtains an X-ray image including at least one object to be inspected by performing one or more instructions, and converts the obtained X-ray image into a plurality of frames having a preset frame interval. An artificial intelligence model that acquires gamma-converted images by dividing into images and performing gamma correction on the divided plurality of frame images, and outputs a dangerous object detection result in the X-ray image when the gamma-converted images are input. , Obtain an object detection result from the artificial intelligence model by inputting the gamma-converted images, generate visual content by visualizing the object detection result, and output the generated visual content.

또한, 일 실시 예에 의하면, 프로세서(1300)는 상기 엑스레이 영상을 획득하는 단계 이전에 소정의 위험 물체로 식별될 수 있는 학습 엑스레이 이미지들을 획득하고, 상기 획득된 학습 엑스레이 이미지들에 기초하여 상기 인공 지능 모델을 학습시키며, 상기 감마 변환 이미지들을 상기 학습된 인공 지능 모델에 입력함으로써, 상기 엑스레이 영상 내 위험 물체 검출 결과를 획득할 수 있다.In addition, according to an embodiment, the processor 1300 acquires learning X-ray images that can be identified as a predetermined dangerous object prior to the acquiring of the X-ray images, and the artificial intelligence based on the acquired learning X-ray images. A dangerous object detection result in the X-ray image may be acquired by learning an intelligence model and inputting the gamma-converted images to the learned artificial intelligence model.

또한, 일 실시 예에 의하면, 프로세서(1300)는 소정의 감마 보정 함수를 이용하여 상기 복수의 프레임 이미지들 내 픽셀 값을 소정의 임계치 이상 또는 소정의 임계치 이하의 그레이 스케일 값으로 변환 하고, 상기 그레이 스케일 값으로 변환된 픽셀을 포함하는 복수의 프레임 이미지들을 상기 감마 변환 이미지들로 획득할 수 있다.Also, according to an embodiment, the processor 1300 converts pixel values in the plurality of frame images into gray scale values greater than or equal to a predetermined threshold value or less than or equal to a predetermined threshold value by using a predetermined gamma correction function, and A plurality of frame images including pixels converted to scale values may be obtained as the gamma-converted images.

또한, 일 실시 예에 의하면, 프로세서(1300)는 도 1 내지 도 8에서 상술한, 전자 장치(1000)가 위험 물체를 검출하는 방법 중 적어도 일부를 수행할 수 있음은 물론이다.Also, according to an embodiment, the processor 1300 may perform at least a part of the method of detecting a dangerous object by the electronic device 1000 described above with reference to FIGS. 1 to 8 .

네트워크 인터페이스(1500)는 프로세서의 제어에 의해 엑스레이 스캐닝 장치로부터 적어도 하나의 엑스레이 이미지, 엑스레이 이미지들을 포함하는 엑스레이 영상을 획득할 수 있다. 또한, 네트워크 인터페이스(1500)는 전자 장치와 연결된 서버로부터 인공 지능 모델을 학습시키기 위한 학습 엑스레이 이미지, 데이터들을 더 획득할 수도 있다. 또한, 네트워크 인터페이스(1500)는 전자 장치가 생성한 시각화 컨텐츠 및 검출 결과에 대한 정보들을 전자 장치(1000)와 연결된 외부 디바이스로 전송할 수도 있다.The network interface 1500 may acquire at least one X-ray image and an X-ray image including the X-ray images from the X-ray scanning device under the control of a processor. Also, the network interface 1500 may further obtain learning X-ray images and data for learning an artificial intelligence model from a server connected to the electronic device. Also, the network interface 1500 may transmit visualization content generated by the electronic device and information on detection results to an external device connected to the electronic device 1000 .

메모리(1700)는, 프로세서(1300)의 처리 및 제어를 위한 프로그램을 저장할 수 있고, 전자 장치(1000)로 입력되거나 전자 장치(1000)로부터 출력되는 데이터를 저장할 수도 있다. 또한, 메모리(1700)는 전자 장치(1000)가 이용하는 인공 지능 모델에 대한 정보를 저장할 수 있다. 일 실시 예에 의하면, 메모리(1700)에 저장된 인공 지능 모델은 신경망 모델이고, 적어도 하나의 레이어들 및 상기 레이어들의 연결 강도에 관한 가중치 정보들을 더 저장할 수 있다.The memory 1700 may store programs for processing and control of the processor 1300 and may store data input to or output from the electronic device 1000 . Also, the memory 1700 may store information about an artificial intelligence model used by the electronic device 1000 . According to an embodiment, the artificial intelligence model stored in the memory 1700 is a neural network model, and may further store weight information about at least one layer and connection strength of the layers.

일 실시 예에 의하면, 메모리(1700)는 플래시 메모리 타입(flash memory type), 하드디스크 타입(hard disk type), 멀티미디어 카드 마이크로 타입(multimedia card micro type), 카드 타입의 메모리(예를 들어 SD 또는 XD 메모리 등), 램(RAM, Random Access Memory) SRAM(Static Random Access Memory), 롬(ROM, Read-Only Memory), EEPROM(Electrically Erasable Programmable Read-Only Memory), PROM(Programmable Read-Only Memory), 자기 메모리, 자기 디스크, 광디스크 중 적어도 하나의 타입의 저장매체를 포함할 수 있다.According to an embodiment, the memory 1700 is a flash memory type, a hard disk type, a multimedia card micro type, or a card type memory (eg SD or XD memory, etc.), RAM (RAM, Random Access Memory) SRAM (Static Random Access Memory), ROM (ROM, Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory) , a magnetic memory, a magnetic disk, and an optical disk may include at least one type of storage medium.

디스플레이(1200)는 전자 장치(1000)가 생성한 시각화 컨텐츠 또는 검출 결과에 대한 정보를 화면상에 출력할 수 있다. The display 1200 may output visualized content generated by the electronic device 1000 or information on detection results on a screen.

도 10은 또 다른 실시 예에 따른 전자 장치가 위험 물체를 검출하는 방법의 흐름도이다.10 is a flowchart of a method of detecting a dangerous object by an electronic device according to another embodiment.

일 실시 예에 의하면, 전자 장치(1000)는 검출 이미지 강화 모듈(1002), 검출 모듈(1004) 및 시각화 모듈(1006)을 포함할 수 있다. 일 실시 예에 의하면 검출 이미지 강화 모듈(1002), 검출 모듈(1004) 및 시각화 모듈(1006)은 전자 장치(1000)내 메모리에 저장되고, 프로세서의 제어에 의해 실행될 수 있는 인스트럭션들의 집합을 의미할 수 있다.According to an embodiment, the electronic device 1000 may include a detection image enhancement module 1002 , a detection module 1004 , and a visualization module 1006 . According to an embodiment, the detected image enhancement module 1002, the detection module 1004, and the visualization module 1006 mean a set of instructions stored in a memory in the electronic device 1000 and executable under the control of a processor. can

예를 들어, S1002에서, 전자 장치(1000)는 실시간 엑스레이 이미지를 획득한다. S1004에서, 일 실시 예에 의하면, 검출 이미지 강화 모듈(1002)은 이미지들을 프레임 단위로 분할한다. S1006에서, 검출 이미지 강화 모듈(1002)은 이미지에 대한 감마 보정을 수행함으로써 이미지의 품질을 개선한다. S1008에서, 검출 이미지 강화 모듈은 검출 이미지(예컨대 감마 변환 이미지)를 생성한다.For example, in S1002, the electronic device 1000 acquires a real-time X-ray image. In S1004, according to an embodiment, the detection image enhancement module 1002 divides the images into frames. In S1006, the detection image enhancement module 1002 improves the quality of the image by performing gamma correction on the image. In S1008, the detection image enhancement module generates a detection image (eg, a gamma conversion image).

S1010에서, 검출 모듈(1004)은 Cascade R-CNN 모델에, 검출 이미지 강화 모듈(1002)로부터 획득되는 검출 이미지를 입력한다. S1012에서 검출 모듈(1012)은 Cascade R-CNN 모델의 출력 값에 기초하여 위험 물체가 검출되었는지 여부를 식별할 수 있다. S1014에서 검출 모듈(1012)은 위험 물체가 검출되지 않을 경우, 위험 물체 타입 정보를 생성하고, 생성된 위험 물체 타입 정보를 시각화 모듈(1006)로 전달한다. S1016에서, 시각화 모듈(1006)은 위험 물체 타입 정보에 기초하여 경고 메시지를 생성할 수 있다. S1018에서, 시각화 모듈(1006)은 Cascade R-CNN 모델의 출력 값에 기초하여 위험 물체가 검출되었다고 식별되는 경우, 위험 물체를 시각화함으로써 생성되는 시각화 컨텐츠 및 S10106에서 생성된 경고 메시지를 함께 출력할 수 있다.In S1010, the detection module 1004 inputs the detection image obtained from the detection image enhancement module 1002 to the Cascade R-CNN model. In operation S1012, the detection module 1012 may identify whether a dangerous object is detected based on the output value of the Cascade R-CNN model. In operation S1014, when the dangerous object is not detected, the detection module 1012 generates dangerous object type information and transfers the generated dangerous object type information to the visualization module 1006. In S1016, the visualization module 1006 may generate a warning message based on the dangerous object type information. In S1018, if it is identified that the dangerous object is detected based on the output value of the Cascade R-CNN model, the visualization module 1006 may output the visualization content generated by visualizing the dangerous object together with the warning message generated in S10106. there is.

일 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 개시를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. The method according to an embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. Program commands recorded on the medium may be specially designed and configured for the present disclosure, or may be known and usable to those skilled in computer software.

또한, 상기 일 실시 예에 다른 방법을 수행하도록 하는 프로그램이 저장된 기록매체를 포함하는 컴퓨터 프로그램 장치가 제공될 수 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. In addition, a computer program device including a recording medium in which a program for performing a different method according to the above embodiment is stored may be provided. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. - includes hardware devices specially configured to store and execute program instructions, such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler.

이상에서 본 개시의 실시예에 대하여 상세하게 설명하였지만 본 개시의 권리범위는 이에 한정되는 것은 아니고 다음의 에서 정의하고 있는 본 개시의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 개시의 권리범위에 속한다.Although the embodiments of the present disclosure have been described in detail above, the scope of the present disclosure is not limited thereto, and various modifications and improvements of those skilled in the art using the basic concepts of the present disclosure defined in the following are also the scope of the present disclosure. belongs to

Claims (15)

전자 장치가 위험 물체를 검출하는 방법에 있어서,
검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하는 단계;
상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하는 단계;
상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하는 단계;
상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하는 단계;
상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하는 단계; 및
상기 생성된 시각 컨텐츠를 출력하는 단계; 를 포함하는, 방법.
A method for detecting a dangerous object by an electronic device,
obtaining an X-ray image including at least one object to be inspected;
Dividing the obtained X-ray image into a plurality of frame images having a preset frame interval;
acquiring gamma-converted images by performing gamma correction on the divided plurality of frame images;
obtaining an object detection result from the artificial intelligence model by inputting the gamma-converted images to an artificial intelligence model that outputs a dangerous object detection result in the X-ray image when the gamma-converted images are input;
generating visual content by visualizing the object detection result; and
outputting the generated visual content; Including, method.
제1항에 있어서, 상기 방법은
상기 엑스레이 영상을 획득하는 단계 이전에 소정의 위험 물체로 식별될 수 있는 학습 엑스레이 이미지들을 획득하는 단계; 및
상기 획득된 학습 엑스레이 이미지들에 기초하여 상기 인공 지능 모델을 학습시키는 단계; 를 더 포함하고,
상기 물체 검출 결과를 획득하는 단계는
상기 감마 변환 이미지들을 상기 학습된 인공 지능 모델에 입력함으로써, 상기 엑스레이 영상 내 위험 물체 검출 결과를 획득하는 단계; 를 포함하는, 방법.
The method of claim 1, wherein the method
Acquiring learning X-ray images that can be identified as a predetermined dangerous object before acquiring the X-ray image; and
learning the artificial intelligence model based on the obtained learning x-ray images; Including more,
Obtaining the object detection result
obtaining a dangerous object detection result in the X-ray image by inputting the gamma-converted images to the learned artificial intelligence model; Including, method.
제2항에 있어서, 상기 감마 변환 이미지들을 획득하는 단계는
소정의 감마 보정 함수를 이용하여 상기 복수의 프레임 이미지들 내 픽셀 값을 소정의 임계치 이상 또는 소정의 임계치 이하의 그레이 스케일 값으로 변환 하는 단계; 및
상기 그레이 스케일 값으로 변환된 픽셀을 포함하는 복수의 프레임 이미지들을 상기 감마 변환 이미지들로 획득하는 단계; 를 포함하는, 방법.
3. The method of claim 2, wherein obtaining the gamma converted images comprises:
converting pixel values in the plurality of frame images into gray scale values greater than or equal to a predetermined threshold by using a predetermined gamma correction function; and
acquiring a plurality of frame images including pixels converted to gray scale values as the gamma converted images; Including, method.
제3항에 있어서, 상기 감마 보정 함수는
상기 프레임 이미지들 내 픽셀 그라데이션 값, 상기 프레임 이미지들 내 최대 그레이 스케일 값 및 상기 프레임 이미지들 내 픽셀 그라데이션의 변화 정도를 결정하는 파라미터를 변수로 포함하고, 상기 프레임 이미지들 내 픽셀의 그레이 스케일 값을 출력값으로 포함하는, 비선형 처리 함수인 것을 특징으로 하는, 방법.
4. The method of claim 3, wherein the gamma correction function is
A pixel gradation value in the frame images, a maximum gray scale value in the frame images, and a parameter determining a degree of change in pixel gradation in the frame images as variables, and a gray scale value of a pixel in the frame images Characterized in that a non-linear processing function, including as an output value, method.
제3항에 있어서, 상기 인공 지능 모델은
캐스케이드 R-CNN 모델이고, 상기 감마 변환 이미지들로부터 특징을 추출하기 위한 백본 네트워크로써, Res2Net-101 모델을 포함하는 것을 특징으로 하는, 방법.
The method of claim 3, wherein the artificial intelligence model
A method characterized in that it is a cascade R-CNN model and includes a Res2Net-101 model as a backbone network for extracting features from the gamma-converted images.
제5항에 있어서, 상기 인공 지능 모델은
RPN(Region Proposal Network) 모델을 포함하고, 상기 RPN 모델은 복수의 검색기들을 사용하며, 상기 복수의 검색기들 중 이전 검색기는 상기 복수의 검색기들 내 상기 이전 검색기와 연결된 다음 검색기의 입력 값으로 마련되는 것을 특징으로 하는, 방법.
The method of claim 5, wherein the artificial intelligence model
It includes a Region Proposal Network (RPN) model, the RPN model uses a plurality of searchers, and a previous searcher among the plurality of searchers is connected to the previous searcher in the plurality of searchers and is provided as an input value of the next searcher Characterized in that, the method.
제6항에 있어서, 상기 복수의 검색기 각각은 서로 다른 IOU(Intersection over Union) 임계값을 가지는 긍정 및 부정 샘플을 기초로 학습되고, 상기 복수의 검색기들은 상기 서로 다른 IOU 임계값을 점진적으로 증가시킴으로써 상기 인공 지능 모델의 검출 결과의 정확도를 향상시키며, 상기 인공 지능 모델의 과적합 문제를 억제하는 것을 특징으로 하는, 방법.The method of claim 6, wherein each of the plurality of searchers is learned based on positive and negative samples having different intersection over union (IOU) thresholds, and the plurality of searchers gradually increase the different IOU thresholds. Characterized in that, the accuracy of the detection result of the artificial intelligence model is improved, and the overfitting problem of the artificial intelligence model is suppressed. 제7항에 있어서, 상기 방법은
상기 생성된 시각화 컨텐츠를 상기 전자 장치와 연결된 외부 디바이스로 전송하는 단계; 를 포함하는, 방법.
8. The method of claim 7, wherein the method
transmitting the generated visualization content to an external device connected to the electronic device; Including, method.
위험 물체를 검출하는 전자 장치에 있어서,
디스플레이;
네트워크 인터페이스;
하나 이상의 인스트럭션을 저장하는 메모리; 및
상기 하나 이상의 인스트럭션을 실행하는 적어도 하나의 프로세서; 를 포함하고,
상기 적어도 하나의 프로세서는 상기 하나 이상의 인스트럭션을 실행함으로써,
검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하고,
상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하고,
상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하고,
상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하고,
상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하고,
상기 생성된 시각 컨텐츠를 출력하는, 전자 장치.
In an electronic device for detecting a dangerous object,
display;
network interface;
a memory that stores one or more instructions; and
at least one processor to execute the one or more instructions; including,
By executing the one or more instructions, the at least one processor:
Obtaining an X-ray image including at least one object to be inspected;
Dividing the obtained X-ray image into a plurality of frame images having a preset frame interval;
Obtaining gamma-converted images by performing gamma correction on the divided plurality of frame images;
When the gamma-converted images are input, an object detection result is obtained from the artificial intelligence model by inputting the gamma-converted images to an artificial intelligence model that outputs a dangerous object detection result in the X-ray image;
visual content is generated by visualizing the object detection result;
An electronic device that outputs the generated visual content.
제9항에 있어서, 상기 적어도 하나의 프로세서는
상기 엑스레이 영상을 획득하는 단계 이전에 소정의 위험 물체로 식별될 수 있는 학습 엑스레이 이미지들을 획득하고,
상기 획득된 학습 엑스레이 이미지들에 기초하여 상기 인공 지능 모델을 학습시키며,
상기 감마 변환 이미지들을 상기 학습된 인공 지능 모델에 입력함으로써, 상기 엑스레이 영상 내 위험 물체 검출 결과를 획득하는, 전자 장치.
10. The method of claim 9, wherein the at least one processor
Acquiring learning X-ray images that can be identified as a predetermined dangerous object prior to the acquiring of the X-ray image,
Learning the artificial intelligence model based on the acquired learning X-ray images;
An electronic device that obtains a dangerous object detection result in the X-ray image by inputting the gamma-converted images to the learned artificial intelligence model.
제10항에 있어서, 상기 적어도 하나의 프로세서는
소정의 감마 보정 함수를 이용하여 상기 복수의 프레임 이미지들 내 픽셀 값을 소정의 임계치 이상 또는 소정의 임계치 이하의 그레이 스케일 값으로 변환 하고,
상기 그레이 스케일 값으로 변환된 픽셀을 포함하는 복수의 프레임 이미지들을 상기 감마 변환 이미지들로 획득하는, 전자 장치.
11. The method of claim 10, wherein the at least one processor
converting pixel values in the plurality of frame images into gray scale values above or below a predetermined threshold by using a predetermined gamma correction function;
Acquiring a plurality of frame images including pixels converted to gray scale values as the gamma converted images.
제11항에 있어서, 상기 감마 보정 함수는
상기 프레임 이미지들 내 픽셀 그라데이션 값, 상기 프레임 이미지들 내 최대 그레이 스케일 값 및 상기 프레임 이미지들 내 픽셀 그라데이션의 변화 정도를 결정하는 파라미터를 변수로 포함하고, 상기 프레임 이미지들 내 픽셀의 그레이 스케일 값을 출력값으로 포함하는, 비선형 처리 함수인 것을 특징으로 하는, 전자 장치.
12. The method of claim 11, wherein the gamma correction function is
A pixel gradation value in the frame images, a maximum gray scale value in the frame images, and a parameter determining a degree of change in pixel gradation in the frame images as variables, and a gray scale value of a pixel in the frame images An electronic device, characterized in that it is a non-linear processing function included as an output value.
제11항에 있어서, 상기 인공 지능 모델은
캐스케이드 R-CNN 모델이고, 상기 감마 변환 이미지들로부터 특징을 추출하기 위한 백본 네트워크로써, Res2Net-101 모델을 포함하는 것을 특징으로 하는, 전자 장치.
The method of claim 11, wherein the artificial intelligence model
An electronic device characterized in that it is a cascade R-CNN model and includes a Res2Net-101 model as a backbone network for extracting features from the gamma-converted images.
제13항에 있어서, 상기 인공 지능 모델은
RPN(Region Proposal Network) 모델을 포함하고, 상기 RPN 모델은 복수의 검색기들을 사용하며, 상기 복수의 검색기들 중 이전 검색기는 상기 복수의 검색기들 내 상기 이전 검색기와 연결된 다음 검색기의 입력 값으로 마련되는 것을 특징으로 하는, 전자 장치.
The method of claim 13, wherein the artificial intelligence model
It includes a Region Proposal Network (RPN) model, the RPN model uses a plurality of searchers, and a previous searcher among the plurality of searchers is connected to the previous searcher in the plurality of searchers and is provided as an input value of the next searcher Characterized in that, the electronic device.
전자 장치가 위험 물체를 검출하는 방법에 있어서,
검사 대상이 되는 적어도 하나의 물체를 포함하는 엑스레이 영상을 획득하는 단계;
상기 획득된 엑스레이 영상을 미리 설정된 프레임 간격을 가지는 복수의 프레임 이미지들로 분할하는 단계;
상기 분할된 복수의 프레임 이미지들에 감마 보정을 수행함으로써 감마 변환 이미지들을 획득하는 단계;
상기 감마 변환 이미지들이 입력되면, 상기 엑스레이 영상 내 위험 물체 검출 결과를 출력하는 인공 지능 모델에, 상기 감마 변환 이미지들을 입력함으로써, 상기 인공 지능 모델로부터 물체 검출 결과를 획득하는 단계;
상기 물체 검출 결과를 시각화함으로써 시각 컨텐츠를 생성하는 단계; 및
상기 생성된 시각 컨텐츠를 출력하는 단계; 를 포함하는, 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.
A method for detecting a dangerous object by an electronic device,
obtaining an X-ray image including at least one object to be inspected;
Dividing the obtained X-ray image into a plurality of frame images having a preset frame interval;
acquiring gamma-converted images by performing gamma correction on the divided plurality of frame images;
obtaining an object detection result from the artificial intelligence model by inputting the gamma-converted images to an artificial intelligence model that outputs a dangerous object detection result in the X-ray image when the gamma-converted images are input;
generating visual content by visualizing the object detection result; and
outputting the generated visual content; A computer-readable recording medium recording a program for executing a method on a computer, including a.
KR1020210160455A 2021-11-19 2021-11-19 Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof KR102594184B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210160455A KR102594184B1 (en) 2021-11-19 2021-11-19 Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210160455A KR102594184B1 (en) 2021-11-19 2021-11-19 Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof

Publications (2)

Publication Number Publication Date
KR20230074354A true KR20230074354A (en) 2023-05-30
KR102594184B1 KR102594184B1 (en) 2023-10-27

Family

ID=86529801

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210160455A KR102594184B1 (en) 2021-11-19 2021-11-19 Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof

Country Status (1)

Country Link
KR (1) KR102594184B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102063859B1 (en) 2019-07-05 2020-02-11 주식회사 딥노이드 Systems and methods for security search at airport based on AI and deep learning
KR102179586B1 (en) * 2020-04-16 2020-11-18 주식회사 딥노이드 Ai-based cloud platform system for diagnosing medical image
KR20200138410A (en) * 2018-04-18 2020-12-09 모빌아이 비젼 테크놀로지스 엘티디. Vehicle environment modeling with a camera
KR20210137835A (en) * 2020-05-11 2021-11-18 주식회사 컴투비 X-ray inspection system integrating artificial intelligence operating method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200138410A (en) * 2018-04-18 2020-12-09 모빌아이 비젼 테크놀로지스 엘티디. Vehicle environment modeling with a camera
KR102063859B1 (en) 2019-07-05 2020-02-11 주식회사 딥노이드 Systems and methods for security search at airport based on AI and deep learning
KR102179586B1 (en) * 2020-04-16 2020-11-18 주식회사 딥노이드 Ai-based cloud platform system for diagnosing medical image
KR20210137835A (en) * 2020-05-11 2021-11-18 주식회사 컴투비 X-ray inspection system integrating artificial intelligence operating method thereof

Also Published As

Publication number Publication date
KR102594184B1 (en) 2023-10-27

Similar Documents

Publication Publication Date Title
JP7476194B2 (en) Systems and methods for image processing - Patents.com
US20180196158A1 (en) Inspection devices and methods for detecting a firearm
KR101995294B1 (en) Image analysis apparatus and method
CN108182454A (en) Safety check identifying system and its control method
Mekhalfa et al. Multiclass classification of weld defects in radiographic images based on support vector machines
CN115601682A (en) Method and device for detecting foreign matters of underground belt conveyor
CN114548230B (en) X-ray contraband detection method based on RGB color separation double-path feature fusion
Zou et al. Dangerous objects detection of X-ray images using convolution neural network
Andrews et al. Representation-learning for anomaly detection in complex x-ray cargo imagery
KR101990123B1 (en) Image analysis apparatus and method
KR102158967B1 (en) Image analysis apparatus, image analysis method and recording medium
CN113095404B (en) X-ray contraband detection method based on front-back background convolution neural network
US20170178312A1 (en) Methods, systems, and apparatuses for inspecting goods
Al-Qudah et al. Enhancing YOLO deep networks for the detection of license plates in complex scenes
KR102594184B1 (en) Electronic device detecting dangerous object on x-ray image based on artificial intelligence model and operating method thereof
Satti et al. Enhancing and classifying traffic signs using computer vision and deep convolutional neural network
CN114792300B (en) X-ray broken needle detection method based on multi-scale attention
KR20240030441A (en) Apparatus and method for detecting defects in a welding part based on a learning model
Castillo et al. Object detection in digital documents based on machine learning algorithms
Sinha et al. An effective real-time approach to automatic number plate recognition (ANPR) using YOLOv3 and OCR
CN113326753B (en) X-ray security inspection contraband detection method aiming at overlapping problem
Lee A Study on Cascade R-CNN-Based Dangerous Goods Detection Using X-Ray Image.
Johansson Small vessel detection in high quality optical satellite imagery
CN112949630A (en) Weak supervision target detection method based on frame classification screening
US11676407B2 (en) System and method for supporting user to read X-RAY image

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right