09-17 16:42
Notice
Recent Posts
Recent Comments
반응형
관리 메뉴

BAN2ARU

Pascal VOC Dataset 다운로드 및 구성요소 살펴보기 본문

Study/Detection

Pascal VOC Dataset 다운로드 및 구성요소 살펴보기

밴나루 2022. 5. 27. 18:53

Pascal dataset은 https://pjreddie.com/projects/pascal-voc-dataset-mirror/ 사이트를 활용하여 다운로드 받을 수 있으며, 압축을 풀고나면 다음과 같은 형식으로 데이터가 구성된 것을 확인할 수 있습니다.

 

Pascal VOC Dataset Mirror

Pascal VOC Dataset Mirror The Pascal VOC challenge is a very popular dataset for building and evaluating algorithms for image classification, object detection, and segmentation. However, the website goes down like all the time. In case you need the file, h

pjreddie.com

VOC 2012/2017
|—Annotaions
|—ImageSets
|—JPEGImages
|—SegmentationClass
|—SegmentationObject

각 구성요소에 대해 간략하게 살펴보도록 합시다.

Annotations

Annotations folder에 있는 정보는 말 그대로 detection을 위한 annotation 정보들이 저장되어 있습니다. Annotation은 다음과 같은 형식으로 구성되어 있습니다.

<annotation>
	<folder>VOC2007</folder>
	<filename>000001.jpg</filename>
	<source>
		<database>The VOC2007 Database</database>
		<annotation>PASCAL VOC2007</annotation>
		<image>flickr</image>
		<flickrid>341012865</flickrid>
	</source>
	<owner>
		<flickrid>Fried Camels</flickrid>
		<name>Jinky the Fruit Bat</name>
	</owner>
	<size>
		<width>353</width>
		<height>500</height>
		<depth>3</depth>
	</size>
	<segmented>0</segmented>
	<object>
		<name>dog</name>
		<pose>Left</pose>
		<truncated>1</truncated>
		<difficult>0</difficult>
		<bndbox>
			<xmin>48</xmin>
			<ymin>240</ymin>
			<xmax>195</xmax>
			<ymax>371</ymax>
		</bndbox>
	</object>
	<object>
		<name>person</name>
		<pose>Left</pose>
		<truncated>1</truncated>
		<difficult>0</difficult>
		<bndbox>
			<xmin>8</xmin>
			<ymin>12</ymin>
			<xmax>352</xmax>
			<ymax>498</ymax>
		</bndbox>
	</object>
</annotation>
  • 주요 annotation tag정보들 정리

- <folder> : folder 이름

- <filename> : 해당하는 file이름

- <source>, <owner> : 해당 database에 관한 설명으로 자세한 설명은 생략

 

- <size> : 해당하는 이미지 file의 크기에 관한 정보 (width, height, channel)

        <width> : 이미지 file의 width 값

        <height> : 이미지 file의 height 값

        <depth> : 이미지 file의 channel 값

        <segmented>: segmentation이 되어 있는지 여부로 0인 경우에는 없으며, 1인 경우에는 SegmentationClass와                                 SegmentationObject에서 해당 파일에 대한 segmentation 정보를 볼 수 있음

 

- <object> : 이미지 file 속에 detection할 object에 관한 정보

        <name> : detction할 object 클래스 명

        <pose>: object의 방향성 정보

        <truncated> : object의 일부가 잘려있는지 아니면 온전히 이미지에 표현되었는지 여부

        <difficult> : 인식하기 어려운지 여부

        <bndbox>: object의 bounding box에 대한 정보 (bounding box를 줄여서 bndbox로 표현)

                <xmin> : bounding box의 왼쪽 상단의 x축 좌표값

                <yminx> : bounding box의 왼쪽 상단의 y축 좌표값

                <xmax> : bounding box의 오른쪽 하단의 x축 좌표값

                <ymax> : bounding box의 오른쪽 하단의 y축 좌표값

bounding box 좌표 예시

 

ImageSets

Layout 및 Segmentation에서는 어떠한 이미지 file을 train, trainval(or val), test로 사용할 것인지에 대한 정보, Main에서는 특정한 class들이 어떤 이미지 file에 포함되어 있는지에 대한 정보를 포함하고 있습니다.

 

JPEGImages

Detection 및 Segmentation에서 활용되는 실제 이미지 file(*.jpg)들을 포함하고 있습니다.

 

SegmentationClass

Semantic segmentation(같은 class의 경우는 같은 색상으로 되어 있음)을 위한 label 이미지를 포함하고 있습니다.

 

SegmentationObject

Instance segmentation(Instance 단위로 segmentation 되어 있어, 같은 클래스의 경우더라도 색상이 다름)을 위한 이미지를 포함하고 있습니다.

 

 

간단하게 VOC dataset에 대해 살펴보았으며, xml file을 파싱하여 detection이나 segmentation network의 학습 및 테스트에 활용하면 됩니다.

728x90

'Study > Detection' 카테고리의 다른 글

[Python] YOLOV5 Window build with Anaconda  (4) 2022.05.10
Comments