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

how to process more channels images and where I can ouput the full size change map #5

Closed
Yusin2Chen opened this issue Dec 14, 2020 · 2 comments

Comments

@Yusin2Chen
Copy link

Hi Dr.Luppino,

Thank you for sharing so nice work and code. I am doing similar work and want to compare it with your results. But unfortunately, I am not familiar with TensorFlow. When I try to use your code to process images with more than three channels, there always have a problem in "tmp2 = tf.concat Line 76 of decorators.py". Could you give me help with parameter setting? and I try to get the whole resolution change map from here " change_map = self._change_map(difference_img)" line 248 of change_dtector.py. But the image I got is very small, I don't know how to do it. Hope you can give me some tips~

Best regards,
yusin

@llu025
Copy link
Owner

llu025 commented Dec 16, 2020

Concerning the image reduction, I believe what is happening is that your dataset is reduced in the function fetch() in dataset.py (line 342) because you do not have a GPU running with CUDA:

if not tf.config.list_physical_devices("GPU"):
        dataset = [
            tf.image.central_crop(tensor, 0.1) for tensor in [x_im, y_im, target_cm]
        ]
    else:
        dataset = [x_im, y_im, target_cm]

If you want to avoid this, you can simply replace "0.1" with "1" and the function would behave exactly as if these lines were not there.
Please notice that the same "if" statement affects also the parameter setting in config.py, so you would have to change line 22 with if not debug:.

About the images with more channels, the method is supposed to handle any kind of number of channels (except 2, I have to fix it). In config.py there is a selection of channels to be printed out ("channel_x" and "channel_y") in case there are more than 3. In conclusion, I struggle to understand your question. Can you provide more details about the error, sharing for example what python prints out?

@Yusin2Chen
Copy link
Author

Hi Dr.Luppino,

Thank you very much for your help. It works~

Best regards,
yusin

@llu025 llu025 closed this as completed Dec 17, 2020
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