KR102338995B1 - Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo - Google Patents

Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo Download PDF

Info

Publication number
KR102338995B1
KR102338995B1 KR1020200008350A KR20200008350A KR102338995B1 KR 102338995 B1 KR102338995 B1 KR 102338995B1 KR 1020200008350 A KR1020200008350 A KR 1020200008350A KR 20200008350 A KR20200008350 A KR 20200008350A KR 102338995 B1 KR102338995 B1 KR 102338995B1
Authority
KR
South Korea
Prior art keywords
image
network
filter
animal
channel
Prior art date
Application number
KR1020200008350A
Other languages
Korean (ko)
Other versions
KR20210094751A (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 KR1020200008350A priority Critical patent/KR102338995B1/en
Priority to PCT/KR2020/001505 priority patent/WO2021149857A1/en
Publication of KR20210094751A publication Critical patent/KR20210094751A/en
Application granted granted Critical
Publication of KR102338995B1 publication Critical patent/KR102338995B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001Image restoration
    • G06T5/002Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/803Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of input or preprocessed data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/12Bounding box

Abstract

YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치가 제시된다. 일 실시예에 따른 동물 탐지 방법은, 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 단계; 상기 적외선 영상, 상기 에지 검출 영상 및 상기 전배경 분리 영상을 3채널의 합성 영상으로 합성하는 단계; 상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계; YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 단계; 스케줄링을 적용하고자 하는 상기 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 상기 네트워크의 압축 또는 복원 여부를 결정하는 단계; 상기 결정에 따라 상기 네트워크를 압축 또는 복원하는 단계; 및 상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 단계를 포함하여 이루어질 수 있다.A method and apparatus for accurate animal detection through YOLO-based lightweight bounding box detection and image processing are presented. An animal detection method according to an embodiment includes: acquiring an edge detection image and a full background separation image from an infrared image of one channel of an animal in a specific space through an image preprocessing process; synthesizing the infrared image, the edge detection image, and the entire background separation image into a three-channel composite image; learning a network through an image pyramid by generating an image having at least one size using the three-channel composite image; lightening the network through filter clustering so that it can be operated on an embedded board based on the YOLO algorithm; determining whether to compress or restore the network after measuring the speed of a network to which scheduling is to be applied in the embedded board to which scheduling is to be applied; compressing or decompressing the network according to the determination; and performing individual animal detection satisfying real-time requirements in the embedded board according to compression or restoration of the network.

Description

YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치{METHOD AND APPARATUS FOR ACCURATELY DETECTING ANIMAL THROUGH LIGHT-WEIGHT BOUNDING BOX DETECTION AND IMAGE PROCESSING BASED ON YOLO}YOLO-based lightweight bounding box detection and accurate animal detection method and device through image processing

아래의 실시예들은 YOLO(You Only Look Once) 기반 경량(Light-Weight) 경계 상자(Bounding Box) 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치에 관한 것으로, 더욱 상세하게는 임베디드 보드(embedded board)에서 개별 동물을 정확하게 탐지하는 YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치에 관한 것이다. The following embodiments relate to an accurate animal detection method and apparatus through YOLO (You Only Look Once)-based Light-Weight Bounding Box detection and image processing, and more specifically, to an embedded board (embedded board). ), to a method and apparatus for accurate animal detection through YOLO-based lightweight bounding box detection and image processing that accurately detects individual animals.

양돈 업계에서 돼지의 중량 측정은 돼지의 건강 상태를 확인할 수 있으며, 급여량을 조절함으로써 출하 시기를 결정할 수 있으므로 매우 중요하다. 일반적으로 돼지의 중량을 측정하는 방법은 돼지를 저울 위에 올려서 중량을 측정한다. 그러나 이와 같은 방법은 국내 돈사의 경우 돼지의 수에 비해 돼지를 관리하는 관리인의 수가 부족하기 때문에 모든 돼지에 적용하는 것은 어렵다. 최근 카메라를 통하여 얻은 이미지를 바탕으로 영상 처리를 사용함으로써 돼지의 중량을 추정하고, 돼지의 감시 및 관리를 수행하는 방법이 연구되고 있다. In the pig industry, weighing pigs is very important because it can check the health of pigs and can determine when to ship by adjusting the feed amount. In general, the method of measuring the weight of a pig is to place the pig on a scale to measure the weight. However, it is difficult to apply this method to all pigs because the number of managers who manage pigs is insufficient compared to the number of pigs in domestic pig houses. Recently, a method of estimating the weight of a pig and monitoring and managing the pig by using image processing based on an image obtained through a camera is being studied.

한국등록특허 10-1002966호는 이러한 네트워크 클러스터링 장치를 기반으로 하는 농축산물 생육 감시관리 방법에 관한 것으로, 네트워크 클러스터링 장치를 기반으로 관리자로부터 피감시체가 위치한 장소의 멀고 가까움에 관계없이 항시 피감시체의 징후를 영상, 음성, 센서를 이용하여 감시하고 감시한 정보를 분석하여 현 상황에 처해 있는 피감시체의 상황을 인지하여 가장 적절한 대책을 제공할 수 있는 농축산물 생육 감시관리 방법에 관한 기술을 기재하고 있다.Korea Patent No. 10-1002966 relates to a method for monitoring and managing livestock products based on such a network clustering device. Based on the network clustering device, the monitored object is always monitored from the manager regardless of the distance or proximity of the monitored object. Describe the technology for the monitoring and management of livestock products that can monitor symptoms using video, audio, and sensors and provide the most appropriate countermeasures by analyzing the monitored information to recognize the situation of the monitored object in the current situation are doing

한국등록특허 10-1002966호Korean Patent No. 10-1002966

실시예들은 YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치에 관하여 기술하며, 보다 구체적으로 영상정보를 이용하여 특정공간 내 동물을 추적하고자 할 때, 개별 동물을 정확하게 탐지하여 추적하는 기술을 제공한다. The embodiments describe a method and apparatus for accurate animal detection through YOLO-based light-weight bounding box detection and image processing, and more specifically, when trying to track an animal in a specific space using image information, accurately detect and track individual animals provides the skills to

실시예들은 영상 내 개별 동물을 빠르고 정확하게 탐지함으로써, 특정공간 내 모든 동물들을 탐지하여 추적이 가능하고, 특정공간 내 동물을 실시간으로 추적함으로써 동물을 효율적으로 사육 및 관리할 수 있는, YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치를 제공하는데 있다.The embodiments provide a YOLO-based lightweight boundary that can detect and track all animals in a specific space by quickly and accurately detecting individual animals in the image, and efficiently breed and manage animals by tracking animals in a specific space in real time. An object of the present invention is to provide an accurate animal detection method and apparatus through box detection and image processing.

실시예들은 학습을 통해 획득한 필터에서 특징 추출에 유효한 필터를 클러스터링하여 해당 필터를 제외한 필터를 제거함으로써, 딥러닝을 경량화하는 필터 가지치기 방법을 제공하는, YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치를 제공하는데 있다. Examples are YOLO-based lightweight bounding box detection and image processing, which provides a filter pruning method to lighten deep learning by clustering filters that are effective for feature extraction in filters obtained through learning and removing filters excluding the filter. It is to provide an accurate animal detection method and apparatus through

일 실시예에 따른 동물 탐지 방법은, 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 단계; 상기 적외선 영상, 상기 에지 검출 영상 및 상기 전배경 분리 영상을 3채널의 합성 영상으로 합성하는 단계; 상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계; YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 단계; 스케줄링을 적용하고자 하는 상기 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 상기 네트워크의 압축 또는 복원 여부를 결정하는 단계; 상기 결정에 따라 상기 네트워크를 압축 또는 복원하는 단계; 및 상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 단계를 포함하여 이루어질 수 있다. An animal detection method according to an embodiment includes: acquiring an edge detection image and a full background separation image from an infrared image of one channel of an animal in a specific space through an image preprocessing process; synthesizing the infrared image, the edge detection image, and the entire background separation image into a three-channel composite image; learning a network through an image pyramid by generating an image having at least one size using the three-channel composite image; lightening the network through filter clustering so that it can be operated on an embedded board based on the YOLO algorithm; determining whether to compress or restore the network after measuring the speed of a network to which scheduling is to be applied in the embedded board to which scheduling is to be applied; compressing or decompressing the network according to the determination; and performing individual animal detection satisfying real-time requirements in the embedded board according to compression or restoration of the network.

특정공간에 설치된 카메라를 통해 상기 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 단계를 더 포함할 수 있다. The method may further include acquiring an infrared image of one channel of an animal in the specific space through a camera installed in the specific space.

상기 특정공간에 설치된 카메라를 통해 상기 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 단계는, 상기 특정공간의 천장 중앙에 설치된 상기 카메라를 통해 특정공간 내 상기 동물의 영상을 녹화하고 1채널의 상기 적외선 영상을 획득할 수 있다. The step of acquiring the infrared image of one channel of the animal in the specific space through the camera installed in the specific space includes recording the image of the animal in the specific space through the camera installed in the center of the ceiling of the specific space and The infrared image may be acquired.

상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계는, 상기 3채널의 합성 영상을 원본, 1/2 크기로 줄인 영상, 1/4 크기로 줄인 영상 및 1/8 크기로 줄인 영상으로 구성하여 복수개의 3채널의 합성 영상들을 생성할 수 있다. The step of generating an image of at least one size or more using the three-channel synthesized image and learning the network through the image pyramid comprises: Composite images of a plurality of three channels can be generated by composing the reduced image to 1/8 size and the image reduced to 1/8.

상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계는, 상기 YOLO 알고리즘의 각 레이어마다 생성된 상기 3채널의 합성 영상을 넣어, 학습 후 최종 단계의 특징 맵을 획득하는 단계; 및 상기 특징 맵을 연결한 영상을 상기 YOLO 알고리즘의 입력으로 사용하여 학습된 중량(weight) 파일을 획득하는 단계를 포함할 수 있다. The step of learning the network through the image pyramid by generating an image of at least one size by using the three-channel synthesized image includes putting the three-channel synthesized image generated for each layer of the YOLO algorithm, and finally after learning obtaining a feature map of the step; and obtaining a learned weight file by using the image to which the feature map is connected as an input of the YOLO algorithm.

상기 YOLO 알고리즘에 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 단계는, 상기 YOLO 알고리즘의 필터 값을 근사화하기 위해 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 클러스터를 생성하는 단계; 및 생성된 상기 클러스터를 이용하여 각 레이어의 값을 패턴화하는 단계를 포함할 수 있다. The step of lightweighting the network through filter clustering so that it can be operated on an embedded board based on the YOLO algorithm can be made into 0 and 1 using the center value in the filter as a reference value to approximate the filter value of the YOLO algorithm. creating a cluster; and patterning the value of each layer using the generated cluster.

상기 YOLO 알고리즘의 필터 값을 근사화하기 위해 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 클러스터를 생성하는 단계는, 상기 YOLO 알고리즘의 필터 값을 근사화하기 위해 3x3 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 256개의 클러스터를 생성할 수 있다. In order to approximate the filter value of the YOLO algorithm, the step of generating a cluster that can be made 0 and 1 using the center value in the filter as a reference value is based on the center value in the 3x3 filter to approximate the filter value of the YOLO algorithm You can create 256 clusters that can be set to 0 and 1 by value.

상기 네트워크를 압축 또는 복원하는 단계는, 상기 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 단계; 상기 레이어를 압축하려는 경우, 상기 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거하는 단계; 및 상기 레이어를 복원하려는 경우, 상기 필터들의 중요도 값을 기준으로 상기 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원하는 단계를 포함할 수 있다. The step of compressing or restoring the network may include: calculating importance values of the filters by obtaining an L2-Norm value of a filter in the network and a calculation amount of the filter; removing the filter having the lowest value after sorting the filters in descending order based on the importance values of the filters when the layer is to be compressed; and restoring the filter having the highest value after arranging the filters in ascending order based on the importance values of the filters when restoring the layer.

상기 네트워크를 압축 또는 복원하는 단계는, 상기 필터의 제거 및 복원 후 원하는 속도가 나오지 않았을 경우, 상기 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 과정을 반복할 수 있다. In the step of compressing or restoring the network, if the desired speed is not obtained after the removal and restoration of the filter, the process of calculating the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the amount of calculation of the filter may be repeated. can

상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 단계는, 상기 필터의 제거 및 복원 후 원하는 속도를 충족하였을 경우, 전이학습을 통한 파인튜닝(fine-tuning)을 수행하는 단계를 더 포함할 수 있다. The step of performing individual animal detection satisfying the real-time requirement on the embedded board according to the compression or restoration of the network includes fine tuning through transfer learning when the desired speed is satisfied after removal and restoration of the filter. tuning) may be further included.

상기 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 단계는, 개별 돼지 탐지를 수행하기 위해, 돈방 내 돼지의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득할 수 있다. The step of acquiring an edge detection image and a full background separation image through an image pre-processing process from an infrared image of one channel of an animal in a specific space is an image from an infrared image of one channel of a pig in a pig room in order to perform individual pig detection. An edge detection image and a full background separation image may be acquired through a pre-processing process.

다른 실시예에 따른 동물 탐지 장치는, 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 영상 전처리부; 상기 적외선 영상, 상기 에지 검출 영상 및 상기 전배경 분리 영상을 3채널의 합성 영상으로 합성하는 3채널의 합성 영상 합성부; 상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 이미지 피라미드부; YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 필터 클러스터링부; 스케줄링을 적용하고자 하는 상기 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 상기 네트워크의 압축 또는 복원 여부를 결정하는 압축 및 복원 판단부; 상기 결정에 따라 상기 네트워크를 압축 또는 복원하는 압축 및 복원부; 및 상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 개별 동물 탐지부를 포함하여 이루어질 수 있다. An apparatus for detecting an animal according to another embodiment includes: an image preprocessor configured to acquire an edge detection image and a background separation image from an infrared image of one channel of an animal in a specific space through an image preprocessing process; a 3-channel composite image synthesizing unit for synthesizing the infrared image, the edge detection image, and the entire background separation image into a 3-channel composite image; an image pyramid unit for learning a network through an image pyramid by generating an image of at least one size using the three-channel synthesized image; a filter clustering unit that lightens the network through filter clustering so that it can be operated on an embedded board based on the YOLO algorithm; a compression and restoration determination unit for determining whether to compress or restore the network after measuring a speed of a network to which scheduling is to be applied in the embedded board to which scheduling is to be applied; a compression and decompression unit for compressing or restoring the network according to the determination; and an individual animal detection unit that detects individual animals satisfying real-time requirements in the embedded board according to compression or restoration of the network.

특정공간에 설치된 카메라를 통해 상기 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 적외선 영상 획득부를 더 포함할 수 있다. The method may further include an infrared image acquisition unit configured to acquire an infrared image of one channel of an animal in the specific space through a camera installed in the specific space.

상기 압축 및 복원부는, 상기 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하고, 상기 레이어를 압축하려는 경우, 상기 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거하며, 상기 레이어를 복원하려는 경우, 상기 필터들의 중요도 값을 기준으로 상기 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원할 수 있다. The compression and restoration unit calculates the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the calculation amount of the filter, and when the layer is to be compressed, the filters are arranged in descending order based on the importance value of the filters. After the filter having the lowest value is removed and the layer is restored, the filter having the highest value may be restored after sorting the filters in ascending order based on the importance values of the filters.

상기 영상 전처리부는, 개별 돼지 탐지를 수행하기 위해, 돈방 내 돼지의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득할 수 있다. The image preprocessor may acquire an edge detection image and a background separation image through an image preprocessing process from an infrared image of one channel of a pig in a pig room in order to perform individual pig detection.

실시예들에 따르면 영상 내 개별 동물을 빠르고 정확하게 탐지함으로써, 특정공간 내 모든 동물들을 탐지하여 추적이 가능하고, 특정공간 내 동물을 실시간으로 추적함으로써 동물을 효율적으로 사육 및 관리할 수 있는, YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치를 제공할 수 있다.According to embodiments, by quickly and accurately detecting individual animals in an image, all animals in a specific space can be detected and tracked, and animals in a specific space can be tracked in real time to efficiently breed and manage animals, YOLO-based It is possible to provide an accurate animal detection method and apparatus through lightweight bounding box detection and image processing.

실시예들에 따르면 학습을 통해 획득한 필터에서 특징 추출에 유효한 필터를 클러스터링하여 해당 필터를 제외한 필터를 제거함으로써, 딥러닝을 경량화하는 필터 가지치기 방법을 제공하는, YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치를 제공할 수 있다. According to embodiments, YOLO-based lightweight bounding box detection and image, which provides a filter pruning method that lightens deep learning by clustering filters effective for feature extraction in filters obtained through learning and removing filters excluding the filter It is possible to provide a method and apparatus for accurate animal detection through treatment.

도 1은 일 실시예에 따른 특정공간 내 설치된 카메라를 설명하기 위한 도면이다.
도 2a는 일 실시예에 따른 1채널의 적외선 영상, 에지 검출 영상 및 전배경 분리 영상을 설명하기 위한 도면이다.
도 2b는 일 실시예에 따른 3채널의 합성 영상을 설명하기 위한 도면이다.
도 3은 일 실시예에 따른 이미지 피라미드 알고리즘을 설명하기 위한 도면이다.
도 4는 일 실시예에 따른 필터 클러스터링을 통한 경량화를 설명하기 위한 도면이다.
도 5는 일 실시예에 따른 필터 클러스터링 알고리즘을 설명하기 위한 도면이다.
도 6a은 일 실시예에 따른 필터 제거 방법을 설명하기 위한 도면이다.
도 6b은 일 실시예에 따른 필터 복원 방법을 설명하기 위한 도면이다.
도 7은 일 실시예에 따른 동물 탐지 방법을 설명하기 위한 흐름도이다.
도 8은 일 실시예에 따른 동물 탐지 장치를 설명하기 위한 블록도이다.
1 is a view for explaining a camera installed in a specific space according to an embodiment.
FIG. 2A is a diagram for explaining a 1-channel infrared image, an edge detection image, and a full-background separation image according to an exemplary embodiment.
2B is a diagram for explaining a three-channel composite image according to an embodiment.
3 is a diagram for explaining an image pyramid algorithm according to an embodiment.
4 is a diagram for explaining weight reduction through filter clustering according to an embodiment.
5 is a diagram for describing a filter clustering algorithm according to an embodiment.
6A is a view for explaining a method of removing a filter according to an exemplary embodiment.
6B is a diagram for explaining a filter restoration method according to an embodiment.
7 is a flowchart illustrating a method for detecting an animal according to an exemplary embodiment.
8 is a block diagram illustrating an apparatus for detecting an animal according to an exemplary embodiment.

이하, 첨부된 도면을 참조하여 실시예들을 설명한다. 그러나, 기술되는 실시예들은 여러 가지 다른 형태로 변형될 수 있으며, 본 발명의 범위가 이하 설명되는 실시예들에 의하여 한정되는 것은 아니다. 또한, 여러 실시예들은 당해 기술분야에서 평균적인 지식을 가진 자에게 본 발명을 더욱 완전하게 설명하기 위해서 제공되는 것이다. 도면에서 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.Hereinafter, embodiments will be described with reference to the accompanying drawings. However, the described embodiments may be modified in various other forms, and the scope of the present invention is not limited by the embodiments described below. In addition, various embodiments are provided in order to more completely explain the present invention to those of ordinary skill in the art. The shapes and sizes of elements in the drawings may be exaggerated for clearer description.

아래의 실시예들은 YOLO 기반 경량 경계 상자 검출과 영상 처리를 통한 정확한 동물 탐지 방법 및 장치에 관한 것으로, 임베디드 보드(embedded board)에서도 개별 동물을 정확하게 탐지함에 따라 동물을 관리 및 감시할 수 있는 기술을 제공한다. The following embodiments relate to an accurate animal detection method and apparatus through YOLO-based light-weight bounding box detection and image processing, and technology capable of managing and monitoring animals by accurately detecting individual animals even on an embedded board. to provide.

이러한 실시예들은 YOLO 알고리즘에 기반하여 임베디드 장치에서도 작동할 수 있도록 필터 가지치기와 클러스터링을 통해 경량화 과정을 거친다. 일반적으로 네트워크의 경량화를 진행하면 정확도가 감소한다는 문제점이 존재하지만, 1채널의 적외선 영상, 에지 검출 영상 및 전배경 분리 영상을 3채널로 합성하는 영상 처리 기법 및 개별 동물을 다양한 크기의 이미지로 생성하는 이미지 피라미딩 기법을 통해 정확도 감소 문제를 해결할 수 있다. 또한, 스케줄링 기법을 통해 GPU에서 동작하는 YOLO(You Only Look Once) 네트워크와 CPU(Graphics Processing Unit)에서 동작하는 영상 처리 기법을 적절히 배치하여 실시간으로 탐지할 수 있다.Based on the YOLO algorithm, these embodiments go through a weight reduction process through filter pruning and clustering so that they can also work on embedded devices. In general, there is a problem that the accuracy decreases when the weight of the network is reduced, but an image processing technique that synthesizes one-channel infrared image, edge detection image, and full-background separation image into three channels, and individual animals are created into images of various sizes The image pyramiding technique can solve the problem of reducing accuracy. In addition, through the scheduling technique, a You Only Look Once (YOLO) network running on a GPU and an image processing technique running on a CPU (Graphics Processing Unit) can be appropriately arranged to detect in real time.

도 1은 일 실시예에 따른 특정공간 내 설치된 카메라를 설명하기 위한 도면이다. 1 is a view for explaining a camera installed in a specific space according to an embodiment.

도 1을 참조하면, 특정공간(110)에 설치된 카메라(120)를 통해 특정공간(110) 내 동물의 1채널의 적외선 영상을 획득할 수 있다. 보다 구체적으로, 특정공간(110)의 천장 중앙에 설치된 카메라(120)를 이용하여 특정공간(110) 내부의 바닥에 있는 동물의 영상을 녹화하고 1채널의 적외선 영상을 획득할 수 있다. Referring to FIG. 1 , an infrared image of one channel of an animal in a specific space 110 may be acquired through a camera 120 installed in a specific space 110 . More specifically, by using the camera 120 installed in the center of the ceiling of the specific space 110, an image of an animal on the floor inside the specific space 110 can be recorded and an infrared image of one channel can be obtained.

예를 들어, 돈방(110) 내 3mx3m 크기의 돈방(110)의 바닥으로부터 약4.8m 높이에 설치된 카메라(120)를 이용하여 돈방(110) 내 돼지 영상을 녹화 및 적외선 영상을 획득할 수 있다.For example, by using the camera 120 installed at a height of about 4.8 m from the floor of the 3 mx3 m sized pig room 110 in the pig room 110, it is possible to record an image of a pig in the pig room 110 and obtain an infrared image.

도 2a는 일 실시예에 따른 1채널의 적외선 영상, 에지 검출 영상 및 전배경 분리 영상을 설명하기 위한 도면이다. FIG. 2A is a diagram for explaining a 1-channel infrared image, an edge detection image, and a full-background separation image according to an exemplary embodiment.

동물 탐지 정확도를 향상시키기 위해 영상 처리 기술, 채널 합성 기술 및 이미지 피라미드 기술을 이용할 수 있다. 도 2a를 참조하면, 영상 처리 기술은 적외선 영상(210)을 변형하기 위한 과정으로, 적외선 영상(210)을 에지 검출 영상(220)으로 변형하기 위해 2차 미분 연산을 통해 객체(201)의 폐곡선 윤곽선을 찾아내는 라플라시안(Laplacian) 알고리즘을 사용할 수 있다. 또한, 적외선 영상(210)을 전배경 분리 영상(230)으로 변형하기 위해 특정 임계 값 이하의 값을 0으로, 이상의 값을 255로 이진화하는 Otsu 알고리즘을 사용할 수 있다. 여기서, 객체(201)는 동물이 될 수 있으며, 예컨대 돈방 내 돼지가 될 수 있다. Image processing technology, channel synthesis technology, and image pyramid technology may be used to improve animal detection accuracy. Referring to FIG. 2A , the image processing technology is a process for transforming an infrared image 210 , and a closed curve of an object 201 is performed through a second differential operation to transform the infrared image 210 into an edge detection image 220 . The Laplacian algorithm to find the contour can be used. In addition, in order to transform the infrared image 210 into the full-background separated image 230 , the Otsu algorithm for binarizing a value below a specific threshold to 0 and a value above a specific threshold to 255 may be used. Here, the object 201 may be an animal, for example, a pig in a pig room.

이와 같이, 적외선 영상(210)에 영상 전처리를 사용하여 에지 검출 영상(220) 및 전배경 분리 영상(230)을 획득할 수 있다. In this way, the edge detection image 220 and the full background separation image 230 may be acquired by using image preprocessing on the infrared image 210 .

도 2b는 일 실시예에 따른 3채널의 합성 영상을 설명하기 위한 도면이다. 2B is a diagram for explaining a three-channel composite image according to an embodiment.

도 2b를 참조하면, 1채널 영상인 적외선 영상(210)과 에지 검출 영상(220) 및 전배경 분리 영상(230)을 획득한 후, 채널 합성을 진행하여 획득한 적외선 영상(210), 에지 검출 영상(220) 및 전배경 분리 영상(230)을 3채널의 합성 영상으로 합성할 수 있다.Referring to FIG. 2B , after acquiring an infrared image 210 , an edge detection image 220 , and a full-background separation image 230 as a one-channel image, an infrared image 210 obtained by channel synthesis, edge detection The image 220 and the entire background separated image 230 may be synthesized into a three-channel composite image.

도 3은 일 실시예에 따른 이미지 피라미드 알고리즘을 설명하기 위한 도면이다. 3 is a diagram for explaining an image pyramid algorithm according to an embodiment.

도 3을 참조하면, 이미지 피라미드 기법을 이용하여 YOLO 기반 경량화 네트워크의 입력으로 들어갈 다양한 크기의 3채널의 합성 영상들(311, 212, 313, 314)을 생성할 수 있다. 예를 들어, 3채널의 합성 영상(310)을 원본(311), 1/2 크기로 줄인 영상(312), 1/4 크기로 줄인 영상(313) 및 1/8 크기로 줄인 영상(314)으로 총 4장의 3채널의 합성 영상들(311, 212, 313, 314)을 생성할 수 있다.Referring to FIG. 3 , three-channel composite images 311 , 212 , 313 , and 314 of various sizes to be input to the YOLO-based lightweight network may be generated using the image pyramid technique. For example, the three-channel composite image 310 is reduced to an original 311, a 1/2 size image 312, a 1/4 size image 313, and an 1/8 size image 314. As a result, it is possible to generate a total of four composite images 311, 212, 313, and 314 of three channels.

다양한 크기의 3채널의 합성 영상들(311, 212, 313, 314)은 YOLO 기반 경량화 네트워크의 특징 맵들(320)을 생성하는데, 생성된 특징 맵들(320)을 이어 붙여 YOLO 기반 경량화 네트워크를 수행하여 최종 탐지 결과를 도출할 수 있다. Composite images 311, 212, 313, and 314 of 3 channels of various sizes generate feature maps 320 of the YOLO-based lightweight network. The final detection result can be derived.

다시 말하면, YOLO 알고리즘의 각 레이어마다 생성된 4장의 3채널의 합성 영상 이미지들을 넣어, 학습 후 최종 단계의 특징 맵(320)을 획득할 수 있고, 특징 맵(320)을 연결(concatenation)한 영상을 YOLO 알고리즘의 입력으로 사용하여 학습된 중량(weight) 파일을 획득할 수 있다.In other words, it is possible to acquire the feature map 320 of the final stage after learning by putting the four three-channel synthetic image images generated for each layer of the YOLO algorithm, and the image obtained by concatenating the feature map 320 . can be used as an input to the YOLO algorithm to obtain a learned weight file.

한편, 기계학습 분야(혹은 딥러닝 분야)에서 사용되는 YOLO 알고리즘은 실시간으로 이미지 내 특징을 추출하여 객체를 검출하는 기술이다. 이러한 YOLO 알고리즘은 성능 및 정확도가 높아 자율주행 자동차, 사람 얼굴 탐지 등 실시간 사물 탐지 분야 등에 사용된다. 최근 객체 검출 분야의 경량 딥러닝 기술은 딥러닝의 알고리즘 자체를 적은 연산과 효율적인 구조로 설계하여 기존 네트워크 모델 대비 효율을 극대화하기 위한 경량 딥러닝 알고리즘 연구와 이미 설계된 네트워크 모델의 파라미터들을 줄이는 모델 압축 기법이 적용된 알고리즘 경량화로 나눌 수 있다. On the other hand, the YOLO algorithm used in the machine learning field (or deep learning field) is a technology that detects objects by extracting features from images in real time. The YOLO algorithm has high performance and accuracy, so it is used in real-time object detection fields such as autonomous vehicles and human face detection. Recently, lightweight deep learning technology in the field of object detection is a study of lightweight deep learning algorithms to maximize efficiency compared to existing network models by designing the deep learning algorithm itself with fewer calculations and an efficient structure, and a model compression method that reduces parameters of already designed network models. It can be divided into the weight reduction of the applied algorithm.

본 실시예에서 주로 다루고 있는 알고리즘 경량화 분야는 파라미터가 나타내는 표현력을 최대한 유지하면서 불필요한 가중치를 없애기 위한 방법이다. 일반적인 딥러닝 모델은 과파라미터(Over-parameterization)화 되어있기 때문에 네트워크 모델이 나타내는 가중치의 값이 아주 작을 경우, 모델의 정확도에 큰 영향을 미치지 못하므로(이를 모델이 작은 가중치에 대한 내성을 가진다고 표현함), 이 값을 모두 0으로 설정하여 마치 가지치기(Pruning)를 수행하는 것과 같은 효과를 내는 가중치 가지치기(Weight Pruning)가 대표적이다. 다음으로, 일반적인 모델의 가중치는 부동 소수점 값을 가지지만, 이를 특정 비트 수로 줄이는 양자화(Quantization)를 통해 기존 딥러닝의 표현력을 유지하면서 실제 모델의 저장 크기는 줄이는 방법이 있다. 마지막으로, 0과 1로 표현하여 표현력을 많이 줄이지만, 정확도의 손실은 어느 정도 유지하면서 모델 저장 크기를 확연히 줄이는 이진화(Binarization) 기법 등이 있다. The algorithm weight reduction field, which is mainly dealt with in this embodiment, is a method for removing unnecessary weights while maintaining the expressive power indicated by parameters as much as possible. Because general deep learning models are over-parameterized, when the weight value indicated by the network model is very small, it does not have a large effect on the accuracy of the model (this is expressed as the model has resistance to small weights) ) and set all these values to 0, weight pruning, which has the same effect as performing pruning, is representative. Next, although the weight of a general model has a floating point value, there is a way to reduce the storage size of the actual model while maintaining the expressive power of the existing deep learning through quantization, which reduces it to a specific number of bits. Lastly, there is a binarization technique that significantly reduces the expressive power by expressing 0 and 1, but significantly reduces the model storage size while maintaining a certain loss of accuracy.

본 실시예에서는 알고리즘 경량화의 한 방법으로써 학습을 통해 획득한 필터(Filter)에서 특징 추출에 유효한 필터를 클러스터링(Clustering)하여 해당 필터를 제외한 필터를 제거함으로써, 딥러닝을 경량화하는 필터 가지치기(Filter Pruning) 방법을 사용할 수 있다.In this embodiment, as a method of reducing the weight of the algorithm, filter pruning to lighten deep learning by clustering filters effective for feature extraction from filters obtained through learning and removing filters excluding the corresponding filter. pruning) method can be used.

도 4는 일 실시예에 따른 필터 클러스터링을 통한 경량화를 설명하기 위한 도면이다. 4 is a diagram for explaining weight reduction through filter clustering according to an embodiment.

도 4를 참조하면, YOLO의 필터 값을 근사화하기 위해 3x3 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 256개의 클러스터(cluster)를 생성할 수 있다. 예를 들어, 3x3 필터에서 기준 값 이상인 경우 1로 표기하고, 기준 값 미만인 경우 0으로 표시할 수 있다. Referring to FIG. 4 , in order to approximate the filter value of YOLO, 256 clusters that can be made 0 and 1 can be generated by using the center value as a reference value in the 3x3 filter. For example, in a 3x3 filter, a value greater than or equal to a reference value may be indicated as 1, and a value less than the reference value may be indicated as 0.

도 5는 일 실시예에 따른 필터 클러스터링 알고리즘을 설명하기 위한 도면이다. 5 is a diagram for describing a filter clustering algorithm according to an embodiment.

도 5를 참조하면, 생성한 클러스터를 이용하여 각 레이어의 값을 패턴화할 수 있다.Referring to FIG. 5 , values of each layer may be patterned using the generated cluster.

마지막으로, 스케줄링 기법을 통해 초기 목표 신뢰도에 부합하면서 임베디드 보드(embedded board)에서도 실시간 필요조건을 만족하는 객체 탐지를 진행할 수 있다.Finally, object detection that satisfies the real-time requirement even on an embedded board while meeting the initial target reliability through the scheduling technique can be performed.

도 6a은 일 실시예에 따른 필터 제거 방법을 설명하기 위한 도면이다. 6A is a diagram for describing a filter removal method according to an exemplary embodiment.

도 6a를 참조하면, 스케줄링을 적용하고자 하는 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후 압축된 네트워크의 압축 및 복원 여부를 결정할 수 있다. 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산할 수 있다. 레이어를 압축하려는 경우, 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거할 수 있다. Referring to FIG. 6A , after measuring the speed of a network to which scheduling is to be applied in an embedded board to which scheduling is to be applied, it is possible to determine whether to compress and restore the compressed network. The importance values of the filters can be calculated by obtaining the L2-Norm value of the filter in the network and the calculation amount of the filter. If you want to compress the layer, you can remove the filter with the lowest value after sorting the filters in descending order based on the importance values of the filters.

도 6b은 일 실시예에 따른 필터 복원 방법을 설명하기 위한 도면이다. 6B is a diagram for explaining a filter restoration method according to an embodiment.

도 6b를 참조하면, 복원하려는 경우에는 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원할 수 있다. Referring to FIG. 6B , in the case of restoration, the filter having the highest value may be restored after sorting the filters in an ascending order.

필터 제거 및 복원 후, 원하는 속도가 나오지 않았을 경우, 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 과정을 반복할 수 있다. 그리고 원하는 속도를 충족하였을 경우, 전이학습을 통한 파인튜닝(fine-tuning)을 수행할 수 있다.If the desired speed is not obtained after removing and restoring the filter, the process of calculating the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the amount of calculation of the filter may be repeated. And when the desired speed is satisfied, fine-tuning through transfer learning can be performed.

도 7은 일 실시예에 따른 동물 탐지 방법을 설명하기 위한 흐름도이다. 7 is a flowchart illustrating a method for detecting an animal according to an exemplary embodiment.

도 7을 참조하면, 일 실시예에 따른 동물 탐지 방법은, 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 단계(710), 적외선 영상, 에지 검출 영상 및 전배경 분리 영상을 3채널의 합성 영상으로 합성하는 단계(720), 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계(730), YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 네트워크를 경량화하는 단계(740), 스케줄링을 적용하고자 하는 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 네트워크의 압축 또는 복원 여부를 결정하는 단계(750), 결정에 따라 네트워크를 압축 또는 복원하는 단계(760, 770), 및 네트워크의 압축 또는 복원에 따라 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 단계(780)를 포함하여 이루어질 수 있다. Referring to FIG. 7 , the method for detecting an animal according to an embodiment includes acquiring an edge detection image and a full background separation image from an infrared image of one channel of an animal in a specific space through an image pre-processing process ( 710 ), an infrared image , synthesizing the edge detection image and the entire background separated image into a three-channel composite image (720), generating an image of at least one size using the three-channel composite image to learn a network through an image pyramid ( 730), lightening the network through filter clustering so that it can be operated on the embedded board based on the YOLO algorithm (740), after measuring the speed of the network to which the scheduling is to be applied in the embedded board to which the scheduling is to be applied, the network Determining whether to compress or restore (750), compress or restore the network according to the decision (760, 770), and perform individual animal detection satisfying real-time requirements in the embedded board according to the compression or restoration of the network It may be made including a step 780 of doing.

또한, 특정공간에 설치된 카메라를 통해 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 단계(701)를 더 포함할 수 있다. In addition, the method may further include a step 701 of acquiring an infrared image of one channel of an animal in a specific space through a camera installed in the specific space.

아래에서 일 실시예에 따른 동물 탐지 방법의 각 단계를 설명한다. Each step of the method for detecting an animal according to an embodiment will be described below.

일 실시예에 따른 동물 탐지 방법은 일 실시예에 따른 동물 탐지 장치를 통해 보다 구체적으로 설명할 수 있다. The method for detecting an animal according to an embodiment may be described in more detail through the apparatus for detecting an animal according to an embodiment.

도 8은 일 실시예에 따른 동물 탐지 장치를 설명하기 위한 블록도이다.8 is a block diagram illustrating an apparatus for detecting an animal according to an exemplary embodiment.

도 8을 참조하면, 일 실시예에 따른 동물 탐지 장치(800)는 영상 전처리부(810), 3채널 영상 합성부(820), 이미지 피라미드부(830), 필터 클러스터링부(840), 압축 및 복원 판단부(850), 압축 및 복원부(860) 및 개별 동물 탐지부(870)를 포함하여 이루어질 수 있다. 또한, 실시예에 따라 동물 탐지 장치는 적외선 영상 획득부(801)를 더 포함할 수 있다.Referring to FIG. 8 , the animal detection apparatus 800 according to an embodiment includes an image preprocessor 810 , a three-channel image synthesizer 820 , an image pyramid unit 830 , a filter clustering unit 840 , a compression and It may include a restoration determination unit 850 , a compression and restoration unit 860 , and an individual animal detection unit 870 . Also, according to an embodiment, the animal detection apparatus may further include an infrared image acquisition unit 801 .

먼저, 단계(701)에서, 적외선 영상 획득부(801)는 특정공간에 설치된 카메라를 통해 특정공간 내 동물의 1채널의 적외선 영상을 획득할 수 있다. 보다 구체적으로, 적외선 영상 획득부(801)는 특정공간의 천장 중앙에 설치된 카메라를 통해 특정공간 내 동물의 영상을 녹화하고 1채널의 적외선 영상을 획득할 수 있다. First, in step 701 , the infrared image acquisition unit 801 may acquire an infrared image of one channel of an animal in a specific space through a camera installed in the specific space. More specifically, the infrared image acquisition unit 801 may record an image of an animal in a specific space through a camera installed in the center of the ceiling of the specific space and acquire an infrared image of one channel.

단계(710)에서, 영상 전처리부(810)는 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득할 수 있다.In operation 710 , the image preprocessor 810 may acquire an edge detection image and a background separation image from an infrared image of one channel of an animal in a specific space through an image preprocessing process.

여기서, 영상 전처리부(810)는 개별 돼지 탐지를 수행하기 위해, 돈방 내 돼지의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득할 수 있다. Here, the image preprocessor 810 may acquire an edge detection image and a background separation image through an image preprocessing process from an infrared image of one channel of a pig in a pig room in order to perform individual pig detection.

단계(720)에서, 3채널 영상 합성부(820)는 적외선 영상, 에지 검출 영상 및 전배경 분리 영상을 3채널의 합성 영상으로 합성할 수 있다. In operation 720, the three-channel image synthesizer 820 may synthesize the infrared image, the edge detection image, and the full background separation image into a three-channel synthesized image.

단계(730)에서, 이미지 피라미드부(830)는 채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습할 수 있다. In operation 730 , the image pyramid unit 830 may learn a network through the image pyramid by generating an image having at least one size using the synthesized image of the channel.

예를 들어, 이미지 피라미드부(830)는 채널의 합성 영상을 원본, 1/2 크기로 줄인 영상, 1/4 크기로 줄인 영상 및 1/8 크기로 줄인 영상으로 구성하여 복수개의 3채널의 합성 영상들을 생성할 수 있다.For example, the image pyramid unit 830 composes a channel composite image into an original, a 1/2-size image, a 1/4-size image, and an 1/8-size image, and synthesizes a plurality of 3 channels. You can create images.

이러한 이미지 피라미드부(830)는 YOLO 알고리즘의 각 레이어마다 생성된 3채널의 합성 영상을 넣어, 학습 후 최종 단계의 특징 맵을 획득한 다음, 특징 맵을 연결한 영상을 YOLO 알고리즘의 입력으로 사용하여 학습된 중량(weight) 파일을 획득할 수 있다.The image pyramid unit 830 puts a three-channel composite image generated for each layer of the YOLO algorithm, acquires a feature map of the final stage after learning, and then uses the image connected to the feature map as an input to the YOLO algorithm. A learned weight file can be obtained.

단계(740)에서, 필터 클러스터링부(840)는 YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 네트워크를 경량화 할 수 있다. In step 740 , the filter clustering unit 840 may lighten the network through filter clustering so that it can operate on an embedded board based on the YOLO algorithm.

필터 클러스터링부(840)는 YOLO 알고리즘의 필터 값을 근사화하기 위해 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 클러스터를 생성한 다음, 생성된 클러스터를 이용하여 각 레이어의 값을 패턴화할 수 있다. 여기서, 필터 클러스터링부(840)는 YOLO 알고리즘의 필터 값을 근사화하기 위해 3x3 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 256개의 클러스터를 생성할 수 있다. The filter clustering unit 840 generates a cluster that can be made into 0 and 1 using the center value in the filter as a reference value in order to approximate the filter value of the YOLO algorithm, and then uses the generated cluster to pattern the values of each layer. can get angry Here, the filter clustering unit 840 may generate 256 clusters that can be made 0 and 1 by using the center value as a reference value in the 3x3 filter to approximate the filter value of the YOLO algorithm.

단계(750)에서, 압축 및 복원 판단부(850)는 스케줄링을 적용하고자 하는 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 네트워크의 압축 또는 복원 여부를 결정할 수 있다. In step 750 , the compression and decompression determining unit 850 may determine whether to compress or restore the network after measuring the speed of the network to which the scheduling is to be applied in the embedded board to which the scheduling is to be applied.

단계(760)에서, 압축 및 복원부(860)는 결정에 따라 네트워크를 압축할 수 있다. In step 760, the compression and decompression unit 860 may compress the network according to the determination.

단계(770)에서, 압축 및 복원부(860)는 결정에 따라 네트워크를 복원할 수 있다. In step 770 , the compression and decompression unit 860 may restore the network according to the determination.

보다 구체적으로, 압축 및 복원부(860)는 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하고, 레이어를 압축하려는 경우, 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거하며, 레이어를 복원하려는 경우, 필터들의 중요도 값을 기준으로 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원할 수 있다. 여기서, 압축 및 복원부(860)는 필터의 제거 및 복원 후 원하는 속도가 나오지 않았을 경우, 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 과정을 반복할 수 있다.More specifically, the compression and restoration unit 860 calculates the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the calculation amount of the filter. After sorting by , the filter with the lowest value is removed and the layer is restored. After sorting the filters in ascending order based on the importance values of the filters, the filter with the highest value can be restored. Here, when the desired speed is not obtained after the removal and restoration of the filter, the compression and restoration unit 860 may repeat the process of calculating the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the calculation amount of the filter. .

단계(780)에서, 개별 동물 탐지부(870)는 네트워크의 압축 또는 복원에 따라 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행할 수 있다. 즉, 개별 동물 탐지부(870)는 필터의 제거 및 복원 후 원하는 속도를 충족하였을 경우, 전이학습을 통한 파인튜닝(fine-tuning)을 수행할 수 있다.In step 780 , the individual animal detection unit 870 may perform individual animal detection satisfying real-time requirements in the embedded board according to compression or restoration of the network. That is, when the desired speed is satisfied after the removal and restoration of the filter, the individual animal detection unit 870 may perform fine-tuning through transfer learning.

실시예들에 따르면 영상 내 개별 동물을 빠르고 정확하게 탐지할 수 있다. According to embodiments, it is possible to quickly and accurately detect an individual animal in an image.

특히, 영상 내 개별 돼지가 빠르고 정확하게 탐지될 수 있으므로, 이를 확장하면 돈방 내 모든 돼지들을 탐지하여 돼지의 추적이 가능해질 수 있다. 이를 적용하여 돈방 내 돼지의 24시간 실시간 맞춰 개별 돼지를 추적함으로써 돈방 내 돼지를 효율적으로 관리할 수 있다.In particular, since individual pigs in the image can be detected quickly and accurately, this extension can detect all pigs in the pig room and enable tracking of the pigs. By applying this, individual pigs are tracked in real time 24 hours a day, so pigs in the pig room can be efficiently managed.

아래에서는 동물 탐지 방법의 예시로써, 돈사 내 돼지를 탐지하는 방법을 예를 들어 설명한다. Below, as an example of an animal detection method, a method for detecting a pig in a pig house will be described as an example.

영상 정보를 이용하여 돈방 내 돼지를 추적하고자 할 때, 개별 돼지를 정확히 추적하기 위해서는 정확한 탐지 과정이 선행되어야 할 필요가 있다. 종래 기술은 Faster RCNN 알고리즘을 이용하여 높은 정확도로 돼지 탐지를 수행할 수 있지만, 연산량이 많고 수행시간이 많이 소요되어 임베디드 보드(embedded board)에서 동작하지 않는다는 문제가 있기 때문에, 본 실시예들을 통해 소형 임베디드 보드에서도 개별 돼지를 정확하게 탐지하는 방법을 개발하고자 한다.When trying to track pigs in a pig room using image information, an accurate detection process needs to be preceded in order to accurately track individual pigs. Although the prior art can perform pig detection with high accuracy using the Faster RCNN algorithm, there is a problem in that it does not operate on an embedded board due to a large amount of computation and a long execution time. We want to develop a method to accurately detect individual pigs in the embedded board as well.

먼저, 돈방 내 3mx3m 크기의 돈방의 바닥으로부터 약4.8m 높이에 설치된 카메라를 이용하여 돈방 내 돼지 영상을 녹화 및 적외선 영상을 획득할 수 있다. 획득한 적외선 영상에 영상 전처리를 사용하여 에지 검출 영상 및 전배경 분리 영상을 획득할 수 있고, 이전 단계에서 획득한 적외선 영상, 에지 검출 영상 및 전배경 분리 영상을 3채널의 합성 영상으로 합성할 수 있다. 3채널의 합성 영상 이미지를 원본, 1/2 크기로 줄인 영상, 1/4 크기로 줄인 영상 및 1/8 크기로 줄인 영상으로 총 4장의 3채널의 합성 영상 이미지들을 생성할 수 있다. First, by using a camera installed at a height of about 4.8 m from the floor of the 3 mx3 m pens in the pens, it is possible to record images of pigs in the pens and obtain infrared images. By using image preprocessing on the acquired infrared image, an edge detection image and a full background separation image can be obtained, and the infrared image, edge detection image and full background separation image obtained in the previous step can be synthesized into a three-channel composite image. have. It is possible to generate a total of 4 three-channel composite video images from the original, reduced to 1/2 size, reduced to 1/4 size, and reduced to 1/8 size of the three-channel synthesized video image.

그리고, YOLO 알고리즘의 각 레이어마다 생성된 4장의 3채널의 합성 영상 이미지들을 넣어, 학습 후 최종 단계의 특징 맵을 획득할 수 있다. 특징 맵을 연결(concatenation)한 영상을 YOLO 알고리즘의 입력으로 사용하여 학습된 중량(weight) 파일을 획득할 수 있다.Then, by putting the four three-channel composite image images generated for each layer of the YOLO algorithm, it is possible to obtain a feature map of the final stage after learning. A learned weight file may be obtained by using an image obtained by concatenating the feature map as an input to the YOLO algorithm.

YOLO의 필터 값을 근사화하기 위해 3x3 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 256개의 클러스터(cluster)를 생성할 수 있다. 예를 들어, 3x3 필터에서 기준 값 이상인 경우 1로 표기하고, 기준 값 미만인 경우 0으로 표시할 수 있다. 생성한 클러스터를 이용하여 각 레이어의 값을 패턴화할 수 있다.To approximate the filter value of YOLO, we can generate 256 clusters that can be made 0 and 1 with the center value as the reference value in the 3x3 filter. For example, in a 3x3 filter, a value greater than or equal to a reference value may be indicated as 1, and a value less than the reference value may be indicated as 0. The value of each layer can be patterned using the created cluster.

그리고, 스케줄링을 적용하고자 하는 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후 압축된 네트워크의 압축 및 복원 여부를 결정할 수 있다. 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산할 수 있다. 레이어를 압축하려는 경우, 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거하며, 복원하려는 경우에는 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원할 수 있다. 필터 제거 및 복원 후, 원하는 속도가 나오지 않았을 경우, 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 과정을 반복할 수 있다. 그리고 원하는 속도를 충족하였을 경우, 전이학습을 통한 파인튜닝(fine-tuning)을 수행할 수 있다. Then, after measuring the speed of the network to which the scheduling is to be applied in the embedded board to which the scheduling is to be applied, it is possible to determine whether to compress or restore the compressed network. The importance values of the filters can be calculated by obtaining the L2-Norm value of the filter in the network and the calculation amount of the filter. If you want to compress the layer, sort the filters in descending order based on their importance value and then remove the filter with the lowest value. To restore the layer, sort the filters in ascending order and restore the filter with the highest value. can If the desired speed is not obtained after removing and restoring the filter, the process of calculating the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the amount of calculation of the filter may be repeated. And when the desired speed is satisfied, fine-tuning through transfer learning can be performed.

이와 같이, 돈방 내 개별 돼지에 대해 영상 처리 기법, 이미지 피라미드와 필터 가지치기 및 클러스터링을 적용한 YOLO 알고리즘, 그리고 스케줄링 기법을 이용하여 임베디드 보드에서도 개별 돼지를 정확하게 탐지할 수 있다. In this way, individual pigs can be accurately detected even on the embedded board using image processing techniques, the YOLO algorithm with image pyramid and filter pruning and clustering applied, and scheduling techniques for individual pigs in the pig room.

이상과 같이, 실시예들에 따르면 실시간으로 개별 돼지를 탐지하여 추적이 가능하고, 이는 돼지들의 중량을 추정하는데 사용될 수 있으므로 돈사 내의 모든 돼지의 모니터링이 가능해지고 따라서 질병이 있는 돼지의 탐지나 저성장 돈 탐지가 가능하다. 특히 관리 인력의 부족으로 기존에는 육안으로 판단(약 110Kg)하던 돼지의 출하시기를 자동화할 수 있게 되어 더욱 정확한 시기에 출하할 수 있게 되고 개별 돼지의 모니터링 데이터를 바탕으로 돼지의 성장량을 비교하여 급여량을 조절, 출하시기를 앞당기거나 미룰 수 있게 됨으로써 돈방 내 돼지들을 효율적으로 관리할 수 있다.As described above, according to the embodiments, it is possible to detect and track individual pigs in real time, which can be used to estimate the weight of pigs, so that monitoring of all pigs in the pig house is possible, and thus it is possible to detect diseased pigs or low-growing pigs. detection is possible. In particular, due to the lack of management manpower, it is possible to automate the shipping time of pigs, which was previously judged visually (about 110 kg), so that they can be shipped at a more accurate time. Pigs in the pig room can be managed efficiently by being able to adjust the control and advance or postpone the shipping time.

이 기술을 영상 정보 기반의 돼지 무게 추정 기술에 접목시켜 사용한다면, 기존의 제품과는 달리 실시간으로 작동하는 신뢰성 있는 돼지 무게 모니터링이 가능해지고 나아가 현재 1세대에 머물러있는 스마트 축사 수준(온, 습도 등 시설의 환경적인 정보만을 제어)을 2세대 지능형 스마트 축사 수준으로 끌어올려 양돈 산업을 활성화시킬 수 있다. If this technology is combined with image information-based pig weight estimation technology, reliable pig weight monitoring that operates in real time unlike existing products is possible, and furthermore, the smart livestock barn level (temperature, humidity, etc.) It is possible to revitalize the pig industry by raising the level of the second-generation intelligent smart livestock house by controlling only the environmental information of the facility.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 컨트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPA(field programmable array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 컨트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The device described above may be implemented as a hardware component, a software component, and/or a combination of the hardware component and the software component. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable array (FPA), It may be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. A processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that can include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or apparatus, to be interpreted by or to provide instructions or data to the processing device. may be embodied in The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium 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 floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited embodiments and drawings, various modifications and variations are possible from the above description by those skilled in the art. For example, the described techniques are performed in an order different from the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (15)

특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 단계;
상기 적외선 영상, 상기 에지 검출 영상 및 상기 전배경 분리 영상을 3채널의 합성 영상으로 합성하는 단계;
상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계;
YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 단계;
스케줄링을 적용하고자 하는 상기 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 상기 네트워크의 압축 또는 복원 여부를 결정하는 단계;
상기 결정에 따라 상기 네트워크를 압축 또는 복원하는 단계; 및
상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 단계
를 포함하는, 동물 탐지 방법.
acquiring an edge detection image and a full background separation image through an image pre-processing process from an infrared image of one channel of an animal in a specific space;
synthesizing the infrared image, the edge detection image, and the entire background separation image into a three-channel composite image;
learning a network through an image pyramid by generating an image of at least one size using the three-channel composite image;
lightening the network through filter clustering so that it can operate on an embedded board based on the YOLO algorithm;
determining whether to compress or restore the network after measuring a speed of a network to which scheduling is to be applied in the embedded board to which scheduling is to be applied;
compressing or decompressing the network according to the determination; and
performing individual animal detection satisfying real-time requirements in the embedded board according to compression or restoration of the network
Including, an animal detection method.
제1항에 있어서,
특정공간에 설치된 카메라를 통해 상기 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 단계
를 더 포함하는, 동물 탐지 방법.
According to claim 1,
Acquiring an infrared image of one channel of an animal in the specific space through a camera installed in the specific space
Further comprising, an animal detection method.
제2항에 있어서,
상기 특정공간에 설치된 카메라를 통해 상기 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 단계는,
상기 특정공간의 천장 중앙에 설치된 상기 카메라를 통해 특정공간 내 상기 동물의 영상을 녹화하고 1채널의 상기 적외선 영상을 획득하는 것
을 특징으로 하는, 동물 탐지 방법.
3. The method of claim 2,
The step of acquiring an infrared image of one channel of an animal in the specific space through the camera installed in the specific space comprises:
Recording the image of the animal in a specific space through the camera installed in the center of the ceiling of the specific space and acquiring the infrared image of one channel
characterized in that, an animal detection method.
제1항에 있어서,
상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계는,
상기 3채널의 합성 영상을 원본, 1/2 크기로 줄인 영상, 1/4 크기로 줄인 영상 및 1/8 크기로 줄인 영상으로 구성하여 복수개의 3채널의 합성 영상들을 생성하는 것
을 특징으로 하는, 동물 탐지 방법.
According to claim 1,
The step of learning a network through an image pyramid by generating an image of at least one size using the three-channel composite image comprises:
Creating a plurality of three-channel composite images by composing the three-channel synthesized image with the original image, an image reduced to 1/2 size, an image reduced to 1/4 size, and an image reduced to 1/8 size
characterized in that, an animal detection method.
제1항에 있어서,
상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 단계는,
상기 YOLO 알고리즘의 각 레이어마다 생성된 상기 3채널의 합성 영상을 넣어, 학습 후 최종 단계의 특징 맵을 획득하는 단계; 및
상기 특징 맵을 연결한 영상을 상기 YOLO 알고리즘의 입력으로 사용하여 학습된 중량(weight) 파일을 획득하는 단계
를 포함하는, 동물 탐지 방법.
According to claim 1,
The step of learning a network through an image pyramid by generating an image of at least one size using the three-channel composite image comprises:
obtaining a feature map of a final stage after learning by putting the three-channel synthesized image generated for each layer of the YOLO algorithm; and
Obtaining a learned weight file by using the image to which the feature map is connected as an input of the YOLO algorithm
Including, an animal detection method.
제1항에 있어서,
상기 YOLO 알고리즘에 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 단계는,
상기 YOLO 알고리즘의 필터 값을 근사화하기 위해 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 클러스터를 생성하는 단계; 및
생성된 상기 클러스터를 이용하여 각 레이어의 값을 패턴화하는 단계
를 포함하는, 동물 탐지 방법.
According to claim 1,
Lightening the network through filter clustering so that it can operate on an embedded board based on the YOLO algorithm comprises:
generating clusters that can be made into 0 and 1 by using the center value in the filter as a reference value to approximate the filter value of the YOLO algorithm; and
patterning the value of each layer using the generated cluster
Including, an animal detection method.
제6항에 있어서,
상기 YOLO 알고리즘의 필터 값을 근사화하기 위해 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 클러스터를 생성하는 단계는,
상기 YOLO 알고리즘의 필터 값을 근사화하기 위해 3x3 필터에서 가운데 값을 기준 값으로 하여 0과 1로 만들 수 있는 256개의 클러스터를 생성하는 것
을 특징으로 하는, 동물 탐지 방법.
7. The method of claim 6,
In order to approximate the filter value of the YOLO algorithm, the step of generating a cluster that can be made into 0 and 1 by using the center value as a reference value in the filter,
To approximate the filter value of the YOLO algorithm, generating 256 clusters that can be made 0 and 1 with the center value as a reference value in a 3x3 filter
characterized in that, an animal detection method.
제1항에 있어서,
상기 네트워크를 압축 또는 복원하는 단계는,
상기 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 단계;
레이어를 압축하려는 경우, 상기 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거하는 단계; 및
상기 레이어를 복원하려는 경우, 상기 필터들의 중요도 값을 기준으로 상기 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원하는 단계
를 포함하는, 동물 탐지 방법.
According to claim 1,
Compressing or restoring the network comprises:
calculating importance values of the filters by obtaining an L2-Norm value of the filter in the network and a calculation amount of the filter;
removing the filter having the lowest value after sorting the filters in descending order based on the importance values of the filters when the layer is to be compressed; and
When restoring the layer, reconstructing the filter having the highest value after arranging the filters in ascending order based on the importance values of the filters
Including, an animal detection method.
제8항에 있어서,
상기 네트워크를 압축 또는 복원하는 단계는,
상기 필터의 제거 및 복원 후 원하는 속도가 나오지 않았을 경우, 상기 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하는 과정을 반복하는 것
을 특징으로 하는, 동물 탐지 방법.
9. The method of claim 8,
Compressing or restoring the network comprises:
If the desired speed is not obtained after removal and restoration of the filter, repeating the process of calculating the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the amount of calculation of the filter
characterized in that, an animal detection method.
제8항에 있어서,
상기 상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 단계는,
상기 필터의 제거 및 복원 후 원하는 속도를 충족하였을 경우, 전이학습을 통한 파인튜닝(fine-tuning)을 수행하는 단계
를 더 포함하는, 동물 탐지 방법.
9. The method of claim 8,
The step of performing individual animal detection satisfying real-time requirements in the embedded board according to compression or restoration of the network includes:
When the desired speed is satisfied after removal and restoration of the filter, performing fine-tuning through transfer learning
Further comprising, an animal detection method.
제1항에 있어서,
상기 특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 단계는,
개별 돼지 탐지를 수행하기 위해, 돈방 내 돼지의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 것
을 특징으로 하는, 동물 탐지 방법.
According to claim 1,
The step of acquiring an edge detection image and a full background separation image through an image pre-processing process from an infrared image of one channel of an animal in the specific space,
In order to perform individual pig detection, to obtain an edge detection image and a full background separation image through an image preprocessing process from an infrared image of one channel of a pig in a pig house
characterized in that, an animal detection method.
특정공간 내 동물의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 영상 전처리부;
상기 적외선 영상, 상기 에지 검출 영상 및 상기 전배경 분리 영상을 3채널의 합성 영상으로 합성하는 3채널의 합성 영상 합성부;
상기 3채널의 합성 영상을 이용하여 적어도 하나 이상의 크기의 영상을 생성하여 이미지 피라미드를 통한 네트워크를 학습하는 이미지 피라미드부;
YOLO 알고리즘을 기반하여 임베디드 보드에서 작동 가능하도록 필터 클러스터링을 통해 상기 네트워크를 경량화하는 필터 클러스터링부;
스케줄링을 적용하고자 하는 상기 임베디드 보드에서 스케줄링을 적용하고자 하는 네트워크의 속도를 측정한 후, 상기 네트워크의 압축 또는 복원 여부를 결정하는 압축 및 복원 판단부;
상기 결정에 따라 상기 네트워크를 압축 또는 복원하는 압축 및 복원부; 및
상기 네트워크의 압축 또는 복원에 따라 상기 임베디드 보드에서 실시간 필요요건을 만족하는 개별 동물 탐지를 수행하는 개별 동물 탐지부
를 포함하는, 동물 탐지 장치.
an image pre-processing unit that acquires an edge detection image and a full-background separated image from an infrared image of one channel of an animal in a specific space through an image pre-processing process;
a 3-channel composite image synthesizing unit for synthesizing the infrared image, the edge detection image, and the entire background separation image into a 3-channel composite image;
an image pyramid unit for learning a network through an image pyramid by generating an image of at least one size using the three-channel synthesized image;
a filter clustering unit that lightens the network through filter clustering so that it can be operated on an embedded board based on the YOLO algorithm;
a compression and restoration determination unit for determining whether to compress or restore the network after measuring a speed of a network to which scheduling is to be applied in the embedded board to which scheduling is to be applied;
a compression and decompression unit for compressing or restoring the network according to the determination; and
An individual animal detection unit that performs individual animal detection satisfying real-time requirements on the embedded board according to compression or restoration of the network
Including, animal detection device.
제12항에 있어서,
특정공간에 설치된 카메라를 통해 상기 특정공간 내 동물의 1채널의 적외선 영상을 획득하는 적외선 영상 획득부
를 더 포함하는, 동물 탐지 장치.
13. The method of claim 12,
An infrared image acquisition unit that acquires an infrared image of one channel of an animal in the specific space through a camera installed in the specific space
Further comprising, an animal detection device.
제12항에 있어서,
상기 압축 및 복원부는,
상기 네트워크 내 필터의 L2-Norm 값과 필터의 계산량을 구하여 필터들의 중요도 값들을 계산하고, 레이어를 압축하려는 경우, 상기 필터들의 중요도 값을 기준으로 필터들을 내림차순으로 정렬한 후 가장 낮은 값을 가진 필터를 제거하며, 상기 레이어를 복원하려는 경우, 상기 필터들의 중요도 값을 기준으로 상기 필터들을 오름차순으로 정렬한 후 가장 높은 값을 가진 필터를 복원하는 것
을 특징으로 하는, 동물 탐지 장치.
13. The method of claim 12,
The compression and restoration unit,
In the case of calculating the importance values of the filters by obtaining the L2-Norm value of the filter in the network and the computational amount of the filter, and compressing the layer, the filters are sorted in descending order based on the importance values of the filters and the filter with the lowest value to restore the layer, sorting the filters in ascending order based on the importance values of the filters and restoring the filter with the highest value
characterized in that, an animal detection device.
제12항에 있어서,
상기 영상 전처리부는,
개별 돼지 탐지를 수행하기 위해, 돈방 내 돼지의 1채널의 적외선 영상으로부터 영상 전처리 과정을 통해 에지 검출 영상 및 전배경 분리 영상을 획득하는 것
을 특징으로 하는, 동물 탐지 장치.
13. The method of claim 12,
The image preprocessor,
In order to perform individual pig detection, to obtain an edge detection image and a full background separation image through an image preprocessing process from an infrared image of one channel of a pig in a pig house
characterized in that, an animal detection device.
KR1020200008350A 2020-01-22 2020-01-22 Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo KR102338995B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020200008350A KR102338995B1 (en) 2020-01-22 2020-01-22 Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo
PCT/KR2020/001505 WO2021149857A1 (en) 2020-01-22 2020-01-31 Accurate animal detection method and apparatus using yolo-based light-weight bounding box detection and image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200008350A KR102338995B1 (en) 2020-01-22 2020-01-22 Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo

Publications (2)

Publication Number Publication Date
KR20210094751A KR20210094751A (en) 2021-07-30
KR102338995B1 true KR102338995B1 (en) 2021-12-14

Family

ID=76992856

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200008350A KR102338995B1 (en) 2020-01-22 2020-01-22 Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo

Country Status (2)

Country Link
KR (1) KR102338995B1 (en)
WO (1) WO2021149857A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102528507B1 (en) 2022-12-08 2023-05-08 주식회사 인터엑스 Hybrid thermal image based object detection method combining YOLO model and object tracking technique

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102522258B1 (en) 2021-10-21 2023-04-17 인하대학교 산학협력단 Autoencoder-based preprocessing method for YOLO real-time UAV detection and autoencoder
CN113920325B (en) * 2021-12-13 2022-05-13 广州微林软件有限公司 Method for reducing object recognition image quantity based on infrared image feature points
KR102457576B1 (en) * 2022-01-27 2022-10-21 국방과학연구소 Method and apparatus for detecting object based on multichannel infrared video
CN114842363B (en) * 2022-07-04 2022-10-18 南方电网科学研究院有限责任公司 Identification method and system for key power equipment in digital twin platform area
CN116188502B (en) * 2023-04-27 2023-07-21 尚特杰电力科技有限公司 Method for dividing infrared image of photovoltaic panel, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190251441A1 (en) 2018-02-13 2019-08-15 Adobe Systems Incorporated Reducing architectural complexity of convolutional neural networks via channel pruning
JP2020009048A (en) 2018-07-05 2020-01-16 株式会社日立製作所 Neural network learning device and learning method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100387106B1 (en) * 2001-04-06 2003-06-12 티오엠테크놀로지 주식회사 Segmentation method for interesting object in natural infrared images
KR101002966B1 (en) 2008-01-02 2010-12-21 (주)노매딕텍스 Method for Monitoring and Managing Birth and Breeding of Agricultural Products Based Network Clustering Device
US20180053091A1 (en) * 2016-08-17 2018-02-22 Hawxeye, Inc. System and method for model compression of neural networks for use in embedded platforms
KR101872015B1 (en) * 2017-11-30 2018-08-02 엘아이지넥스원 주식회사 Apparatus and method for generating infrared image
KR102142403B1 (en) * 2018-06-08 2020-08-07 광운대학교 산학협력단 A System of Searching the Channel Expansion Parameter for the Speed-up of Inverted Residual Block and the method thereof for low specification embedded system and the method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190251441A1 (en) 2018-02-13 2019-08-15 Adobe Systems Incorporated Reducing architectural complexity of convolutional neural networks via channel pruning
JP2020009048A (en) 2018-07-05 2020-01-16 株式会社日立製作所 Neural network learning device and learning method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Caiwen Ding 등, REQ-YOLO:A Resource-Aware, Efficient Quantization Framework for Object Detection on FPGAs, arXiv:1909.13396v1(2019.09.29.)
이수용 등, 모바일/임베디드 객체 및 장면 인식 기술 동향, 전자통신동향분석(2019.12.)
이준희 등, 키넥트 깊이 정보와 컨볼루션 신경망을 이용한 개별 돼지의 탐지, 한국콘텐츠학회논문지(2018.02.)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102528507B1 (en) 2022-12-08 2023-05-08 주식회사 인터엑스 Hybrid thermal image based object detection method combining YOLO model and object tracking technique

Also Published As

Publication number Publication date
WO2021149857A1 (en) 2021-07-29
KR20210094751A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
KR102338995B1 (en) Method and apparatus for accurately detecting animal through light-weight bounding box detection and image processing based on yolo
KR102068576B1 (en) Convolutional neural network based image processing system and method
CN108090470B (en) Face alignment method and device
CN111179249A (en) Power equipment detection method and device based on deep convolutional neural network
KR20180055070A (en) Method and device to perform to train and recognize material
JP6798614B2 (en) Image recognition device, image recognition method and image recognition program
CN110287936B (en) Image detection method, device, equipment and storage medium
KR102185979B1 (en) Method and apparatus for determining type of movement of object in video
CN112101547B (en) Pruning method and device for network model, electronic equipment and storage medium
US20160210988A1 (en) Device and method for sound classification in real time
KR20230171966A (en) Image processing method and device and computer-readable storage medium
KR102554149B1 (en) Method and apparatus for recognizing object, and method and apparatus for training recognition model
US10169874B2 (en) Surface-based object identification
KR102283452B1 (en) Method and apparatus for disease classification of plant leafs
KR20210111677A (en) Method for clipping neural networks, method for calculating convolution of neural networks and apparatus for performing the methods
CN112560881B (en) Object recognition method and device and data processing method
CN112906464A (en) Pedestrian detection and identification method, device, equipment and storage medium
Kumar et al. Bird species classification from images using deep learning
KR102127855B1 (en) Feature selection method with maximum repeatability
KR20200057835A (en) Clustring system and method for forecasting item demand of repair parts of military equipment by demand pattern
KR20190125569A (en) Method and Apparatus for Generating Scene Situation Information of Video Using Differentiation of Image Feature and Supervised Learning
KR20180131830A (en) Method and apparatus for recognizing object based on vocabulary tree
CN114298311A (en) Method and device for training and deducing by using neural network
KR101899242B1 (en) Method and Apparatus for Pig's Room Background Removal using Texture Information
KR20210059289A (en) Application of reinforcement learning for the advancement of forecasting item demand of repair parts of military equipment

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