<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/resources/xsl/jats-html.xsl"?>
<article article-type="research-article" dtd-version="1.1" xml:lang="ko" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<front>
	<journal-meta>
		<journal-id journal-id-type="publisher-id">jkits</journal-id>
		<journal-title-group>
		<journal-title>한국지식정보기술학회 논문지</journal-title>
		<journal-title xml:lang="en">Journal of Knowledge Information Technology and Systems</journal-title>
		</journal-title-group>
		<issn pub-type="ppub">1975-7700</issn>
		<publisher>
		<publisher-name>한국지식정보기술학회</publisher-name>
		<publisher-name xml:lang="en">Korea Knowledge Information Technology Society</publisher-name>
		</publisher>
	</journal-meta>
	<article-meta>
		<article-id pub-id-type="publisher-id">jkits_2020_15_06_1033</article-id>
		<article-id pub-id-type="doi">10.34163/jkits.2020.15.6.012</article-id>
		<article-categories>
			<subj-group>
				<subject>Research Article</subject>
			</subj-group>
		</article-categories>
		<title-group>
			<article-title>두들 로봇 서비스의 설계 및 구현</article-title>
			<trans-title-group xml:lang="en">
				<trans-title>Design and Implementation of Doodle Robot Service</trans-title>
			</trans-title-group>
		</title-group>
		<contrib-group>
			<contrib contrib-type="author" xlink:type="simple">
				<name-alternatives>
					<name name-style="eastern">
						<surname>송</surname>
						<given-names>주연</given-names>
					</name>
					<name name-style="western" xml:lang="en">
						<surname>Song</surname>
						<given-names>Ju-Yeon</given-names>
					</name>
				</name-alternatives>
					<xref ref-type="aff" rid="A1"><sup>1</sup></xref>
			</contrib>
			<contrib contrib-type="author" xlink:type="simple">
				<name-alternatives>
					<name name-style="eastern">
						<surname>이</surname>
						<given-names>강희</given-names>
					</name>
					<name name-style="western" xml:lang="en">
						<surname>Lee</surname>
						<given-names>Kang-Hee</given-names>
					</name>
				</name-alternatives>
				<xref ref-type="fn" rid="fn001">*</xref>
				<xref ref-type="aff" rid="A2"><sup>2</sup></xref>
			</contrib>
					</contrib-group>
		<aff-alternatives id="A1">
			<aff><sup>1</sup><italic>숭실대학교 글로벌미디어학부 학사과정</italic></aff>
			<aff xml:lang="en"><italic>Global School of Media, Soongsil University</italic></aff>
		</aff-alternatives>
		<aff-alternatives id="A2">
			<aff><sup>2</sup><italic>숭실대학교 글로벌미디어학부 교수</italic></aff>
			<aff xml:lang="en"><italic>Global School of Media, Soongsil University</italic></aff>
		</aff-alternatives>
		<author-notes>
			<fn id="fn001"><label>*</label><p>Corresponding author, Kang-Hee Lee, is with the Global School of Media, Soongsil University, 369 Sando-Ro Dongjak-Gu, Seoul, 06978, KOREA.</p><p><italic>E-mail address</italic>: <email>kanghee.lee@ssu.ac.kr</email></p></fn>
		</author-notes>
		<pub-date pub-type="ppub">
			<month>12</month>
			<year>2020</year>
		</pub-date>
		<volume>15</volume>
		<issue>6</issue>
		<fpage>1033</fpage>
		<lpage>1046</lpage>
		<history>
			<date date-type="received">
				<day>29</day>
				<month>10</month>
				<year>2020</year>
			</date>
			<date date-type="rev-recd">
				<day>09</day>
				<month>12</month>
				<year>2020</year>
			</date>
			<date date-type="accepted">
				<day>11</day>
				<month>12</month>
				<year>2020</year>
			</date>
		</history>
		<permissions>
			<copyright-statement>&#x00A9; 2020 KKITS All rights reserved</copyright-statement>
			<copyright-year>2020</copyright-year>
		</permissions>
		<abstract>
		<title>요약</title>
		<p>본 논문은 코로나 19사태가 장기화된 상황에서 오프라인 매장에 방문하지 않아도 손쉽게 제품을 커스터마이징 할 수 있는 인공지능 낙서로봇 플랫폼을 제안한다. 낙서로봇 플랫폼은 안드로이드 애플리케이션과 Flask 서버 그리고 Dobot 로봇팔로 구성된다. 제안하는 플랫폼을 통해 사용자가 안드로이드 애플리케이션에서 사진을 촬영하면 그 사진을 인공지능이 낙서 그림으로 재구성한 후 펜 모듈이 달린 로봇팔이 실물 그림으로 그려준다. YOLO 알고리즘으로 사진 속 객체들을 탐지하고 객체가 위치한 곳에 객체와 같은 크기의 낙서 데이터를 배치해서 사진을 낙서 그림으로 재구성하였다. 재구성하는 과정에서 일정크기 이하의 객체들은 배제하는 등 전처리 단계를 진행함으로써 낙서 이미지의 완성도를 높였다. 본 논문이 제안하는 플랫폼을 통해 사용자들이 특별한 기술이나 도구 없이도 가정에서 자기만의 가치를 담은 커스터마이징 제품을 제작할 수 있을 것이라 기대한다.</p>
		</abstract>
		<trans-abstract xml:lang="en">
		<title>ABSTRACT</title>
		<p>This paper proposes an artificial intelligence doodle robot platform that can easily customize products without visiting offline stores in the pandemic situation caused by COVID-19. The doodle robot platform consists of an Android application, a Flask server, and a Dobot robot arm. When a user takes a picture in an Android application through the proposed platform, artificial intelligence reconstructs the picture into a doodle drawing, and then a robot arm with a pen module starts to draw it on paper. The YOLO algorithm detects objects in the photo sent by a user and places the same sized doodle data as the object where the object is located, and reconstructs the picture into a doodle drawing. In the process of reconstruction, the completeness of doodle images was enhanced by excluding objects of a certain size or smaller, allowing only those that are not small in size to be converted into doodle images to create abstract and neat doodle images. As a result, the user-entered photos could be reproduced naturally in doodle drawings. Through the platform proposed by this paper, we expect users to be able to create customized products that contain their own value at home without any special skills or tools.</p>
		</trans-abstract>
		<kwd-group kwd-group-type="author" xml:lang="en">
<title>K E Y W O R D S</title>
			<kwd>Android smartphones</kwd>
			<kwd>Computer vision</kwd>
			<kwd>Object detection</kwd>
			<kwd>YOLO</kwd>
			<kwd>Deep learning</kwd>
			<kwd>Flask server</kwd>
			<kwd>COVID-19</kwd>
			<kwd>Quick</kwd>
			<kwd>Draw!</kwd>
			<kwd>Artificial intelligence</kwd>
			<kwd>Wireless networks</kwd>
			<kwd>Robot arm</kwd>
			<kwd>Remote robot control</kwd>
		</kwd-group>
	</article-meta>
</front>
<body>
<sec id="sec001" sec-type="intro">
	<title>1. 서 론</title>
	<p>커스터마이즈(Customize)란 소비자 요구에 맞춰 제품 또는 기능을 제작·변경하는 것을 말한다. MZ세대를 중심으로 가치관에 맞는 소비를 지향하는 가치 소비 현상과 본인의 기호에 맞게 적극적으로 제품을 창조하는 크리슈머(cresumer)가 등장하면서 커스터마이징 제품에 대한 수요가 폭발적으로 증가하고 있다[<xref ref-type="bibr" rid="B001">1</xref>]. 이러한 시장의 흐름에 발맞춰 나이키, 반스 등 주요 신발 회사는 일부 실물 매장에 방문하면 전문가가 고객의 요구에 맞게 신발을 커스텀해주는 서비스를 제공하고 있고 많은 인기를 끌고 있다. 또한 사설 커스텀 업체도 많이 생겨나는 추세다. 하지만 커스터마이징 제품은 대부분 수작업으로 만들어지기 때문에 공산품에 비해 많은 비용과 시간이 소요된다.</p>
	<p>이러한 문제를 해결하기 위해 본 논문은 인공지능 낙서로봇 플랫폼을 제안한다. 인공지능 낙서 로봇 플랫폼은 사용자가 안드로이드 애플리케이션에서 사진을 선택하면 그 사진을 낙서 그림으로 재구성한 후 펜 모듈이 달린 로봇팔이 실물 그림으로 그려주는 기능을 제공하는 플랫폼이다. 이 플랫폼을 이용하면 별 다른 손재주나 도구가 없어도 기존의 공산품을 집에서도 손쉽게 커스터마이징 할 수 있다. 낙서로봇 플랫폼은 안드로이드 애플리케이션과 Flask 서버 그리고 Dobot 로봇팔로 구성된다. 기술의 편의상 안드로이드 애플리케이션은 Doodle App, Flask 서버 부분은 Doodle Server, 그리고 Dobot 로봇팔 부분은 Doodle Bot으로 명칭하겠다.</p>
	<p>본 논문은 구성은 다음과 같다. 제 2장에서는 객체 탐지 신경망과 Quick, Draw! Dataset이 사용된 기존의 연구를 알아보고 YOLO 알고리즘과 Quick, Draw! Dataset에 대한 연구를 진행한다. 제3장에서는 낙서 로봇 플랫폼의 구조와 설계 내용에 관해 서술한다. 제4장에서는 3장에서 설계한 내용을 바탕으로 구현하고 실험한 내용을 서술한다. 마지막 제5장 결론에서는 낙서 로봇 플랫폼의 의의를 기술하고 개선 방안을 제시한다.</p>
</sec>
<sec id="sec002">
	<title>2. 관련 연구</title>
	<sec id="sec002-1">
		<title>2.1. Draw This</title>
		<p>호주의 개발자 Dan Macnish는 구글의 Quick, Draw! Dataset과 객체탐지 알고리즘을 이용해서 Draw This라는 인공지능 즉석 사진기를 제작했다. Draw This는 사용자가 라즈베리 파이에 부착된 카메라로 사진을 촬영하면 구글의 사전 훈련된 신경망이 촬영된 사진 속 객체를 탐지한 후 Quick, Draw! Dataset에서 객체에 해당하는 낙서 이미지를 임의로 하나 선택해서 열 전사 프린터(thermal printer)에 출력하는 방식으로 동작된다.</p>
		<p>디지털 카메라로 자전거를 동일한 지점에서 100번 촬영한다면 디지털 카메라는 똑같은 자전거 사진 100개를 만들어내지만 Draw This로 같은 위치에서 같은 자전거를 100번 촬영한다면 서로 다른 100개의 자전거 낙서 이미지들을 얻을 수 있다. 만약 인공지능 신경망이 사물을 정확히 탐지하는데 실패해서 자전거 이미지가 아니라 오토바이나 자동차같이 뜬금없는 이미지가 출력될 수도 있다. 이렇게 출력되는 결과를 예측할 수 없기 때문에 Draw This는 사용자에게 디지털 카메라와 다른 아날로그적인 재미요소를 선사한다[<xref ref-type="bibr" rid="B002">2</xref>].</p>
		<fig id="f001" orientation="portrait" position="float">
			<label>그림 1.</label>
			<caption>
				<title>Draw This 시연 사진</title>
				<p>Figure 1. Demonstration photo of Draw This</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f001.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>낙서로봇 플랫폼은 Draw This에 사용된 객체탐지 알고리즘과 Quick, Draw! Dataset를 사용해서 사진을 촬영하고 낙서 이미지를 생성한다. Draw This는 Tensorflow Object Detection API를 사용해서 객체를 탐지했는데 본 논문은 YOLO 알고리즘이 빠른 시간안에 보다 정확하게 객체 탐지를 한다고 판단하여 YOLO 알고리즘을 이용해서 객체 탐지 기능을 구현했다[<xref ref-type="bibr" rid="B003">3</xref>].</p>
	</sec>
	<sec id="sec002-2">
		<title>2.2. YOLO(You Only Look Once)</title>
		<p>YOLO는 한 번의 계산으로 이미지 전체에서 경계박스(bounding boxes)와 객체 분류 가능성(class probabilities)을 예측하는 객체검출 알고리즘이다. 1초에 155개의 frame을 처리하면서 COCO(Common Object in Context: 상황 공동개체)에 대해 약 57.9%의 mAP(mean Average Precision: 객체검출 알고리즘에서 사용되는 정확성 측정방법)를 가진다[<xref ref-type="bibr" rid="B004">4</xref>].</p>
		<fig id="f002" orientation="portrait" position="float">
			<label>그림 2.</label>
			<caption>
				<title>YOLO 모델의 구조</title>
				<p>Figure 2. The Architecture of YOLO[<xref ref-type="bibr" rid="B004">4</xref>]</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f002.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>YOLO 구조는 &#x003C;<xref ref-type="fig" rid="f002">그림 2</xref>&#x003E;과 같이 총 24개의 컨볼루션 레이어와 2개의 완전 연결층 레이어로 이루어져 있다. 전체적인 네트워크 구조는 GoogleNet에서 많은 영향을 받았지만 GoogleNet에서 사용되는 인셉션 모듈 대신에 1*1 컨볼루션 레이어와 3*3 컨볼루션 레이어를 사용했고 결정적으로 최종 출력 레이어에서 객체의 지역화(localization)와 객체의 클래스 분류가 동시에 이루어지기 때문에 네트워크 모델이 매우 간단해서 R-CNN과 같은 다른 객체 탐지 알고리즘에 비해 훨씬 빠르면서 정확한 성능을 낼 수 있다.</p>
		<fig id="f003" orientation="portrait" position="float">
			<label>그림 3.</label>
			<caption>
				<title>YOLO 모델</title>
				<p>Figure 3. The Model of YOLO</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f003.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p> &#x003C;<xref ref-type="fig" rid="f002">그림 2</xref>&#x003E;의 첫 번째 이미지에서 보이는 것처럼 YOLO 네트워크는 예측하고자 하는 이미지를 S×S 사이즈의 grid cell로 나눈 다음 하나의 cell이 하나의 객체를 예측하도록 한다.  &#x003C;<xref ref-type="fig" rid="f002">그림 2</xref>&#x003E;의 가운데 이미지를 보면 cell이 어떻게 객체를 검출하는지 알 수 있다.</p>
		<p>각각의 cell들은 B개의 경계박스를 가지는데 경계박스가 실제로 객체를 포함하고 있을 가능성을 나타내는 confidence score을 가진다. <xref ref-type="fig" rid="f003">그림 3</xref>의 가운데 두 개 중 첫 번째 이미지를 예를 들자면, B가 2라고 가정할 때, 7×7×2=98이므로 총 98개의 경계박스가 생성되는데 confidence score가 높을수록 경계박스를 더 진하게 생성한다. confidence score는 아래 <xref ref-type="disp-formula" rid="d001">식 1</xref>과같이 표현하는데 객체가 존재할 가능성을 나타내는 <italic>P<sub>r</sub></italic>(<italic>Object</italic>)와 객체 검출 알고리즘을 평가하는 연산인 IOU(Intersection Over Union)의 곱으로 나타낸다.</p>
<disp-formula-group>
<disp-formula id="d001">
	<label>(1)</label>
<mml:math id="m01-1"><mml:msub><mml:mi>P</mml:mi><mml:mi>r</mml:mi></mml:msub><mml:mfenced><mml:mrow><mml:mi>O</mml:mi><mml:mi>b</mml:mi><mml:mi>j</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfenced><mml:mo>&#x2217;</mml:mo><mml:mi>I</mml:mi><mml:mi>O</mml:mi><mml:mi>U</mml:mi><mml:mfrac><mml:mrow><mml:mi>t</mml:mi><mml:mi>r</mml:mi><mml:mi>u</mml:mi><mml:mi>t</mml:mi><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:mfrac></mml:math>
</disp-formula>
<disp-formula id="d002">
	<label>(2)</label>
<mml:math id="m02-1"><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="italic">r</mml:mi></mml:msub><mml:mfenced><mml:mrow><mml:mi>C</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="italic">i</mml:mi></mml:msub><mml:mo>&#x2223;</mml:mo><mml:mi>O</mml:mi><mml:mi>b</mml:mi><mml:mi>j</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfenced></mml:math>
</disp-formula>
</disp-formula-group>
		<p>cell에서는 객체를 지역화 하는 동시에 객체의 클래스를 분류한다. &#x003C;<xref ref-type="fig" rid="f003">그림 3</xref>&#x003E;의 가운데 두 개 중 두번째 이미지와 같이 Class의 개수가 C개라면, C개의 conditional class probabilities를 예측하는데 상단의 <xref ref-type="disp-formula" rid="d002">식 2</xref>로 표현할 수 있다.</p>
		<p>이미지 속 객체를 검출하는 YOLO 네트워크는 이러한 과정으로 진행되고, &#x003C;<xref ref-type="fig" rid="f003">그림 3</xref>&#x003E;의 세 번째 이미지와 같은 결과를 얻을 수 있다. 네트워크 학습을 위한 성능을 평가 시간에는 <xref ref-type="disp-formula" rid="d001">식 1</xref>과 <xref ref-type="disp-formula" rid="d002">식 2</xref>를 곱한 함수를 사용해 점수가 매겨지는데 함수는 <xref ref-type="disp-formula" rid="d003">식 3</xref>으로 나타낼 수 있다.</p>
<disp-formula id="d003">
	<label>(3)</label>
<mml:math id="m03-1"><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="italic">r</mml:mi></mml:msub><mml:mfenced><mml:mrow><mml:mi>C</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="italic">i</mml:mi></mml:msub><mml:mo>&#x2223;</mml:mo><mml:mi>O</mml:mi><mml:mi>b</mml:mi><mml:mi>j</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfenced><mml:mo>&#x2217;</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="italic">r</mml:mi></mml:msub><mml:mfenced><mml:mrow><mml:mi mathvariant="italic">O</mml:mi><mml:mi mathvariant="italic">b</mml:mi><mml:mi mathvariant="italic">j</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">c</mml:mi><mml:mi mathvariant="italic">t</mml:mi></mml:mrow></mml:mfenced><mml:mo mathvariant="italic">&#x2217;</mml:mo><mml:mi>I</mml:mi><mml:mi>o</mml:mi><mml:mo mathvariant="italic">&#xA0;</mml:mo><mml:mi>U</mml:mi><mml:mfrac><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">h</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow></mml:mfrac><mml:mspace linebreak="newline"/><mml:mo mathvariant="italic">=</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="italic">r</mml:mi></mml:msub><mml:mfenced><mml:mrow><mml:mi mathvariant="italic">C</mml:mi><mml:mi mathvariant="italic">l</mml:mi><mml:mi mathvariant="italic">a</mml:mi><mml:mi mathvariant="italic">s</mml:mi><mml:msub><mml:mi mathvariant="italic">s</mml:mi><mml:mi mathvariant="italic">i</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo mathvariant="italic">&#x2217;</mml:mo><mml:mi>I</mml:mi><mml:mi>o</mml:mi><mml:mo mathvariant="italic">&#xA0;</mml:mo><mml:mi>U</mml:mi><mml:mfrac><mml:mrow><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">u</mml:mi><mml:mi mathvariant="italic">t</mml:mi><mml:mi mathvariant="italic">h</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="italic">p</mml:mi><mml:mi mathvariant="italic">r</mml:mi><mml:mi mathvariant="italic">e</mml:mi><mml:mi mathvariant="italic">d</mml:mi></mml:mrow></mml:mfrac></mml:math>
</disp-formula>
	</sec>
	<sec id="sec002-3">
		<title>2.3. Quick, Draw! Dataset</title>
		<fig id="f004" orientation="portrait" position="float">
			<label>그림 4.</label>
			<caption>
				<title>Quick, Draw! 데이터세트</title>
				<p>Figure 4. Quick, Draw! Dataset</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f004.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>Quick, Draw! Dataset 에는 Google이 만든 Catch Mind 게임인 Quick, draw! 의 플레이어들에 의해서 만들어진 345종류의 그림 데이터 5천만 개가 있다[<xref ref-type="bibr" rid="B005">5</xref>].</p>
		<fig id="f005" orientation="portrait" position="float">
			<label>그림 5.</label>
			<caption>
				<title>Quik, Draw! 데이터세트의 구조</title>
				<p>Figure 5. Structure of Quick, Draw! Dataset</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f005.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>그림 데이터들은 &#x003C;<xref ref-type="fig" rid="f005">그림 5</xref>&#x003E;와 같은 구조로 저장되어있다. 그중 그림 데이터를 벡터 좌표로 나타낸 drawing을 이용했다. 그림의 좌표를 [0-255] 범위로 나타낸 drawing 2차원 배열의 구조는 &#x003C;<xref ref-type="fig" rid="f006">그림 6</xref>&#x003E;과 같다. x와 y는 pixel 좌표를, t는 첫 번째 지점 이후의 시간(milliseconds)을 나타낸다.</p>
		<p>본 논문은 drawing 배열의 좌푯값을 이용해서 로봇을 움직이기로 하였고 획이 변경될 때 로봇의 z축을 조종하고 획을 읽는 동안에는 x, y 좌표를 로봇의 범위에 맞게 대응해서 로봇을 움직이도록 하였다.</p>
		<fig id="f006" orientation="portrait" position="float">
			<label>그림 6.</label>
			<caption>
				<title>Quick, Draw! 데이터의 drawing 배열 구조</title>
				<p>Figure 6. Array structure of drawing data</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f006.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
	</sec>
	<sec id="sec002-4">
		<title>2.4 Dobot Magician 관련 연구</title>
		<p>DOBOT Magician은 Dobot사에서 제작한 교육형 보급형 로봇팔이다. 비교적 저렴한 가격에 펜 모듈, 레이져 모듈, 흡착 모듈 등 다양한 모듈을 지원해서 상황에 따라 3D 프린팅, 레이저 카빙(Carving), 그림 그리기 등 다양하게 응용할 수 있다. 이러한 이유로 로봇에 대한 지식이 없는 사람도 부담 없이 로봇을 구매하고 로봇을 이용해서 커스텀하기에 적합하다고 판단해 낙서로봇 플랫폼의 출력 단위를 Dobot Magician으로 설정하였다. Python으로 구현한 소프트웨어와 Dobot Magician 하드웨어를 결합해서 인공지능 오목 로봇 플랫폼을 구현한 기존의 연구를 참고해서 제안하는 인공지능 낙서로봇 플랫폼의 구조를 설정하였다[<xref ref-type="bibr" rid="B006">6</xref>].</p>
		<fig id="f007" orientation="portrait" position="float">
			<label>그림 7.</label>
			<caption>
				<title>펜 모듈을 부착한 Dobot Magician</title>
				<p>Figure 7. Dobot magician attached pen module</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f007.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>Dobot Magician 로봇의 펜 모듈이 자연스럽게 움직일 수 있는 범위를 실험했더니 x 좌표의 범위는[180, 308], y 좌표의 범위는 [-80, 48]인걸 알 수 있었다. Quick, Draw! Dataset은 그림 데이터의 x, y값을 [0, 255] 범위의 2차원 배열 형식으로 제공한다. x, y 값을 Doodle Bot의 가동범위에 맞게 조정하기 위해 x 값은 [0, 255]에서 [180, 308]로 매핑하고, y좌표는 [0, 255]에서 [-80, 48]로 매핑하는 전 처리 과정을 통해 그림 데이터의 좌표 값을 로봇의 가동범위에 맞게 수정해야 한다.</p>
	</sec>
</sec>
<sec id="sec003" sec-type="methods">
	<title>3. 낙서 로봇 플랫폼 설계</title>
	<p>낙서 로봇 플랫폼은 Doodle App, Doodle Server, Doodle Bot로 구성된다. 입력 부분은 Doodle App, 출력 부분은 Doodle Bot, Doodle App에서 입력된 결과를 처리해서 Doodle Bot으로 출력하는 부분은 Doodle Server가 담당한다. 플랫폼 구조에 대한 설명은 &#x003C;<xref ref-type="table" rid="t001">표 1</xref>&#x003E;과 같다. 휴대하기 간편한 열 전사 프린터를 출력 단위로 사용하는 Draw This와 달리 본 논문이 제안하는 낙서 로봇 플랫폼은 약 4키로 그램의 로봇팔을 출력단으로 사용한다. 로봇팔의 특성상 사용자 접근성과 휴대성이 떨어질 것을 감안하여 여러 명의 사람이 촬영한 사진을 하나의 Doodle Bot을 통해 출력할 수 있도록 출력단 부분을 사진 촬영이 용이하며 접근성과 휴대성이 높은 Android 애플리케이션으로 결정하였다[<xref ref-type="bibr" rid="B007">7</xref>]. 그리고 입력단과 출력단을 연결하고 로직을 처리하는 서버 부분을 추가하였다.</p>
	<table-wrap id="t001">
		<label>표 1.</label>
		<caption>
			<title>인공지능 낙서로봇 플랫폼의 구조</title>
			<p>Table 1. A structure of AI Doodle Robot Platform</p>
		</caption>
		<table frame="box" rules="all" width="100%">
<tbody align="center">
<tr>
<td></td>
<td><p>Doodle App</p></td>
<td><p>Doodle Server</p></td>
<td><p>Doodle Bot</p></td>
</tr><tr>
<td>구현 기술</td>
<td><graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_t001.jpg"></graphic><p>안드로이드</p></td>
<td><graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_t002.jpg"></graphic><p>Flask 서버</p></td>
<td><graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_t003.jpg"></graphic><p>Dobot Magician</p></td>
</tr><tr>
<td align="left"><p>기능</p></td>
<td align="left"><p>1. 사진 촬영 및 사진 선택</p><p>2. 탐지된 객체의 참/거짓 여부 판단</p><p>3. Doodle Bot이 그릴 낙서 이미지 선택</p></td>
<td align="left"><p>1. YOLO를 이용해서 사진 속 객체 탐지</p><p>2. 탐지된 객체의 경계박스에 해당하는 임의의 낙서 이미지 배치</p><p>3. 사용자가 선택한 낙서 이미지의 좌표를 Doodle의 가동 범위에 맞게 계산 후 텍스트 파일로 저장</p></td>
<td align="left"><p>Doodle Server에서 저장된 텍스트 파일을 열고 파일 속 좌표대로 이동하면서 실물의 낙서 이미지 생성</p></td>
</tr>
			</tbody>
		</table>
	</table-wrap>
	<p>사용자가 Doodle App으로 사진을 촬영하고 Doodle Bot이 종이에 낙서 그림을 그리기까지의 전체적인 플랫폼의 흐름도는 &#x003C;<xref ref-type="fig" rid="f008">그림 8</xref>&#x003E;과 같다.</p>
	<p>먼저 사용자는 안드로이드 단말기에서 Doodle App을 실행하고 Doodle Server와 네트워크 연결한다. 연결에 성공했다면 낙서로 그리고자 하는 물체를 Doodle App으로 촬영한 후 전송 버튼을 눌러 Doodle Server에 전송한다. 시나리오 설명의 편의를 위해 사용자가 &#x003C;<xref ref-type="fig" rid="f009">그림 9-1</xref>&#x003E;를 전송한 상황이라 가정한다.</p>
	<p>Doodle Server에서는 YOLO 알고리즘을 사용해서 사진 속 객체를 탐지한다. 탐지된 객체들의 경계박스를 그리고 객체의 이름을 표기한 이미지를 Doodle App으로 전송한다. 이미지는 &#x003C;<xref ref-type="fig" rid="f009">그림 9-2</xref>&#x003E;와 같다. 사용자는 Doodle Server에서 탐지한 결과의 참/ 거짓 여부를 판단하는데 만약 결과가 실제와 같지 않거나 만족스럽지 못하다면 다른 사진을 촬영할 수 있다. 결과가 실제와 같다면 확인 버튼을 누르고 Doodle Server는 탐지된 결과에 부합하는 낙서 이미지를 만들기 시작한다. 낙서 이미지는 다음의 과정들을 통해 생성된다.</p>
	<fig id="f008" orientation="portrait" position="float">
		<label>그림 8.</label>
		<caption>
			<title>낙서 로봇 플랫폼의 흐름도</title>
			<p>Figure 8. Flowchart of AI Doodle Robot Platform</p>
		</caption>
		<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f008.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
	</fig>
	<p>먼저 탐지된 객체들에 대응하는 낙서 그림 데이터를 Google Cloud Platform 서버에서 다운 받는다. &#x003C;<xref ref-type="fig" rid="f009">그림 9-2</xref>&#x003E;에서 cup 객체 1개, vase 객체 1개를 탐지했으므로 cup과 vase를 그린 낙서 그림 데이터를 Google Cloud Platform 서버에서 각각 n개씩 다운받는다. 그 다음 0에서 n-1 사이의 정수로 된 랜덤 상수를 탐지된 객체들의 개수만큼 생성한다. 랜덤 상수가 5와 897로 생성 됐다고 가정하면 이전에 저장한 n개의 cup에 대한 낙서 그림 데이터 중 5번째 데이터를 선택하고 897번째 vase 낙서 그림 데이터를 선택한다. 그리고 &#x003C;<xref ref-type="fig" rid="f009">그림 9-2</xref>&#x003E;에서 보이는 경계박스의 위치와 크기에 맞게 선택한 낙서 그림 데이터들을 배치한다. 그 결과는 &#x003C;<xref ref-type="fig" rid="f009">그림 9-3</xref>&#x003E;과 같다. 이러한 과정으로 검출된 객체들에 대한 낙서 이미지는 생성된다. Doodle Server는 낙서 이미지를 Doodle App에 전송해서 사용자에게 보여준다. 낙서 이미지가 사용자의 마음에 들지 않았다면 Doodle App의 skip 버튼을 누르고 Doodle Server는 이전단계로 돌아가 낙서 이미지를 생성하는 과정을 되풀이한다.</p>
	<fig id="f009" orientation="portrait" position="float">
		<label>그림 9.</label>
		<caption>
			<title>낙서로봇 플랫폼의 단계별 실행 결과(시계방향으로 그림 9-1,2,3,4)</title>
			<p>Figure 9. Step-by-step execution result of the Doodle Robot Platform (Figure 9-1,2,3,4 clockwise)</p>
		</caption>
		<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f009.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
	</fig>
	<p>사용자는 생성된 낙서 이미지가 마음에 들었다면 Doodle App의 choice 버튼을 누르고 Doodle Bot이 해당 그림을 실물 그림으로 그려주기를 기다린다. Doodle Server는 사용자가 선택한 낙서 이미지의 좌표를 Doodle Bot의 가동범위에 맞게 매핑한 후 매핑된 좌표를 텍스트 파일에 저장한다[<xref ref-type="bibr" rid="B008">8</xref>]. 이 과정이 끝났다면 Doodle Bot은 해당 텍스트 파일을 열고 좌표대로 움직이며 그림을 그리기 시작한다. Doodle Bot이 성공적으로 낙서 이미지를 그렸다면 &#x003C;<xref ref-type="fig" rid="f009">그림 9-4</xref>&#x003E;와 같은 결과를 얻고 이로써 낙서로봇 플랫폼의 모든 실행 과정이 종료된다.</p>
</sec>
<sec id="sec004" sec-type="Results">
	<title>4. 낙서 로봇 플랫폼 구현 및 실험</title>
	<p>본 장에서는 3장에서 설계한 내용을 바탕으로 낙서 로봇 플랫폼을 구현하고 실험한 내용을 기술한다.</p>	
	<sec id="sec004-1">
		<title>4.1 Doodle Server 구현 및 실험</title>
		<p>Doodle Server를 구축하기 위해 Flask 프레임워크 1.1.1 버전을 사용하였다[<xref ref-type="bibr" rid="B009">9</xref>]. Flask는 Python3 언어로 작성된 마이크로 웹 프레임워크의 일종으로 서버 구현을 위한 최소한의 기능만 포함하고 있는 것이 특징이다. 객체검출 코드와 dataset을 가져오는 코드를 Python 언어로 작성하였고, 클라이언트 부분인 Doodle App의 기능이 단순했기 때문에 Flask 프레임워크를 사용해서 서버를 구현하기로 결정하였다.</p>
		<sec id="sec004-1-1">
			<title>4.1.1 객체 탐지 구현 및 실험</title>
			<p>Doodle Server에서 사진 속 객체를 탐지하는 YOLO 알고리즘을 구현하기 위해 해당 알고리즘을 제안한 Joseph Redmon가 개발한 사전훈련 모델인 Darknet 프레임워크 yolov3-tiny를 사용하였다[<xref ref-type="bibr" rid="B010">10</xref>]. YOLO 알고리즘으로 검출된 객체의 이름과 위치 정보를 이용해서 객체 이름과 대응하는 낙서 데이터를 배치하였다. 낙서 데이터는 Quick, Draw! Dataset을 Python3언어로 만들어진 quickdraw 라이브러리를 이용해서 가공하였다[<xref ref-type="bibr" rid="B011">11</xref>]. 그리고 Python에서 제공하는 Open CV 라이브러리와 Numpy 라이브러리를 이용해서 낙서 이미지를 구현했다[<xref ref-type="bibr" rid="B012">12</xref>].</p>
			<fig id="f010" orientation="portrait" position="float">
				<label>그림 10.</label>
				<caption>
					<title>Darknet이 검출한 경계박스와 객체</title>
					<p>Figure 10. bounding box and label detected by Darknet</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f010.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<fig id="f011" orientation="portrait" position="float">
				<label>그림 11.</label>
				<caption>
					<title>사진 속 객체 위에 그린 낙서 데이터</title>
					<p>Figure 11. Doodle data drawn on objects in image</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f011.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<table-wrap id="t003">
				<label>표 3.</label>
				<caption>
					<title>낙서로봇 플랫폼이 표현 가능한 객체리스트</title>
					<p>Table 3. List of objects that the graffiti robot platform can express</p>
				</caption>
				<table frame="box" rules="all" width="100%">
<tbody align="center">
<tr>
<td><p>platform can express</p></td>
<td></td>
<td></td>
</tr><tr>
<td><p>bicycle</p></td>
<td><p>backpack</p></td>
<td><p>bed</p></td>
</tr><tr>
<td><p>car</p></td>
<td><p>umbrella</p></td>
<td><p>toilet</p></td>
</tr><tr>
<td><p>motorbike</p></td>
<td><p>suitcase</p></td>
<td><p>laptop</p></td>
</tr><tr>
<td><p>bus</p></td>
<td><p>baseball bat</p></td>
<td><p>mouse</p></td>
</tr><tr>
<td><p>train</p></td>
<td><p>skateboard</p></td>
<td><p>keyboard</p></td>
</tr><tr>
<td><p>truck</p></td>
<td><p>wine glass</p></td>
<td><p>cell phone</p></td>
</tr><tr>
<td><p>traffic light</p></td>
<td><p>cup</p></td>
<td><p>microwave</p></td>
</tr><tr>
<td><p>fire hydrant</p></td>
<td><p>fork</p></td>
<td><p>oven</p></td>
</tr><tr>
<td><p>stop sign</p></td>
<td><p>knife</p></td>
<td><p>toaster</p></td>
</tr><tr>
<td><p>bench</p></td>
<td><p>spoon</p></td>
<td><p>sink</p></td>
</tr><tr>
<td><p>bird</p></td>
<td><p>banana</p></td>
<td><p>book</p></td>
</tr><tr>
<td><p>cat</p></td>
<td><p>apple</p></td>
<td><p>clock</p></td>
</tr><tr>
<td><p>dog</p></td>
<td><p>sandwich</p></td>
<td><p>vase</p></td>
</tr><tr>
<td><p>horse</p></td>
<td><p>broccoli</p></td>
<td><p>scissors</p></td>
</tr><tr>
<td><p>sheep</p></td>
<td><p>carrot</p></td>
<td><p>toothbrush</p></td>
</tr><tr>
<td><p>cow</p></td>
<td><p>hot dog</p></td>
<td><p>person</p></td>
</tr><tr>
<td><p>elephant</p></td>
<td><p>pizza</p></td>
<td><p>teddy bear</p></td>
</tr><tr>
<td><p>bear</p></td>
<td><p>donut</p></td>
<td></td>
</tr><tr>
<td><p>zebra</p></td>
<td><p>cake</p></td>
<td></td>
</tr><tr>
<td><p>giraffe</p></td>
<td><p>chair</p></td>
<td></td>
</tr>
</tbody>
</table>
</table-wrap>
			<p>낙서로봇 플랫폼으로 만들 수 있는 낙서 객체는 총 57가지며 &#x003C;<xref ref-type="table" rid="t003">표 3</xref>&#x003E;과 같다. Darknet은 80여개의 객체가 탐지 가능하고 Quick, Draw! Dataset은 345 종류의 낙서 이미지를 제공하는데 그 중 55가지의 객체가 공통된다. 그 외에 person과 face, teddy bear와 bear처럼 의미는 유사하지만 이름은 다른 객체들에 대해선 다음과 같이 후처리를 진행했다.</p>
			<p>person 객체의 경우 draw_peron 함수를 만들었는데 YOLO에서 person을 탐지하면 객체의 경계박스를 3 등분해서 차례대로 face, t-shirts, pants 이름을 가진 낙서 데이터를 그려주는 방식으로 구현하였다. 그 결과 &#x003C;<xref ref-type="fig" rid="f011">그림 11</xref>&#x003E;과 같이 경계박스 안에 적합한 낙서 데이터가 그려진다.</p>		
		</sec>
		<sec id="sec004-1-2">
			<title>4.1.2 낙서 이미지 생성 및 실험</title>
			<fig id="f012" orientation="portrait" position="float">
				<label>그림 12.</label>
				<caption>
					<title>객체 탐지가 완료된 이미지</title>
					<p>Figure 12. Object detected image</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f012.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<fig id="f013" orientation="portrait" position="float">
				<label>그림 13.</label>
				<caption>
					<title>&#x003C;<xref ref-type="fig" rid="f012">그림 12</xref>&#x003E;을 기반으로 만들어진 4개의 임의의 낙서 이미지</title>
					<p>Figure 13. 4 random Doodle images created based on &#x003C;<xref ref-type="fig" rid="f012">Figure 12</xref>&#x003E;</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f013.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<p>본 논문의 제 3장에서 설계한 대로 낙서 데이터는 생성된 랜덤 상수에 따라 임의로 배치되도록 구현하였기 때문에 낙서 이미지는 생성될 때마다 이전에는없었던 유일한 형태로 만들어진다. &#x003C;<xref ref-type="fig" rid="f013">그림 13</xref>&#x003E;은 &#x003C;<xref ref-type="fig" rid="f012">그림 12</xref>&#x003E;를 낙서 이미지로 재현하는 과정을 4번 실행한 결과다. 서로 다른 4개의 낙서 이미지가 만들어진걸 알 수 있다. 이 과정을 1000번 반복해도 1000개의 서로 다른 낙서 이미지가 만들어질 것이다.</p>
			<p>본 논문은 완성도 있는 낙서 이미지를 생성하는 사용자 입력 사진의 특징을 알아보기 위해 다음과 같은 실험을 전개하였다. ‘객체간의 거리’와 ‘객체탐지 결과의 정확도’를 실험 요인으로 설계한 후 &#x003C;<xref ref-type="table" rid="t004">표 4</xref>&#x003E;와 같이 4개의 상황을 설정하였다.</p>
			<table-wrap id="t004">
				<label>표 4.</label>
				<caption>
					<title>실험 요인 설계</title>
					<p>Table 4. Experimental factor design</p>
				</caption>
				<table frame="box" rules="all" width="100%">
<tbody>
<tr>
<td></td>
<td><p>객체탐지 정확도 낮음</p></td>
<td><p>객체탐지 정확도 높음</p></td>
</tr><tr>
<td><p>객체간 거리 적당함</p></td>
<td><p>실험 (1)</p></td>
<td><p>실험 (2)</p></td>
</tr><tr>
<td><p>객체간 거리 좁음</p></td>
<td><p>실험 (3)</p></td>
<td><p>실험 (4)</p></td>
</tr>
					</tbody>
				</table>
			</table-wrap>
			<p>(1) 객체간 거리가 적당하지만 객체 탐지 결과가 정확하지 않은 경우</p>
			<p>&#x003C;<xref ref-type="fig" rid="f014">그림 14</xref>&#x003E;에서 보이는 것처럼 사진 속 강아지 2마리를 탐지하는 것은 성공했지만 가운데에 위치한 사람을 탐지하는데 실패해서 객체 탐지의 정확도가 낮았다. 하지만 나머지 두 개의 강아지 객체의 경계박스들 간의 거리가 적당해서 낙서 이미지의 완성도가 높았다.</p>
			<fig id="f014" orientation="portrait" position="float">
				<label>그림 14.</label>
				<caption>
					<title>실험(1)의 실제 이미지와 낙서 이미지</title>
					<p>Figure 14. detected image and doodled image of experiment (1)</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f014.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<p>&#x003C;<xref ref-type="fig" rid="f015">그림 15</xref>&#x003E;는 가장 이상적인 상황이다. 사진 속 모든 객체들이 정확하게 탐지됨과 동시에 객체들이 적당한 거리를 유지한 채 수평으로 위치하기 때문에 객체의 경계박스들이 겹치지 않았다. 그 결과로 정확하고 완성도 있는 낙서 이미지를 얻을 수 있었다.</p>
			<fig id="f015" orientation="portrait" position="float">
				<label>그림 15.</label>
				<caption>
					<title>실험(2)의 실제 이미지와 낙서 이미지</title>
					<p>Figure 15. detected image and doodled image of experiment (2)</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f015.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<p>(2) 객체간 거리가 좁고 객체 탐지 결과도 부정확한 경우</p>
			<fig id="f016" orientation="portrait" position="float">
				<label>그림 16.</label>
				<caption>
					<title>실험(3)의 실제 이미지와 낙서 이미지</title>
					<p>Figure 16. detected image and doodled image of experiment (3)</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f016.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
			<p>&#x003C;<xref ref-type="fig" rid="f016">그림 16</xref>&#x003E;은 낙서로봇 플랫폼에서 발생할 수 있는 가장 절망적인 상황들 중 하나라고 볼 수 있다. 객체 탐지 결과가 실제 이미지와 다르고 탐지된 객체들의 경계박스가 서로 겹쳐있기 때문에 정확도와 완성도가 낮은 낙서 이미지가 생성됐다.</p>	
			<p>(3) 객체간 거리가 좁지만 객체 탐지 결과가 정확한 경우</p>
			<p>&#x003C;<xref ref-type="fig" rid="f017">그림 17</xref>&#x003E;은 낙서 이미지가 실제 이미지의 원근감을 재현할 수 없어서 발생하는 문제점을 보여 준다. YOLO 알고리즘이 사진 속 객체들을 정확하게 찾는 건 성공했지만 객체의 경계박스들 간의 거리가 너무 조밀해서 낙서 이미지로 재구성했을 때 객체간의 원근감을 판단할 수 없었다. 그 결과 낙서 데이터들이 실제와 정확하게 배치됐지만 심미적 관점에서 완성도가 낮은 낙서 이미지가 생성됐다.</p>
			<fig id="f017" orientation="portrait" position="float">
				<label>그림 17.</label>
				<caption>
					<title>실험(4)의 실제 이미지와 낙서 이미지</title>
					<p>Figure 17. detected image and doodled image of experiment (4)</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f017.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
		</sec>
		<sec id="sec004-1-3">
			<title>4.1.3 낙서 이미지 실험 결과</title>
			<p>&#x003C;<xref ref-type="fig" rid="f018-1">그림 18</xref>&#x003E;은 제 4.1.2장에서 실행한 실험의 결과를 정리한 도표다. 객체간의 거리가 낙서 이미지의 완성도를 결정짓는 요소인 것을 확인할 수 있다. 본 논문은 인공지능 낙서로봇 플랫폼을 이용하는 사용자들이 완성도 있는 낙서 이미지를 얻고자 한다면 객체들 간의 거리가 적당히 떨어져 있는 사진을 입력이미지로 사용할 것을 권장한다.</p>
			<fig id="f018-1" orientation="portrait" position="float">
				<label>그림 18.</label>
				<caption>
					<title>활용 가능한 낙서 이미지의 범위</title>
					<p>Figure 18. Range of available Doodle images</p>
				</caption>
				<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f018a.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
			</fig>
		</sec>
	</sec>
	<sec id="sec004-2">
		<title>4.2 Doodle App 구현</title>
		<p>Doodle App은 사용자가 사진을 촬영하고 서버에서 사진 속 객체를 제대로 탐지했는지 확인한 후 로봇이 그릴 낙서를 선택하는 기능을 제공한다. Doodle App은 Android Studio 3.6.2 환경에서 Kotlin 언어로 구현되었고 안드로이드 버전 젤리빈 이상의 단말기를 지원한다. Flask 서버와 통신하기 위해 Sqaure에서 제공하는 REST API인 Retrofit2 라이브러리를 사용하였다[<xref ref-type="bibr" rid="B013">13</xref>]. 낙서 로봇 서버는 포트 포워딩된 로컬 컴퓨터에서 실행되므로 Doodle App을 처음 실행할 때 서버가 실행되는 컴퓨터의 IP 주소를 입력하게 하였다[<xref ref-type="bibr" rid="B014">14</xref>].</p>
	</sec>
	<sec id="sec004-3">
		<title>4.3 Doodle Bot 구현 및 실험</title>
		<p>Doodle Bot이 정상적으로 작동하는지 확인하기 위해 먼저 객체가 1개인 낙서 이미지를 그리도록 하였다. Doodle Bot이 sheep 낙서 데이터를 그렸을 때 &#x003C;<xref ref-type="fig" rid="f017">그림 17</xref>&#x003E;의 왼쪽 이미지에서 보이는 것과 같이 획이 변할 때마다 로봇의 z값이 불안정하게 튀어서 그림이 깔끔하게 그려지지 않는 문제가 발생했다. 이 문제를 해결하기 위해 획이 바뀔 때, 로봇이 이동해야 하는 거리의 1/2을 허공에서 미리 이동하도록 수정했더니 &#x003C;<xref ref-type="fig" rid="f018-2">그림 18</xref>&#x003E;의 왼쪽 이미지처럼 이전보다 안정된 실행 결과를 얻을 수 있었다.</p>
		<fig id="f018-2" orientation="portrait" position="float">
			<label>그림 18.</label>
			<caption>
				<title>수정 전 실행 결과(왼쪽)와 수정 후 실행 결과(오른쪽)</title>
				<p>Figure 18. Execution result before correction (left) and execution result after correction (right)</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f018b.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>그 다음 실험으로 2개 이상의 객체가 존재하는 &#x003C;<xref ref-type="fig" rid="f019">그림 19</xref>&#x003E;를 그려보았는데 결과는 &#x003C;<xref ref-type="fig" rid="f021">그림 21</xref>&#x003E;과 같았다. 경계박스의 크기가 작은 객체는 정확도가 떨어지지만 일정 크기 이상의 객체들은 비교적 정확하게 출력하는걸 확인할 수 있다.</p>
		<fig id="f019" orientation="portrait" position="float">
			<label>그림 19.</label>
			<caption>
				<title>객체가 2개 이상인 낙서 이미지</title>
				<p>Figure 19. Doodle image with 2 or more objects</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f019.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<fig id="f020" orientation="portrait" position="float">
			<label>그림 20.</label>
			<caption>
				<title>&#x003C;<xref ref-type="fig" rid="f019">그림 19</xref>&#x003E;를 그리고 있는 Doodle Bot</title>
				<p>Figure 20. Doodle Bot drawing &#x003C;<xref ref-type="fig" rid="f019">Figure 19</xref>&#x003E;</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f020.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<fig id="f021" orientation="portrait" position="float">
			<label>그림 21.</label>
			<caption>
				<title>Doodle Bot 실행 결과</title>
				<p>Figure 21. The result of Doodle bot</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f021.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<fig id="f022" orientation="portrait" position="float">
			<label>그림 22.</label>
			<caption>
				<title>제거 작업이 필요한 객체들</title>
				<p>Figure 22. Objects that need to be removed</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f022.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>&#x003C;<xref ref-type="fig" rid="f023">그림 23</xref>&#x003E;에서 중점이 되는 여자 아이와 강아지를 제외한 나머지는 배경이라고 볼 수 있다. 낙서의 완성도를 고려해 아이와 강아지 객체를 제외한 나머지를 흐리게 처리해서 YOLO가 그 외에 객체를 탐지 하지 못하도록 하였다. 그 결과는 &#x003C;<xref ref-type="fig" rid="f024">그림 24</xref>&#x003E;와 같다. 이러한 전 처리 과정을 통해 실제 이미지와 낙서 이미지간의 유사성을 유지하면서 낙서 이미지의 완성도를 높일 수 있었다.</p>
		<fig id="f023" orientation="portrait" position="float">
			<label>그림 23.</label>
			<caption>
				<title>전 처리하기전의 실제 이미지와 낙서 이미지</title>
				<p>Figure 23. Actual image and Doodle image before pre-processing</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f023.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<fig id="f024" orientation="portrait" position="float">
			<label>그림 24.</label>
			<caption>
				<title>전 처리한 이후의 실제 이미지와 낙서 이미지</title>
				<p>Figure 24. Actual image and graffiti image after pre-processing</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f024.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p> &#x003C;<xref ref-type="fig" rid="f024">그림 24</xref>&#x003E;에서 생성한 낙서 이미지를 Doodle Bot으로 출력한 결과는  &#x003C;<xref ref-type="fig" rid="f025">그림 25</xref>&#x003E;와 같다. 낙서 이미지에서 실제 이미지를 연상할 수 있을 만큼의 정확도를 유지하면서 크기가 작아서 그리기 까다로운 객체들을 제거함으로써 출력된 그림의 완성도를 높일 수 있었다.</p>
		<fig id="f025" orientation="portrait" position="float">
			<label>그림 25.</label>
			<caption>
				<title>&#x003C;<xref ref-type="fig" rid="f024">그림 24</xref>&#x003E;를 출력한 결과</title>
				<p>Figure 25. The result of printing &#x003C;<xref ref-type="fig" rid="f024">Fig 24</xref>&#x003E;</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f025.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
	</sec>
	<sec id="sec004-4">
		<title>4.4 실험 최종 구현</title>
		<p>4장에서 진행된 실험들을 바탕으로 최종 구현된 인공지능 낙서로봇 플랫폼은 다음과 같다.</p>
		<fig id="f026" orientation="portrait" position="float">
			<label>그림 26.</label>
			<caption>
				<title>&#x003C;그림 24&#x003E;를 출력한 결과</title>
				<p>Figure 26. Doodle App execution result</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f026.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<fig id="f027" orientation="portrait" position="float">
			<label>그림 27.</label>
			<caption>
				<title>Doodle Bot 실행 결과</title>
				<p>Figure 27. Result of running Doodle Bot</p>
			</caption>
			<graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f027.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
		</fig>
		<p>&#x003C;<xref ref-type="fig" rid="f026">그림 26</xref>&#x003E;과 &#x003C;<xref ref-type="fig" rid="f027">그림 27</xref>&#x003E;은 사용자가 패턴으로 만들고자 하는 객체의 사진을 촬영하고 임의로 생성된 낙서 이미지들 중 하나를 선택해서 Doodle Bot을 통해 출력한 결과를 얻기까지의 과정이다. &#x003C;<xref ref-type="fig" rid="f027">그림 27</xref>&#x003E;에서 Doodle Bot의 잉크펜 모듈을 유성 마커펜이 달린 모듈로 교체한 후, 모듈이 종이 위가 아닌 가방위에서 움직이도록 한다면 Doodle Bot은 간단하게 커스터마이징 가방을 제작하게 되는 셈이다.</p>
	</sec>
</sec>
<sec id="sec005" sec-type="Conclusion">
	<title>5. 결 론</title>
	<p>제안하는 낙서로봇 플랫폼은 낙서 데이터를 Quick, Draw! Dataset에서 가져오는데 해당 데이터세트는 불특정다수가 제한시간 20초 안에 그린 그림들의 집합이다. 전문 디자이너가 그린 낙서 데이터가 아니기 때문에 Doodle Server가 낙서 이미지를 임의로 생성하는 과정에서 어떤 낙서 데이터가 선택되느냐에 따라 낙서 이미지의 완성도가 크게 좌우된다. 본 논문에서 낙서로봇 플랫폼을 제안하는 목적은 커스터마이징을 위함이다. 단순 오락을 목적으로 일회성으로 그리는 그림이 아니라 커스터마이징을 원하는 물건위에 영구적으로 그려지는 그림인 것을 감안해서 추후에 Quick, Draw! Dataset 중에서 퀄리티가 좋은 낙서 데이터를 선별하는 데이터 전처리 작업을 추가할 예정이다.</p>
	<p>그리고 Doodle Server에서 생성된 낙서 이미지를 Doodle Bot으로 그리면 낙서 이미지가 좌우 반전된 형태로 출력된다. 이 문제를 해결하기 위해 사용자가 Doodle App으로 전송한 입력 데이터를 낙서 데이터로 재현하기에 앞서 입력 데이터를 좌우반전 하는 과정을 추가해서 전체적인 낙서로봇 플랫폼의 완성도를 보완해야 할 필요가 있어 보인다. 본 논문에서는 구현 및 실험의 편의성을 위해 Doodle Bot에 펜 모듈을 부착하고 종이 위에 출력하는 방식으로 실험을 전개했지만 Doodle Bot으로 사용된 Dobot Magician에서 제공하는 출력 모듈이 다양하기 때문에 커스텀하려는 제품의 질감에 맞게 출력 모듈을 유연하게 변형해서 사용한다면 혼자서도 손쉽게 다양한 제품을 커스터마이징을 할 수 있을것으로 기대된다[<xref ref-type="bibr" rid="B015">15</xref>].</p>
</sec>
</body>
<back>
<ref-list>
<title>References</title>
<!--[1] W. H. Choi, and S. J. Kim, A study on value based consumption trends appeared in customizing design, Journal of Communication Design, Vol.62, pp. 198-213, 2018.-->
<ref id="B001">
<label>[1]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Choi</surname><given-names>W. H.</given-names></name>
<name><surname>Kim</surname><given-names>S. J.</given-names></name>
</person-group>
<year>2018</year>
<article-title>A study on value based consumption trends appeared in customizing design</article-title>
<source>Journal of Communication Design</source>
<volume>62</volume>
<fpage>198</fpage><lpage>213</lpage>
<pub-id pub-id-type="doi">10.25111/jcd.2018.62.16</pub-id>
</element-citation>
</ref>
<!--[2] Draw This, https://github.com/danmacnish/cartoonify, Nov. 2020.-->
<ref id="B002">
<label>[2]</label>
<element-citation publication-type="webpage" publication-format="web">
<year>2020</year>
<month>Nov.</month>
<source>Draw This</source>
<comment><uri>https://github.com/danmacnish/cartoonify</uri></comment>
</element-citation>
</ref>
<!--[3] Google’s Object Detection API vs. Yolov3, https://medium.com/sugarkubes/googles-object-detection-api-vs-yolov3-7956f9a9a6c5, Nov. 2020.-->
<ref id="B003">
<label>[3]</label>
<element-citation publication-type="webpage" publication-format="web">
<year>2020</year>
<month>Nov.</month>
<source>Google’s Object Detection API vs. Yolov3</source>
<comment><uri>https://medium.com/sugarkubes/googles-object-detection-api-vs-yolov3-7956f9a9a6c5</uri></comment>
</element-citation>
</ref>
<!--[4] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, You only look once: Unified, real-time object detection, Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 779-788, 2016.-->
<ref id="B004">
<label>[4]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Redmon</surname><given-names>J.</given-names></name>
<name><surname>Divvala</surname><given-names>S.</given-names></name>
<name><surname>Girshick</surname><given-names>R.</given-names></name>
<name><surname>Farhadi</surname><given-names>A.</given-names></name>
</person-group>
<year>2016</year>
<article-title>You only look once: Unified, real-time object detection</article-title>
<conf-name>Proceedings of the IEEE conference on computer vision and pattern recognition</conf-name>
<fpage>779</fpage><lpage>788</lpage>
</element-citation>
</ref>
<!--[5] QUICK, DRAW! , https://quickdraw.withgoogle.com, Oct. 2020.-->
<ref id="B005">
<label>[5]</label>
<element-citation publication-type="webpage" publication-format="web">
<year>2020</year>
<month>Oct.</month>
<source>QUICK, DRAW!</source>
<comment><uri>https://quickdraw.withgoogle.com</uri></comment>
</element-citation>
</ref>
<!--[6] S. Y. Park, and G. H. Lee, Development of AI robotic gomoku platform based on multi-robot cooperative system, Journal of Knowledge Information Technology and Systems, Vol. 15, No. 4, pp. 487-495, 2020.-->
<ref id="B006">
<label>[6]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Park</surname><given-names>S. Y.</given-names></name>
<name><surname>Lee</surname><given-names>G. H.</given-names></name>
</person-group>
<year>2020</year>
<article-title>Development of AI robotic gomoku platform based on multi-robot cooperative system</article-title>
<source>Journal of Knowledge Information Technology and Systems</source>
<volume>15</volume><issue>4</issue>
<fpage>487</fpage><lpage>495</lpage>
<pub-id pub-id-type="doi">10.34163/jkits.2020.15.4.005</pub-id>
</element-citation>
</ref>
<!--[7] S. S. Pujari, M. S. Patil, and S. S. Ingleshwar, Remotely controlled autonomous robot using Android application, In 2017 IEEE International Conference on IoT in Social, Mobile, Analytics and Cloud, pp. 588-593, 2017.-->
<ref id="B007">
<label>[7]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Pujari</surname><given-names>S. S.</given-names></name>
<name><surname>Patil</surname><given-names>M. S.</given-names></name>
<name><surname>Ingleshwar</surname><given-names>S. S.</given-names></name>
</person-group>
<year>2017</year>
<article-title>Remotely controlled autonomous robot using Android application</article-title>
<conf-name>2017 IEEE International Conference on IoT in Social, Mobile, Analytics and Cloud</conf-name>
<fpage>588</fpage><lpage>593</lpage>
<pub-id pub-id-type="doi">10.1109/I-SMAC.2017.8058248</pub-id>
</element-citation>
</ref>
<!--[8] J. F. Soechting and F. Lacquaniti, Coordination of arm movements in three-dimensional space. Sensorimotor mapping during drawing movement,Neuroscience, Vol. 17, No. 2, pp. 295-311, 1986.-->
<ref id="B008">
<label>[8]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Soechting</surname><given-names>J. F.</given-names></name>
<name><surname>Lacquaniti</surname><given-names>F.</given-names></name>
</person-group>
<year>1986</year>
<article-title>Coordination of arm movements in three-dimensional space. Sensorimotor mapping during drawing movement</article-title>
<source>Neuroscience</source>
<volume>17</volume><issue>2</issue>
<fpage>295</fpage><lpage>311</lpage>
<pub-id pub-id-type="doi">10.1016/0306-4522(86)90248-4</pub-id>
</element-citation>
</ref>
<!--[9] Flask Tutorial, https://flask.palletsprojects.com/en/1.1.x/, Oct. 2020.-->
<ref id="B009">
<label>[9]</label>
<element-citation publication-type="webpage" publication-format="web">
<year>2020</year>
<month>Oct.</month>
<source>Flask Tutorial</source>
<comment><uri>https://flask.palletsprojects.com/en/1.1.x/</uri></comment>
</element-citation>
</ref>
<!--[10] Darknet: Open Source Neural Networks in C, https://pjreddie.com/darknet/, Oct. 2020.-->
<ref id="B010">
<label>[10]</label>
<element-citation publication-type="webpage" publication-format="web">
<year>2020</year>
<month>Oct.</month>
<source>Darknet: Open Source Neural Networks in C</source>
<comment><uri>https://pjreddie.com/darknet/</uri></comment>
</element-citation>
</ref>
<!--[11] quickdraw 0.1.0, https://pypi.org/project/quickdraw/, Oct. 2020.-->
<ref id="B011">
<label>[11]</label>
<element-citation publication-type="webpage" publication-format="web">
<year>2020</year>
<month>Oct.</month>
<source>quickdraw 0.1.0</source>
<comment><uri>https://pypi.org/project/quickdraw/</uri></comment>
</element-citation>
</ref>
<!--[12] G. Bradski, and A. Kaehler, OpenCV, Dr. Dobb’s journal of software tools, Vol. 3, 2000.-->
<ref id="B012">
<label>[12]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Bradski</surname><given-names>G.</given-names></name>
<name><surname>Kaehler</surname><given-names>A.</given-names></name>
</person-group>
<year>2000</year>
<article-title>OpenCV, Dr. Dobb’s journal of software tools</article-title>
<volume>3</volume>
</element-citation>
</ref>
<!--[13] M. Lachgar, H. Benouda, and S. Elfirdoussi, Android REST APIs: volley vs retrofit, 2018 IEEE International Symposium on Advanced Electrical and Communication Technologies, pp. 1-6, 2018.-->
<ref id="B013">
<label>[13]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Lachgar</surname><given-names>M.</given-names></name>
<name><surname>Benouda</surname><given-names>H.</given-names></name>
<name><surname>Elfirdoussi</surname><given-names>S.</given-names></name>
</person-group>
<year>2018</year>
<article-title>Android REST APIs: volley vs retrofit</article-title>
<conf-name>2018 IEEE International Symposium on Advanced Electrical and Communication Technologies</conf-name>
<fpage>1</fpage><lpage>6</lpage>
<pub-id pub-id-type="doi">10.1109/ISAECT.2018.8618824</pub-id>
</element-citation>
</ref>
<!--[14] J. Nádvorník, and P. Smutný, Remote control robot using android mobile device, IEEE　Proceedings of the 2014 15th International Carpathian Control Conference, pp. 373-378, 2014.-->
<ref id="B014">
<label>[14]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Nádvorník</surname><given-names>J.</given-names></name>
<name><surname>Smutný</surname><given-names>P.</given-names></name>
</person-group>
<year>2014</year>
<article-title>Remote control robot using android mobile device</article-title>
<conf-name>IEEE Proceedings of the 2014 15th International Carpathian Control Conference</conf-name>
<fpage>373</fpage><lpage>378</lpage>
<pub-id pub-id-type="doi">10.1109/CarpathianCC.2014.6843630</pub-id>
</element-citation>
</ref>
<!--[15] H. K. Chang, Context-based adaptive personalization service method, Journal of Knowledge Information Technology and Systems, Vol. 15, No. 5, pp. 855-862, 2020.-->
<ref id="B015">
<label>[15]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Chang</surname><given-names>H. K.</given-names></name>
</person-group>
<year>2020</year>
<article-title>Context-based adaptive personalization service method</article-title>
<source>Journal of Knowledge Information Technology and Systems</source>
<volume>15</volume><issue>5</issue>
<fpage>855</fpage><lpage>862</lpage>
<pub-id pub-id-type="doi">10.34163/jkits.2020.15.5.027</pub-id>
</element-citation>
</ref>
</ref-list>
<ack>
<title>감사의 글</title>
<p>이 논문은 2017년도 정부(교육부)의 재원으로 한국연구재단의 지원을 받아 수행된 기초연구사업임(NRF-2017R1D1A1B05036028). 이 논문은 2019년 대한민국 교육부와 한국연구재단의 인문사회분야 중견연구자지원사업의 지원을 받아 수행된 연구임(NRF-2019S1A5A2A01043252)</p>
</ack>
<bio>
	<p><graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f028.jpg"></graphic><bold>Ju-Yeon Song</bold> is in the bachelor’s degrees in Global School of Media from Soongsil University, Korea. She belongs to the Media-Robotics Laboratory, Soongsil University. She is interested in Computer Vision and Android</p>
	<p><italic>E-mail address</italic>: <email>superyodi.song@gmail.com</email></p>
	<p><graphic xlink:href="../ingestImageView?artiId=ART002663743&amp;imageName=jkits_2020_15_06_1033_f029.jpg"></graphic><bold>Kang-Hee Lee</bold> received the B.S., M.S. and Ph.D. degrees in EECS from KAIST, Korea, in 1999, 2001 and 2006, respectively. Dr Lee is currently an Associate Professor in Global School of Media, Soongsil University. He is interested in robotic intelligence &#x26; emotion and media robotics.</p>
	<p><italic>E-mail address</italic>: <email>kanghee.lee@ssu.ac.kr</email></p>
</bio>
</back>
</article>
