Helen Dataset

・ダウンロード
以下のリンクから"a. All Images"と"c. Annotation"をダウンロード

・ファイル配置
annotationフォルダとimageフォルダを同階層に作る。
annotationフォルダはダウンロードしたものそのままでOK。
imageフォルダにはダウンロードした画像を突っ込む(フォルダ分けせず直下に画像ファイルが来るように)。

・データ確認
import cv2

with open('annotation/1.txt', 'r') as file:
img_file_name = file.readline().replace('\n', '')
img_file_name = 'images/' + img_file_name + '.jpg'
img = cv2.imread(img_file_name)

for line in file:
x, y = line.replace('\n', '').replace('\r', '').replace(' ', '').split(',')
cv2.drawMarker(img, (int(float(x)), int(float(y))), (21, 255, 12),
markerType=cv2.MARKER_CROSS, thickness=2)
height_before = img.shape[0]
width_before = img.shape[1]
height_after = 512
width_after = int(width_before * height_after / height_before)
img = cv2.resize(img, (width_after, height_after))

cv2.imshow('', img)
cv2.waitKey()


300W

・ダウンロード
以下のリンクからpart1-part4をダウンロードし、catした上で解凍

・データ確認
import cv2

with open('01_Indoor/indoor_001.pts', 'r') as file:

img = cv2.imread('01_Indoor/indoor_001.png')

for i in range(3):
file.readline()
for i in range(68):
x, y = file.readline().split(' ')
cv2.drawMarker(img, (int(float(x)), int(float(y))), (21, 255, 12),
markerType=cv2.MARKER_CROSS, thickness=1)

cv2.imshow('', img)
cv2.waitKey()