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

I have a question about data process "main.imageblur()" +1 #8

Open
dev6969 opened this issue Oct 21, 2018 · 0 comments
Open

I have a question about data process "main.imageblur()" +1 #8

dev6969 opened this issue Oct 21, 2018 · 0 comments

Comments

@dev6969
Copy link

dev6969 commented Oct 21, 2018

thank you for sharing!!!!!!!!!

I get a question while implementing the code and ask.
Is it ok to use it without a deep copy?

test in python3

my test cord this

def imageblur(img, sampling=False):
    if sampling:
        cimg = cimg * 0.3 + np.ones_like(cimg) * 0.7 * 255
    else:
        for i in range(30):
            randx = randint(0,205)
            randy = randint(0,205)
            cimg[randx:randx+50, randy:randy+50] = 255
    return cv2.blur(cimg,(100,100))
img = get_img(path)
img_b = imageblur(img)
nvc = np.concatenate((img,img_b),axis=1)
cv2.imshow("TEST",nvc)

and result ...

2018-10-22 00-36-34

my test cord_2_add deep copy this

def imageblur(img, sampling=False):
    cimg = copy.deepcopy(img) #Add deep copy
    if sampling:
        cimg = cimg * 0.3 + np.ones_like(cimg) * 0.7 * 255
    else:
        for i in range(30):
            randx = randint(0,205)
            randy = randint(0,205)
            cimg[randx:randx+50, randy:randy+50] = 255
    return cv2.blur(cimg,(100,100))
img = get_img(path)
img_b = imageblur(img)
nvc = np.concatenate((img,img_b),axis=1)
cv2.imshow("TEST",nvc)

and result
2018-10-22 00-35-59

And one more
why expand edge image dims in placeholder set dim 1
I am curious as to whether it should be expanded

            batch_edge = np.expand_dims(batch_edge, 3)

Thank you again for sharing. !!

@dev6969 dev6969 changed the title I have a question about data processing. "main.imageblur()" I have a question about data process "main.imageblur()" Oct 21, 2018
@dev6969 dev6969 changed the title I have a question about data process "main.imageblur()" I have a question about data process "main.imageblur()" +1 Oct 21, 2018
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

1 participant