Skip to content

Commit 740c951

Browse files
committed
flake8 linter changes
1 parent b04d847 commit 740c951

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

color_image_generator/AlColorImageGenerator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self):
1313
root = Tk(className="ALCOLORIMAGENERATOR")
1414
root.geometry("400x150+1510+865")
1515
root.resizable(0, 0)
16-
root.iconbitmap(os.path.join(cwd+'\\UI\\icons',
16+
root.iconbitmap(os.path.join(cwd + '\\UI\\icons',
1717
'alcolorimagegenerator.ico'))
1818
root.config(bg="#000000")
1919
root.overrideredirect(1)
@@ -48,8 +48,8 @@ def convert():
4848
't', cwd + '\\AlColorImageGenerator'
4949
'\\model\\colorization_release_v2.'
5050
'caffemodel')
51-
pts = np.load(cwd+'\\AlColorImageGenerator\\model\\pts_in_hull.npy'
52-
)
51+
pts = np.load(cwd + '\\AlColorImageGenerator\\model\\pts_in_hull.'
52+
'npy')
5353
class8 = net.getLayerId("class8_ab")
5454
conv8 = net.getLayerId("conv8_313_rh")
5555
pts = pts.transpose().reshape(2, 313, 1, 1)
@@ -61,7 +61,7 @@ def convert():
6161
nimg = os.path.basename(img)
6262
cimg = 'color_' + nimg
6363
image = cv2.imread(img)
64-
scaled = image.astype("float32")/255.0
64+
scaled = image.astype("float32") / 255.0
6565
lab = cv2.cvtColor(scaled, cv2.COLOR_BGR2LAB)
6666
resized = cv2.resize(lab, (224, 224))
6767
L = cv2.split(resized)[0]
@@ -74,7 +74,7 @@ def convert():
7474
colorized = cv2.cvtColor(colorized, cv2.COLOR_LAB2BGR)
7575
colorized = np.clip(colorized, 0, 1)
7676
colorized = (255 * colorized).astype("uint8")
77-
cimg = os.path.join(cwd+'\\AlColorImageGenerator\\images\\color',
77+
cimg = os.path.join(cwd + '\\AlColorImageGenerator\\images\\color',
7878
cimg)
7979
cv2.imwrite(cimg, colorized)
8080
cv2.imshow("Original", image)
@@ -86,7 +86,7 @@ def convert():
8686
weight='bold')
8787

8888
titleBar = Frame(root, bg='#141414', relief=SUNKEN, bd=0)
89-
icon = Image.open(os.path.join(cwd+'\\UI\\icons',
89+
icon = Image.open(os.path.join(cwd + '\\UI\\icons',
9090
'alcolorimagegenerator.ico'))
9191
icon = icon.resize((30, 30), Image.ANTIALIAS)
9292
icon = ImageTk.PhotoImage(icon)

0 commit comments

Comments
 (0)