Closed Mps24-7uk closed 3 years ago
@Mps24-7uk Sorry for the late reply.
Could we have an inference script for a single image with input color with respect to the point location instead of GUI?
explain the line and hint parameter for TensorModule.py
The _buildHint method is used to leak random pixels in a color image.
def _buildHint(self, image):
random = np.random.rand
hint = np.ones_like(image)
hint += 1
leak_count = np.random.randint(16, 128)
# leak position(random pixels in a color image.)
x = np.random.randint(1, image.shape[0] - 1, leak_count)
y = np.random.randint(1, image.shape[1] - 1, leak_count)
def paintCel(i):
color = image[x[i]][y[i]]
hint[x[i]][y[i]] = color
if random() > 0.5:
hint[x[i]][y[i] + 1] = color
hint[x[i]][y[i] - 1] = color
if random() > 0.5:
hint[x[i] + 1][y[i]] = color
hint[x[i] - 1][y[i]] = color
for i in range(leak_count):
paintCel(i)
return hint
For this project, we are currently working on a different repository
감사합니다.(Thank you.)
Could we have an inference script for a single image with input color with respect to the point location instead of GUI? Could you also explain the line and hint parameter passed in the pred_image function of TensorModule.py, when I used the _buildHint function of Datasets.py to generate the hint parameter and passed it to the pred_image function, the predicted output is a dark color image. https://github.com/rapidrabbit76/PaintsTensorFlow/blob/a26de880dc43c915f3552b58e01a4314847fd58a/GUI/tensorModul/TensorModule.py#L22