pegbis
pegbis copied to clipboard
Running main.py only displays an empty plot
So I've tried running the main.py file with all the images in the data folder, but it only displays an empty plot.
I'm using python 3.6.5.
Please let me know if any additional details are required.
Maybe, you should replace the imread from scipy.ndimage by other reader, such as skimage.io.imread. Also, the plt.plot only display the pixel value in range of [0, 1], so the output could be type of uint8.
still the same problem with me, it showed me empty plot i dont know what to do now.. notify me if you can help me
input_image = io.imread(input_path, as_gray=False, plugin=None)
i have replaced these lines and i have already included all the importss, but still empty plot
see
To fix the problem with the 'empty' output, convert the data type using
output = output.astype(int)
before the line plt.imshow(output)
in main.py:94.
best regards
ok i will try
---Original--- From: "shegenbart"<[email protected]> Date: Fri, Nov 22, 2019 17:54 PM To: "salaee/pegbis"<[email protected]>; Cc: "uroosehar1"<[email protected]>;"Comment"<[email protected]>; Subject: Re: [salaee/pegbis] Running main.py only displays an empty plot (#3)
To fix the problem with the 'empty' output, convert the data type using output = output.astype(int) before the line plt.imshow(output) in main.py:94.
best regards
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
To fix the problem with the 'empty' output, convert the data type using
output = output.astype(int)
before the lineplt.imshow(output)
in main.py:94.best regards
After doing some heavy modification to the code and following your suggestion to change the output to int type, I got it to work, but it seems like all my outputs are rotated 90 degrees... any suggestions on how to fix this?
To fix the problem with the 'empty' output, convert the data type using
output = output.astype(int)
before the lineplt.imshow(output)
in main.py:94. best regardsAfter doing some heavy modification to the code and following your suggestion to change the output to int type, I got it to work, but it seems like all my outputs are rotated 90 degrees... any suggestions on how to fix this?
Can you show the modified code?
brefore plt.imshow(output) add output = output.astype(int) note: not plt.show()
in main function, you should read image by this method:
import imageio
input_image = imageio.imread(input_path )
this is my result:
Just need to add dtype = int when creating the output
output = np.zeros(shape=(height, width, 3), dtype = int)
unable to install module segment_graph on google colab. how to resolve this issue?