chrisdcs / LAMA-Learned-Alternating-Minimization-Algorithm

12 stars 3 forks source link

looking forward the training code #1

Closed syf0518 closed 10 months ago

chrisdcs commented 11 months ago

No description provided.

Hi Thank you for following up, I just finished cleaning up the code, and I tested on a new machine, everything should be working now if you follow the instructions in README, please let me know if you have any additional questions!

syf0518 commented 11 months ago

Thank you for your great work.I modified your training code for joint sparse-view reconstruction and metal artifact reduction in CT images, but I found a problem while training the network.As you can see in the figure below, epochs keep looping between 13 and 14, I think training is in an endless cycle now. 屏幕截图 2023-11-28 115112

chrisdcs commented 11 months ago

Thank you for your great work.I modified your training code for joint sparse-view reconstruction and metal artifact reduction in CT images, but I found a problem while training the network.As you can see in the figure below, epochs keep looping between 13 and 14, I think training is in an endless cycle now. 屏幕截图 2023-11-28 115112

Okay, my training code reload the saved best checkpoint and start over if it thinks backpropagation diverges, and then run scheduler one step to reduce the learning rate. It gets stuck in the endless cycle could mean the divergence check occurs every time it reloads the checkpoint, you may want to modify that or even turn that off entirely, or write your own scheduler rule.

Other things you can check to see if you changed the dataset to cause the data format not the same. The provided dataset sinogram ranges from 0 to 3.84, images range from 0 to 1.

And since the problem is different, you may want to try modifying the learning rate as well.

Hope this helps, and let me know if you discover what might cause the issue and have more questions.

chenjun150 commented 11 months ago

Thank you for your great job.I want to change the size of input from 256 to 512,how can I do that?

chrisdcs commented 11 months ago

Thank you for your great job.I want to change the size of input from 256 to 512,how can I do that?

256x256 is the CT image size, and 512 is the sinogram data size for each scan. If you have 64 views, the sinogram data size is 64x512. What do you mean by changing the size of input from 256 to 512?

chenjun150 commented 11 months ago

Sorry for my misrepresentation of the issue. Since the size of the input CT image is 256256,I want to verify the effect of 512512, but I don't see any noticeable changes in the code to the size of the input image.

chrisdcs commented 11 months ago

Sorry for my misrepresentation of the issue. Since the size of the input CT image is 256_256,I want to verify the effect of 512_512, but I don't see any noticeable changes in the code to the size of the input image.

You can add a line to resize the input image from 256x256 to 512x512 in the data loader. I did not change the size of the input images for any experiments.

However, I don't recommend doing that because then you need to modify radon transform as well.

chenjun150 commented 11 months ago

Thank you for your answer!