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 Region Confusion Mechanism #62

Open
lao-ling-jie opened this issue Nov 23, 2020 · 4 comments
Open

About Region Confusion Mechanism #62

lao-ling-jie opened this issue Nov 23, 2020 · 4 comments

Comments

@lao-ling-jie
Copy link

Hi!it's great work! But I have some questions about the region confusion mechanism in the code (below). What's the mean of the parameter pro and RAN,and why pro should >=5, I can't find this information in your paper.

pro = 5
    if pro >= 5:          
        tmpx = []
        tmpy = []
        count_x = 0
        count_y = 0
        k = 2
        RAN = 2
        for i in range(crop[1] * crop[0]):
            tmpx.append(images[i])
            count_x += 1
            if len(tmpx) >= k:
                tmp = tmpx[count_x - RAN:count_x]
                random.shuffle(tmp)
                tmpx[count_x - RAN:count_x] = tmp
            if count_x == crop[0]:
                tmpy.append(tmpx)
                count_x = 0
                count_y += 1
                tmpx = []
            if len(tmpy) >= k:
                tmp2 = tmpy[count_y - RAN:count_y]
                random.shuffle(tmp2)
                tmpy[count_y - RAN:count_y] = tmp2
        random_im = []
        for line in tmpy:
            random_im.extend(line)
@XA-kirino
Copy link

Hi!it's great work! But I have some questions about the region confusion mechanism in the code (below). What's the mean of the parameter pro and RAN,and why pro should >=5, I can't find this information in your paper.

pro = 5
    if pro >= 5:          
        tmpx = []
        tmpy = []
        count_x = 0
        count_y = 0
        k = 2
        RAN = 2
        for i in range(crop[1] * crop[0]):
            tmpx.append(images[i])
            count_x += 1
            if len(tmpx) >= k:
                tmp = tmpx[count_x - RAN:count_x]
                random.shuffle(tmp)
                tmpx[count_x - RAN:count_x] = tmp
            if count_x == crop[0]:
                tmpy.append(tmpx)
                count_x = 0
                count_y += 1
                tmpx = []
            if len(tmpy) >= k:
                tmp2 = tmpy[count_y - RAN:count_y]
                random.shuffle(tmp2)
                tmpy[count_y - RAN:count_y] = tmp2
        random_im = []
        for line in tmpy:
            random_im.extend(line)

pro might be abbr of probability and only defined once here, maybe will be modified to swap with a prob.
RAN is a param defining neighbor range, of the numbers of rows or columns to shuffle.

@lao-ling-jie
Copy link
Author

Hi!it's great work! But I have some questions about the region confusion mechanism in the code (below). What's the mean of the parameter pro and RAN,and why pro should >=5, I can't find this information in your paper.

pro = 5
    if pro >= 5:          
        tmpx = []
        tmpy = []
        count_x = 0
        count_y = 0
        k = 2
        RAN = 2
        for i in range(crop[1] * crop[0]):
            tmpx.append(images[i])
            count_x += 1
            if len(tmpx) >= k:
                tmp = tmpx[count_x - RAN:count_x]
                random.shuffle(tmp)
                tmpx[count_x - RAN:count_x] = tmp
            if count_x == crop[0]:
                tmpy.append(tmpx)
                count_x = 0
                count_y += 1
                tmpx = []
            if len(tmpy) >= k:
                tmp2 = tmpy[count_y - RAN:count_y]
                random.shuffle(tmp2)
                tmpy[count_y - RAN:count_y] = tmp2
        random_im = []
        for line in tmpy:
            random_im.extend(line)

pro might be abbr of probability and only defined once here, maybe will be modified to swap with a prob.
RAN is a param defining neighbor range, of the numbers of rows or columns to shuffle.

Thanks for your reply! So pro in this code might be not useful?

@XA-kirino
Copy link

Hi!it's great work! But I have some questions about the region confusion mechanism in the code (below). What's the mean of the parameter pro and RAN,and why pro should >=5, I can't find this information in your paper.

pro = 5
    if pro >= 5:          
        tmpx = []
        tmpy = []
        count_x = 0
        count_y = 0
        k = 2
        RAN = 2
        for i in range(crop[1] * crop[0]):
            tmpx.append(images[i])
            count_x += 1
            if len(tmpx) >= k:
                tmp = tmpx[count_x - RAN:count_x]
                random.shuffle(tmp)
                tmpx[count_x - RAN:count_x] = tmp
            if count_x == crop[0]:
                tmpy.append(tmpx)
                count_x = 0
                count_y += 1
                tmpx = []
            if len(tmpy) >= k:
                tmp2 = tmpy[count_y - RAN:count_y]
                random.shuffle(tmp2)
                tmpy[count_y - RAN:count_y] = tmp2
        random_im = []
        for line in tmpy:
            random_im.extend(line)

pro might be abbr of probability and only defined once here, maybe will be modified to swap with a prob.
RAN is a param defining neighbor range, of the numbers of rows or columns to shuffle.

Thanks for your reply! So pro in this code might be not useful?

Yes

@lao-ling-jie
Copy link
Author

Hi!it's great work! But I have some questions about the region confusion mechanism in the code (below). What's the mean of the parameter pro and RAN,and why pro should >=5, I can't find this information in your paper.

pro = 5
    if pro >= 5:          
        tmpx = []
        tmpy = []
        count_x = 0
        count_y = 0
        k = 2
        RAN = 2
        for i in range(crop[1] * crop[0]):
            tmpx.append(images[i])
            count_x += 1
            if len(tmpx) >= k:
                tmp = tmpx[count_x - RAN:count_x]
                random.shuffle(tmp)
                tmpx[count_x - RAN:count_x] = tmp
            if count_x == crop[0]:
                tmpy.append(tmpx)
                count_x = 0
                count_y += 1
                tmpx = []
            if len(tmpy) >= k:
                tmp2 = tmpy[count_y - RAN:count_y]
                random.shuffle(tmp2)
                tmpy[count_y - RAN:count_y] = tmp2
        random_im = []
        for line in tmpy:
            random_im.extend(line)

pro might be abbr of probability and only defined once here, maybe will be modified to swap with a prob.
RAN is a param defining neighbor range, of the numbers of rows or columns to shuffle.

Thanks for your reply! So pro in this code might be not useful?

Yes

Thank you!

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

2 participants