-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathget_imgs_path.py
40 lines (30 loc) · 1.29 KB
/
get_imgs_path.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
#! encoding: UTF-8
import os
import glob
# ------------------------------------------------------------------------------------------------------
# Training Images
# ------------------------------------------------------------------------------------------------------
train_images_path = "./data/genome/im2p_train"
train_images = glob.glob(train_images_path + "/*.jpg")
f = open("imgs_train_path.txt", "w")
for item in train_images:
f.write(item + "\n")
f.close()
# ------------------------------------------------------------------------------------------------------
# Validation Images
# ------------------------------------------------------------------------------------------------------
train_images_path = "./data/genome/im2p_val"
train_images = glob.glob(train_images_path + "/*.jpg")
f = open("imgs_val_path.txt", "w")
for item in train_images:
f.write(item + "\n")
f.close()
# ------------------------------------------------------------------------------------------------------
# Test Images
# ------------------------------------------------------------------------------------------------------
train_images_path = "./data/genome/im2p_test"
train_images = glob.glob(train_images_path + "/*.jpg")
f = open("imgs_test_path.txt", "w")
for item in train_images:
f.write(item + "\n")
f.close()