Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about demo.py, show_masks(im, dets, masks, classes, config) #29

Open
sheldon606 opened this issue Jun 8, 2017 · 3 comments
Open

about demo.py, show_masks(im, dets, masks, classes, config) #29

sheldon606 opened this issue Jun 8, 2017 · 3 comments

Comments

@sheldon606
Copy link

when i use jupyter in server, it can't support the cv2.imshow function . sombody who can tell me how to rewrite the fuction "show_masks(im, dets, masks, classes, config) " to just save the processed image save to one path. Because i can't visualize the processed image on server.

@javierjsa
Copy link

Hi,

The following modifications save the output as png, X-Window is not required. Note that you must add your own code to avoid overwriting ouput files.

import numpy as np
import utils.image as image
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import random
import cv2
import os.path

(...)

plt.imshow(im)
    if show:
        plt.show()   
   
plt.savefig('myfile.png',bbox_inches='tight',pad_inches=0.0)   
print('Salvado: '+tit)
return im

@lc8631058
Copy link

@javierjsa my problem is, the outputs of demo,py are totally same with the original demo images, no changes at all

@lc8631058
Copy link

@javierjsa ok just found the anwser in #21 , thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants