Closed nareshr8 closed 3 years ago
Is this file not generated or can't be opened?
Its not getting generated. I dont see where it would get generated as well
ETF_filter = ETF(input_path=input_path, output_path=output_path+'/mask',\
dir_num=direction, kernel_radius=kernel_radius, iter_time=iter_time, background_dir=background_dir)
ETF_filter.forward()
print('ETF done')
Please improve your coding skills
Thanks for suggesting about my coding skills.
Executing the code, Seems another issue has been raised for the same issue(https://github.com/TZYSJTU/Sketch-Generation-with-Drawing-Process-Guided-by-Vector-Flow-and-Grayscale/issues/2). Can you run the code once and see for yourself. The code you show is creating mask{}
files. The file that is missing is dir_mask{}
.
for i in range(self.dir_num):
if i==0:
minimum = -90
maximum = -90+length/2
mask1 = 255*(((angle>minimum)+(angle==minimum))*(angle<maximum))
maximum = 90
minimum = 90-length/2
mask2 = 255*((angle>minimum)+(angle==minimum))
mask = mask1 + mask2
cv2.imwrite(self.output_path+'./dir_mask{}.png'.format(i),np.uint8(mask.numpy()))
else:
minimum = -90+(i-1/2)*length
maximum = minimum + length
mask = 255*(((angle>minimum)+(angle==minimum))*(angle<maximum))
cv2.imwrite(self.output_path+'./dir_mask{}.png'.format(i),np.uint8(mask.numpy()))
The corresponding code is in the file ETF/edge_tangent_flow.py Please check why these dir_mask{}.png files are not generated. In addition, my code can run on most people's machines.
Hi Team, I am excited to see this paper. I was trying to run your code. When I run the code, the dir_mask{}.png which the code expects to generate is unavailable. Kindly help me out with this.
Usage of the file: https://github.com/TZYSJTU/Sketch-Generation-with-Drawing-Process-Guided-by-Vector-Flow-and-Grayscale/blob/1cf79425ae51e0a89c55aed41ea26980d54ea214/cat.py#L126