pegbis icon indicating copy to clipboard operation
pegbis copied to clipboard

Running main.py only displays an empty plot

Open IamMohitM opened this issue 5 years ago • 11 comments

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.

IamMohitM avatar Sep 26 '19 09:09 IamMohitM

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.

guigua1 avatar Oct 09 '19 00:10 guigua1

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

uroosehar1 avatar Nov 15 '19 15:11 uroosehar1

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

uroosehar1 avatar Nov 15 '19 15:11 uroosehar1

Screen Shot 2019-11-15 at 11 08 15 PM see

uroosehar1 avatar Nov 15 '19 15:11 uroosehar1

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

shegenbart avatar Nov 22 '19 09:11 shegenbart

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.

uroosehar1 avatar Nov 22 '19 09:11 uroosehar1

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

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? tilted tower

djpecot avatar Dec 26 '19 07:12 djpecot

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

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? tilted tower

Can you show the modified code?

simonJJJ avatar Mar 17 '20 07:03 simonJJJ

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: image

wmj1238 avatar May 10 '20 07:05 wmj1238

Just need to add dtype = int when creating the output output = np.zeros(shape=(height, width, 3), dtype = int)

clever-egg avatar Jul 07 '20 01:07 clever-egg

unable to install module segment_graph on google colab. how to resolve this issue?

singhsugandha3 avatar Jul 13 '22 06:07 singhsugandha3