-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.py
More file actions
22 lines (17 loc) · 791 Bytes
/
config.py
File metadata and controls
22 lines (17 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import numpy as np
import os
from multiprocessing import Pool
import matplotlib.pyplot as plt
import tensorflow as tf
from tqdm import tqdm
# Set RoI class and each colors
roi_class = ['Background', 'Hat', 'Hair', 'Glove', 'Sunglasses', 'Upper-clothes', 'Dress',
'Coat', 'Socks', 'Pants', 'Jumpsuits', 'Scarf', 'Skirt', 'Face', 'Left-arm',
'Right-arm', 'Left-leg', 'Right-leg', 'Left-shoe', 'Right-shoe']
class_color = np.array((np.random.choice(range(255),len(roi_class)),
np.random.choice(range(255),len(roi_class)),
np.random.choice(range(255),len(roi_class)))).reshape(len(roi_class),3)
class_color[0]=[0,0,0]
# config GPU
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"