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 Change = np.divide((Changemap + cdMap),2).astype(int) #4

Open
haoranwu22 opened this issue Jan 13, 2024 · 0 comments
Open

About Change = np.divide((Changemap + cdMap),2).astype(int) #4

haoranwu22 opened this issue Jan 13, 2024 · 0 comments

Comments

@haoranwu22
Copy link

for sigma in range(101, 202, 50):
    adaptiveThreshold = 2 * filters.gaussian(detectedChangeMapNormalized, sigma)
    cdMapTemp = (detectedChangeMapNormalized > adaptiveThreshold)
    cdMapTemp = morphology.remove_small_objects(cdMapTemp, min_size=objectMinSize)
    cdMap = cdMap | cdMapTemp
cdMap = morphology.binary_closing(cdMap, morphology.disk(3))
cdMap = cdMap.squeeze()

# TODO:是否更改取整方式
Change = np.divide((Changemap + cdMap),2).astype(int)
# Change = np.ceil(np.divide((Changemap + cdMap),2))
Uchange = np.where(Changemap + cdMap==0, 1, 0)
Toclassified = Ones - Change - Uchange

hello, is it reasonable to round down in the source code?
Change = np.divide((Changemap + cdMap),2).astype(int)
or
or Change = np.ceil(np.divide((Changemap + cdMap),2))
Because when experimenting on my own dataset, Change will have a value less than 1.0 after multiple rounds of training, and asype(int) will cause all elements to be rounded down to zero.

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