• 프로젝트 정보

프로젝트명

실시간 특정 객체 모자이크 처리 프로그램

기술분야

이동통신

네트워크

방송·스마트미디어

전파·위성

기반SW·컴퓨팅

SW

디지털콘텐츠

정보보호

융합서비스

ICT 디바이스

주제영역

건강 생산성 생활 안전 엔터테인먼트

성과목표

특허출원 논문발표 앱등록 프로그램등록 기술이전

실용화 공모전(공모전명 ) 기타( )

수행예상기간

2019. 03. 01. ~ 2019. 11. 30.

프로젝트소개

및 제안배경

방송에서는 상표 또는 담배, 잔인한 장면 등 모자이크 처리를 원하는 특정 부분이 존재합니다. 기존의 방식에는 두 가지가 있습니다. 첫 번째로는 실제로 특정 부분을 불투명 테이프나 가리개 등으로 가리고 촬영하는 방식, 두 번째로는 편집자가 촬영된 영상에서 원하는 부분을 찾고 모자이크로 편집하는 방식이

있습니다. 이런 기존방식은 시간이 오래 걸리고 사람이 미처 확인하지 못한 부분으로 문제가 생길 수 있습니다.

저희 팀은 이러한 문제점을 해결하기 위해 딥러닝 기술 중 하나인 객체 탐지 알고리즘을 활용하고자 합니다. 이 기술의 이점을 활용한다면 사람이 놓칠 수 있는 부분의 캐치와 편집 작업을 빠른 속도로 처리 할 수 있습니다.

저희들은 프로젝트 주제로, 자동으로 원하는 객체를 찾아 블러 처리하는 프로그램을 만들고자 합니다.

주요기능

 

딥러닝 객체 탐지 알고리즘을 이용해 원하는 객체를 찾아냄.

찾아낸 객체를 모자이크 등으로 블러처리. (상표, , 담배, 얼굴 등)

특정 인물을 찾아서 그 사람만 모자이크 예외처리. (뉴스에서 아나운서를 제외하고 모자이크)

적용기술

딥러닝 기반의 객체탐지

학습시켜놓은 신경망 모델을 이용하여 원하는 객체를 탐지

영상처리

openCV를 이용한 블러 처리

예상결과물



기대효과 및

활용분야

영상 편집 시간 단축

편집자가 수작업으로 처리하는 것이 아니라 알고리즘이 알아서 처리하기 때문에 번거로운 과정 단축

상표 노출 방지

TV 예능 프로그램 등에서 의도치 않게 노출되는 상표들을 자동으로 블러 처리

유해 매체 차단

흉기, 담배 등의 유해 매체들을 블러 처리

  • 프로젝트 수행계획

 

1. 프로젝트 개요

 

. 프로젝트 소개

  • 제안 배경

 

방송에서는 상표 또는 담배, 잔인한 장면 등 모자이크 처리를 원하는 특정 부분이 존재합니다. 기존의 방식에는 두 가지가 있습니다. 첫 번째로는 실제로 특정 부분을 불투명 테이프나 가리개 등으로 가리고 촬영하는 방식, 두 번째로는 편집자가 촬영된 영상에서 원하는 부분을 찾고 모자이크로 편집하는 방식이 있습니다. 이런 기존방식은 시간이 오래 걸리고 사람이 미처 확인하지 못한 부분으로 문제가 생길 수 있습니다.

 

  • 목표

 

ㅇ 실시간 방송에서 부적합한 담배나 칼(유해물질) 또는 사람 얼굴, 상표 등 필요에 따른 모자이크 처리

 

ㅇ 편집자가 별도의 수작업을 할 필요 없이 자동으로 편집

ㅇ 특정 사람의 얼굴을 모자이크 처리에서 제외

ㅇ 실시간으로 모자이크 처리

 

. 추진배경 및 필요성

 

ㅇ 기존의 방식은 편집자가 편집 프로그램을 사용해 직접 모자이크를 하는 방식이므로 실시간 방송에서는 모자이크 처리가 어려움

 

ㅇ 딥러닝 기반의 객체인식 알고리즘을 적용하면 실시간 방송에서 적용이 가능

 

ㅇ 편집하는 과정이 생략되므로 시간이 단축

 

ㅇ 블러처리 기술에 이해가 깊지 않은 일반 개인 방송 크리에이터들에게 기술에 대한 이해 없이도 손쉽게 사용 가능


2. 프로젝트 내용

 

. 주요 기능

구분

기능

설명

SW

객체 탐지

학습시켜놓은 신경망 모델을 이용하여 블러 처리할 객체를 탐지

영상 처리

openCV를 사용한 탐지한 객체를 블러 처리

TX1 board

임베디드 환경

임베디드 환경에서의 학습모델 동작 확인

Camera

실시간 영상 수집

실시간으로 딥러닝 모델에 영상을 제공

 

. 적용 기술

 

ㅇ 딥러닝 기반의 객체 탐지 알고리즘

 

ㅇ 영상 처리기술을 이용한 블러 처리

 

ㅇ 특정 객체 추적 알고리즘

 

. 필요기자재(기자재/장비)

품목

활용계획

Jetson TX1

임베디드 환경에서의 테스트

Camera

입력 이미지 촬영

Usb hub

카메라 등 USB로 연결할 디바이스 활용

HDMI 케이블

모니터 연결에 필요

Cloud Server

Linux(Ubuntu) 가상 서버에서 개발

 

. 성과목표

성과목표

특허출원 논문발표 앱등록 프로그램등록 기술이전

실용화 공모전(공모전명 ) 기타( )

 

ㅇ 딥러닝 객체탐지 알고리즘의 이해

 

ㅇ 인공 신경망의 동작원리 이해

 

ㅇ 임베디드 환경에서의 딥러닝 학습 모델 최적화 이해


3. 프로젝트 수행방법

 

. 멘티(참여학생) 업무분장

번호

이름

대학

학과

학년

역할

담당업무

1

구창모

인천대학교

임베디드시스템 공학과

4

팀장

영상 처리 기능 구현

2

박남석

인천대학교

임베디드시스템 공학과

4

팀원

객체 추적 알고리즘 분석 및 구현

3

박성현

인천대학교

임베디드시스템 공학과

4

팀원

객체 탐지 알고리즘 분석 및 구현

4

박건우

인천대학교

임베디드시스템 공학과

4

팀원

데이터 수집 및 전처리, UI 구현

 

. 프로젝트 추진일정

구분

추진내용

추진일정

2

3

4

5

6

7

8

9

10

11

계획

프로젝트 아이디어 계획 및 수정

 

 

 

 

 

 

 

 

 

 

분석

딥러닝 기반 객체 탐지 알고리즘 분석

 

 

 

 

 

 

 

 

 

 

영상 처리 기법 분석

 

 

 

 

 

 

 

 

 

 

설계

객체 탐지 알고리즘을 활용한 모델 설계

 

 

 

 

 

 

 

 

 

 

개발

객체 탐지 알고리즘을 활용한 모델 개발

 

 

 

 

 

 

 

 

 

 

영상 처리 모델 개발

 

 

 

 

 

 

 

 

 

 

임베디드 환경

 

 

 

 

 

 

 

 

 

 

테스트

완성된 모델 테스트(+임베디드 환경)

 

 

 

 

 

 

 

 

 

 

종료

개발 모델 최적화 및 마무리

 

 

 

 

 

 

 

 

 

 

오프라인

미팅계획

오프라인 회의

 

 

 

 

 

 

 

 

 

 

 

. 의사소통방법

 

ㅇ 오프라인 미팅(멘토 : 1/멘티 : 상시)

 

ㅇ 온라인 소통(상시)

 

. 프로젝트 Ground Rule (기본원칙)

 

ㅇ 최소 월 1회 오프라인 미팅

 

ㅇ 개발 현황 보고 및 피드백(상시)


  • 기대효과 및 활용분야

 

1. 기대효과

 

. 작품의 기대효과

 

ㅇ 이전 방송계에서 실시간으로 송출하는 영상에서 사용하였던 기술은 영상 속 인물 전체의 얼굴을 블러 처리. 이전에는 수작업으로 처리하였던 상표 및 유해매체들을 딥러닝 기술을 활용하여 수작업이 아닌 기계의 능동적인 처리.

 

ㅇ 블러 처리에 대한 기술에 이해가 깊지 않은 일반 개인 방송 크리에이터들에게 기술에 대한 이해 없이 손쉽게 사용 가능. 이로 인해 방송매체법에 대한 피해를 방지.

 

. 참여 멘티의 교육적 기대효과

 

ㅇ 대학과정에서 학습해 온 영상 공학을 활용.

 

ㅇ 머신 러닝을 넘어서 딥러닝에 이르는 깊이 있는 학습.

 

2. 활용분야

 

Live 영상을 송출하는 방송계.

 

ㅇ 늘어나는 개인 방송 크리에이터들의 활용 가능.

 

 

 

 

 

 

 

 

전시작품으로 입선했지만 상위권에 들지는 못했습니다.

내년에 다른 주제로 공모전을 할때는 구체적인 계획과 많은 시간을 투자하여 좋은 결과를 얻을 수 있도록 하겠습니다.

이렇게 좋은 경험을 할 수 있도록 서포트해주신 멘토님께 정말 감사드립니다.

또 저와 함께 일년동안 공모전을 준비한 팀원들에게도 감사합니다.

좋은 경험이 되었던 것 같습니다.

저희는 github에서 오픈소스로 올라온 얼굴인식 소스를 가지고 기능을 추가하여 공모전에 출마했습니다.

오픈소스 : https://github.com/yu4u/age-gender-estimation

수정은 demo.py라는 소스만 수정했고 딥러닝에 필요한 소스들은 그대로 사용했습니다.

문제가 발생하면 삭제될 수 있음을 알려드립니다.

 

  • 수정한 demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
import os
import cv2
import dlib
import numpy as np
import argparse
import time
import threading
import random
import socket
import glob
import matplotlib.pyplot as plt
import sys
 
from openpyxl import Workbook
from openpyxl import load_workbook
from PyQt5.QtCore import QTimer
from PyQt5.QtGui import QImage, QPixmap
from PyQt5.QtWidgets import QApplication, QDialog, QWidget, QVBoxLayout, QHBoxLayout, QBoxLayout
from PyQt5.uic import loadUi
from PyQt5.uic.properties import QtCore
 
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotwidgetfile import matplotwidgetFile
 
from contextlib import contextmanager
from wide_resnet import WideResNet
from keras.utils.data_utils import get_file
 
global myimge
global Agecnt
global Range
global exitflag
global sock
global sock_on
global th_flag
global testflag
global name
global xl_row
 
myimge = cv2.imread("waiting.png")
Agecnt = [000000000]
Agevideo = [r"C:\ProgramData\Age\age-gender-estimation-master\ad\teenF",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\YouthF",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\middleF",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\oldF",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\teenM",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\YouthM",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\middleM",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\oldM",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\079war01.mp4",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\068war02.mp4",
            r"C:\ProgramData\Age\age-gender-estimation-master\ad\109war03.mp4"]
 
Range = ['teenF''YouthF''middleF''oldF''teenM''YouthM''middleM''oldM''warning']
exitflag = 0
sock_on = 1
th_flag = 0
testflag = 0
 
if sock_on == 1:
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,1)
    sock.connect(('192.168.43.247'5005))
 
 
class Video(object):
    def __init__(self, path):
        self.path = path
 
    def play(self):
        from os import startfile
        startfile(self.path)
 
 
class Movie_MP4(Video):
    type = "MP4"
 
 
class Life2Coding(QDialog):
 
    def __init__(self):
        super(Life2Coding, self).__init__()
        loadUi('life2coding.ui', self)
 
        self.setGeometry(900301006729)
        # self.timer = QTimer(self)
        self.imgtimer = QTimer(self)
 
        self.startButton.clicked.connect(self.start_webcam)
        self.stopButton.clicked.connect(self.stop_webcam)
        self.warningButton.clicked.connect(self.warning_event)
        self.resetButton.clicked.connect(self.reset)
        self.fireButton.clicked.connect(self.fire)
        self.exitButton.clicked.connect(self.ext)
 
    def start_webcam(self):
        global Agecnt
        global exitflag
        global th_flag
        global name
        global xl_row
        Agecnt = [000000000]
        wb = Workbook()
        xl_row = 0
        ws1 = wb.active  # 현재 열려 있는 Sheet
        now = time.gmtime(time.time())
        now_list = list(now)
        name = str(now_list[0]) + "_" + str(now_list[1]) + "_" + str(now_list[2]) + "-" + str(now_list[3]) + "__" + str(
            now_list[4]) + "__" + str(now_list[5])
 
        ws1.title = name
        wb.save("D:/" + ws1.title + ".xlsx")
 
        Agecnt = [000000000]
        exitflag = 0
 
        self.imgtimer.timeout.connect(self.update_frame)
        # self.timer.timeout.connect(self.graph)
        self.imgtimer.start(1000)
        # self.timer.start(1000)
 
        if (th_flag == 0):
            self.th_main = threading.Thread(target=main, args=())
            # self.th_main.daemon = True
            self.th_main.start()
 
        th_flag = 1
        print("start webcam")
 
    def stop_webcam(self):
        global exitflag
        global th_flag
        exitflag = 1
        # self.timer.stop()
        self.imgtimer.stop()
        self.th_main.join()
        if ad_output.timer.is_alive():
            ad_output.timer.cancel()
        if warning_output.timer_w.is_alive():
            warning_output.timer_w.cancel()
        th_flag = 0
        if sock_on == 1:
            sock.send("qqqqqqqq".encode())
            sock.close()
        print("stop webcam")
 
    def update_frame(self):
        height, width, channel = myimge.shape
        bytesPerLine = 3 * width
        qImg = QImage(myimge.data, width, height, bytesPerLine, QImage.Format_RGB888).rgbSwapped()
        pixmap = QPixmap(qImg)
        self.imgLabel.setPixmap(pixmap)
        self.widget.canvas.ax.clear()
        self.widget.canvas.ax.bar(Range, Agecnt)
        self.widget.canvas.draw()
        print("update_frame")
 
    def graph(self):
        self.widget.canvas.ax.clear()
        self.widget.canvas.ax.bar(Range, Agecnt)
        self.widget.canvas.draw()
 
    def reset(self):
        global Agecnt
        global name
        global xl_row
        wb = load_workbook("D:/" + name + ".xlsx")
        ws = wb.active
        xl_row = xl_row + 1
        for col in range(19):
            ws.cell(row=xl_row, column=col, value=int(Agecnt[col - 1]))
 
        wb.save("D:/" + name + ".xlsx")
 
        Agecnt = [000000000]
        print("reset!")
        # sock.send("reset123".encode())
 
    def warning_event(self):
        Agecnt[8= -1
        warning_output()
        # movie = Movie_MP4(Agevideo[8])
        # movie.play()
 
    def fire(self):
        Agecnt[8= -2
        # movie = Movie_MP4(Agevideo[8])
        # movie.play()
        warning_output()
 
    def ext(self):
        Agecnt[8= -3
        warning_output()
 
 
def ad_output():
    global Agecnt
    if Agecnt[8== 0:
        Max = Agecnt.index(max(Agecnt))
        if not Agecnt[Max] == 0:  # Data 가 있을 경우 해당 나이에 맞는 광고 표출
            path = random.choice(glob.glob(Agevideo[Max] + "\*"))  # 랜덤 파일 추출
            f_name = os.path.split(path)  # 파일명 추출 s[1] -> 파일명
            T = int(f_name[1][0]) * 100 + int(f_name[1][1]) * 10 + int(f_name[1][2])  # 파일명에서 시간 추출
            s_d = os.path.splitext(path)  # mp4 제외 파일명만 추출
            s_d = os.path.split(s_d[0])
 
            if sock_on == 1:
                sock.send(s_d[1].encode())
                print("동영상 제목 전송")
                while 1:
                    receive = sock.recv(8)
                    print(receive)
                    if receive :
                        print("나감")
                        break;
 
            ad_output.timer = threading.Timer(T, ad_output)
            #movie = Movie_MP4(path)
            #movie.play()
            ad_output.timer.start()
            
        else:  # Data 값들이 없을 경우 2초 간격으로 타이머 반복 실행
            ad_output.timer = threading.Timer(2, ad_output)
            ad_output.timer.start()
    else:
        ad_output.timer.cancel()
        print("광고 타이머가 Warning 에 의해 종료되었습니다.")
 
 
def warning_output():
    global Agecnt
    if Agecnt[8!= 0:
        w_index = -1 * Agecnt[8+ 7
        f_name = os.path.split(Agevideo[w_index])  # 파일명 추출 s[1] -> 파일명
        T = int(f_name[1][0]) * 100 + int(f_name[1][1]) * 10 + int(f_name[1][2])  # 파일명에서 시간 추출
 
        s_d = os.path.splitext(Agevideo[w_index])  # mp4 제외 파일명만 추출
        s_d = os.path.split(s_d[0])
        if sock_on == 1:
            sock.send(s_d[1].encode())
            print("Warning 동영상 제목 전송")
 
        warning_output.timer_w = threading.Timer(T, warning_output)
        #movie = Movie_MP4(Agevideo[w_index])
        #movie.play()
        warning_output.timer_w.start()
    else:
        warning_output.timer_w.cancel()
        print("Warning 타이머가 reset에 의해 종료되었습니다.")
 
 
pretrained_model = "https://github.com/yu4u/age-gender-estimation/releases/download/v0.5/weights.18-4.06.hdf5"
modhash = '89f56a39a78454e96379348bddd78c0d'
 
 
def get_args():
    parser = argparse.ArgumentParser(description="This script detects faces from web cam input, "
                                                 "and estimates age and gender for the detected faces.",
                                     formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument("--weight_file", type=str, default=None,
                        help="path to weight file (e.g. weights.18-4.06.hdf5)")
    parser.add_argument("--depth", type=int, default=16,
                        help="depth of network")
    parser.add_argument("--width", type=int, default=8,
                        help="width of network")
    args = parser.parse_args()
    return args
 
 
def draw_label(image, point, label, font=cv2.FONT_HERSHEY_SIMPLEX,
               font_scale=1, thickness=2):
    size = cv2.getTextSize(label, font, font_scale, thickness)[0]
    x, y = point
    cv2.rectangle(image, (x, y - size[1]), (x + size[0], y), (25500), cv2.FILLED)
    cv2.putText(image, label, point, font, font_scale, (255255255), thickness)
 
 
@contextmanager
def video_capture(*args, **kwargs):
    cap = cv2.VideoCapture(*args, **kwargs)
    try:
        yield cap
    finally:
        cap.release()
 
 
def yield_images():
    # capture video
    with video_capture(0) as cap:
        cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
        cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
 
        while True:
            # get video frame
            ret, img = cap.read()
 
            if not ret:
                raise RuntimeError("Failed to capture image")
 
            yield img
 
 
def main():
    global exitflag
    global testflag
    ad_output()
    print("일단 메인문은 들어왔습니다잉")
    args = get_args()
    depth = args.depth
    k = args.width
    weight_file = args.weight_file
    model = 0
    if not weight_file:
        weight_file = get_file("weights.18-4.06.hdf5", pretrained_model, cache_subdir="pretrained_models",
                               file_hash=modhash, cache_dir=os.path.dirname(os.path.abspath(__file__)))
        print("웨이트 파일이 없으므로 받아옵니다.")
        print(weight_file)
    print("웨이트 파일 받습니다.")
    # for face detection
    detector = dlib.get_frontal_face_detector()
    print("얼굴인식 라이브러리 사용")
    # load model and weights
    img_size = 64
    print("이미지 사이즈 = 64")
    model = WideResNet(img_size, depth=depth, k=k)()
    print("wideResNet 설정")
    if testflag == 0:
        model.load_weights(weight_file)
    print("사진 찍기 전!")
    for img in yield_images():
        input_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
        img_h, img_w, _ = np.shape(input_img)
 
        # detect faces using dlib detector
        detected = detector(input_img, 1)
        faces = np.empty((len(detected), img_size, img_size, 3))
 
        if len(detected) > 0:
            for i, d in enumerate(detected):
                x1, y1, x2, y2, w, h = d.left(), d.top(), d.right() + 1, d.bottom() + 1, d.width(), d.height()
                xw1 = max(int(x1 - 0.4 * w), 0)
                yw1 = max(int(y1 - 0.4 * h), 0)
                xw2 = min(int(x2 + 0.4 * w), img_w - 1)
                yw2 = min(int(y2 + 0.4 * h), img_h - 1)
                cv2.rectangle(img, (x1, y1), (x2, y2), (25500), 2)
                # cv2.rectangle(img, (xw1, yw1), (xw2, yw2), (255, 0, 0), 2)
                faces[i, :, :, :] = cv2.resize(img[yw1:yw2 + 1, xw1:xw2 + 1, :], (img_size, img_size))
 
            # predict ages and genders of the detected faces
            results = model.predict(faces)
            predicted_genders = results[0]
            ages = np.arange(0101).reshape(1011)
            predicted_ages = results[1].dot(ages).flatten()
 
            # draw results
            for i, d in enumerate(detected):
                label = "{}, {}".format(int(predicted_ages[i]),
                                        "F" if predicted_genders[i][0> 0.5 else "M")
                draw_label(img, (d.left(), d.top()), label)
                age_index = (int)(predicted_ages[i] / 20)
                if predicted_genders[i][0> 0.5:
                    if age_index < 3:
                        Agecnt[age_index] = Agecnt[age_index] + 1
                    else:
                        Agecnt[3= Agecnt[3+ 1
                else:
                    if age_index + 4 < 7:
                        Agecnt[age_index + 4= Agecnt[age_index + 4+ 1
                    else:
                        Agecnt[7= Agecnt[7+ 1
 
        global myimge
        myimge = img
 
        print("main 실행")
 
        # cv2.imshow("result", img)
        # key = cv2.waitKey(30)
        # cv2.waitKey(30)
        if exitflag == 1:
            break
        # while(exitflag):
        # time.sleep(2)
    print("main 끝")
    exitflag = 0
    testflag = 1
 
 
if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = Life2Coding()
    window.setWindowTitle('AD title')
 
    window.show()
    app.exec_()
    # sys.exit(app.exec_())
cs
  •  UI를 사용하고 start, reset을 누를때마다 현재 카운트된 사람들의 기록을 엑셀파일에 저장하게 했기 때문에 UI에 필요한 이미지파일과 저장 파일의 경로가 달라서 오류가 발생할 수 있습니다.
  • 딥러닝과 demo파일을 실행하는데 필요한 import파일들을 먼저 다운받으셔야 합니다.

 

+ Recent posts