Closed frk2 closed 6 years ago
You can do it easily as shown below. Let me know if it makes sense and then I can merge it.
img_orig = copy.deepcopy(img)
if args.colored: classMap_numpy_color = PILImage.fromarray(classMap_numpy) classMap_numpy_color.putpalette(pallete) classMap_numpycolor.save(args.savedir + os.sep + 'c' + name.replace(args.img_extn, 'png')) if args.overlay: classMap_numpy_color = numpy.array(classMap_numpy_color) overlayed = cv2.addWeighted(img_orig, 0.5, classMap_numpycolor, 0.5,0) cv2.imwrite(args.savedir + os.sep + 'over' + name.replace(args.img_extn, 'jpg'), overlayed)
I'm cool with anything if it produces the above image :laughing:
I have added an overlay option which will produce an output similar to below image. Please have a look. Sorry for late response.
Nice. Thanks 🙇
On Tue, Jul 3, 2018, 7:42 PM Sachin Mehta notifications@github.com wrote:
I have added an overlay option which will produce an output similar to below image. Please have a look.
[image: over_frankfurt_000000_000576_leftimg8bit] https://user-images.githubusercontent.com/18603245/42253953-18728dbc-7ef9-11e8-8764-eb390807e148.jpg
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sacmehta/ESPNet/pull/12#issuecomment-402346689, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCMYuUIMJuV14O7Lw1QupB9Gr4lB8SJks5uDCt7gaJpZM4U43Bu .
First of all THANK YOU FOR THIS!
This really helps visualize how effective the network is during / after training so you get output like the following