bisenet-tensorflow
bisenet-tensorflow copied to clipboard
Google Colab usging plt "Error dtype=float32 is not a valid value for name"
- I'm running on predict.py on colab (because i don't have GPU), colab cannot run the cv2.imshow() so i change the code like that: plt.imshow('Image', predict) #cv2.waitKey(0) plt.imsave('./example/1.png', predict)
- After that, I run the code but it has an error in picture in the mediafire below https://www.mediafire.com/file/j052icngxiwfnwu/Screenshot_from_2020-06-01_11-0.zip/file
- Can you have me to fix this problem ? (I 've install all the packages you write in read.me) Thank you so much
Ok I Just find the way to fix this predict.py on google colab Step1: Just choose the Tensorflow 1.x %tensorflow_version 1.x Step 2: Edit code on predict.py like that (because colab cannot use cv2.imshow) from matplotlib import pyplot as plt
predict = sess.run(predict, feed_dict={model.images_feed: img}) predict = cv2.cvtColor(predict, cv2.COLOR_RGB2BGR) max=np.max(predict) final=predict/max plt.title("Image") plt.imshow(final) #cv2.waitKey(0) plt.imsave('./example/1.png', final)