GithubHelp home page GithubHelp logo

coordi777 / conditional-diffusion-for-sar-to-optical-image-translation Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 838 KB

The official implementation of Conditional Diffusion for SAR to Optical Image Translation

Python 99.57% Shell 0.43%

conditional-diffusion-for-sar-to-optical-image-translation's Introduction

  • Welcome😊, I’m Xinyu 👋
  • A student in FDU EMWLab for master😆(2022 graduated from USTC)
  • Now, Major in information remote sensing📡 and Research on Diffusion-related technologies
  • Here are some my programs 🐱‍🏍

conditional-diffusion-for-sar-to-optical-image-translation's People

Contributors

coordi777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fudanxu

conditional-diffusion-for-sar-to-optical-image-translation's Issues

About the dataset

May I ask where the dataset was downloaded from and what is the dataset structure? It would be great to get your reply.

For help about train

You have done a great job, thank you very much. However, there are some issues. When I run train.sh, some errors occur. I would like to know how to avoid these errors.

`Traceback (most recent call last):
File "scripts/image_train.py", line 86, in
main()
File "scripts/image_train.py", line 23, in main
logger.configure()
File "/home/shao/repo/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation/guided_diffusion/logger.py", line 454, in configure
os.makedirs(os.path.expanduser(dir), exist_ok=True)
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/os.py", line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/os.py", line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/dirs'
[E ProcessGroupGloo.cpp:138] Gloo connectFullMesh failed with Connection reset by peer
[E ProcessGroupGloo.cpp:138] Gloo connectFullMesh failed with Connection reset by peer
[E ProcessGroupGloo.cpp:138] Gloo connectFullMesh failed with Connection reset by peer
Traceback (most recent call last):
File "scripts/image_train.py", line 86, in
main()
File "scripts/image_train.py", line 22, in main
dist_util.setup_dist()
File "/home/shao/repo/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation/guided_diffusion/dist_util.py", line 42, in setup_dist
dist.init_process_group(backend=backend, init_method="env://")
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/c10d_logger.py", line 74, in wrapper
func_return = func(*args, **kwargs)
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 1148, in init_process_group
default_pg, _ = _new_process_group_helper(
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 1264, in _new_process_group_helper
backend_class = ProcessGroupGloo(backend_prefix_store, group_rank, group_size, timeout=timeout)
RuntimeError: Gloo connectFullMesh failed with Connection reset by peer
Traceback (most recent call last):
File "scripts/image_train.py", line 86, in
main()
File "scripts/image_train.py", line 22, in main
dist_util.setup_dist()
File "/home/shao/repo/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation/guided_diffusion/dist_util.py", line 42, in setup_dist
dist.init_process_group(backend=backend, init_method="env://")
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/c10d_logger.py", line 74, in wrapper
func_return = func(*args, **kwargs)
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 1148, in init_process_group
default_pg, _ = _new_process_group_helper(
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 1264, in _new_process_group_helper
backend_class = ProcessGroupGloo(backend_prefix_store, group_rank, group_size, timeout=timeout)
RuntimeError: Gloo connectFullMesh failed with Connection reset by peer
Traceback (most recent call last):
File "scripts/image_train.py", line 86, in
main()
File "scripts/image_train.py", line 22, in main
dist_util.setup_dist()
File "/home/shao/repo/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation/guided_diffusion/dist_util.py", line 42, in setup_dist
dist.init_process_group(backend=backend, init_method="env://")
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/c10d_logger.py", line 74, in wrapper
func_return = func(*args, **kwargs)
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 1148, in init_process_group
default_pg, _ = _new_process_group_helper(
File "/home/shao/anaconda3/envs/torch21-py38/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 1264, in _new_process_group_helper
backend_class = ProcessGroupGloo(backend_prefix_store, group_rank, group_size, timeout=timeout)
RuntimeError: Gloo connectFullMesh failed with Connection reset by peer

Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.


mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[26054,1],0]
Exit code: 1`

train

Hey, I successfully ran your code, but I have a few doubts that I hope you can clarify for me.

image

DIFFUSION_FLAGS="--diffusion_steps 2000 --noise_schedule linear". Why now step is beyond 2000? and Can you explain the parameters?

About the input size

Thanks for your great work.
What should I do if the size of input is (1,24,24)? Can you provide some guidance

results

Hey, @Coordi777
Regarding the test results, I have some doubts and hope you can provide some valuable suggestions.

I am using the SAR2Opt dataset, which consists of 1450 pairs of training samples.

1_0_0
1_0_0

I trained using the default parameters in the code you provided(Thank you).

However, when I sample, I find that the quality of the generated images is not good. Additionally, the values of SSIM and FID metrics are also poor.

model050000.pt
0
1

model070000.pt
test_0.png
0
0
0

test_7.png
7
7
7

Is it because my training data amount is too small, leading to this phenomenon, or are there other settings reasons? I hope you can provide some advice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.