kmsiapps / e2e-dnn-comm-for-image

End to end deep neural network based semantic communication system for image.
64 stars 6 forks source link

dataset #2

Open Echo-cwb opened 2 years ago

Echo-cwb commented 2 years ago

Dear author: I met some problems when I run this code, I wondered wheather you can provide the data

kmsiapps commented 2 years ago

Can you provide some error logs?

You should edit line 12, 13 of train.py to properly include your CIFAR-10 dataset folder. The dataset folder should include test/ and train/ folders, which contains image (.png or .jpg) files.

You also need to remove line 60, as you don't have any pretrained weight (epoch_91.ckpt), or you may want to use ./best-model/best_snr30).

Echo-cwb commented 2 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Dear Hanju
            Thank you very much for your reply. I have adjusted the code for the data part and it runs successfully, but I have a question, did you use all the 50,000 pieces of training data of cifa10 for training, in this way the model training speed is quite slow. I spent 1 hours to run 7 epochs. And I want to konw if there is a relevant paper for your code to read?

Very grateful for your help.

Yours Sincerely!

                Wenbin ***@***.***

On 5/4/2022 08:58,Hanju ***@***.***> wrote: 

Can you provide some error logs? You should edit line 12, 13 of train.py to properly include your CIFAR-10 dataset folder. The dataset folder should include test/ and train/ folders, which contains image (.png or .jpg) files. You also need to remove line 60, as you don't have any pretrained weight (epoch_91.ckpt), or you may want to use ./best-model/best_snr30).

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

kmsiapps commented 2 years ago

@Echo-cwb One epoch took about one minute on my RTX 3070 machine. Are you running tensorflow on gpu?

Echo-cwb commented 2 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Dear Hanju:        I run it on the Colab with free GPU, but it seems just use CPU, without calling the GPU, I can not figure out the reason. The link below is my code for migrating to Colab based on your code, I would be very grateful if you could guide me!Thank you very much for your help!https://colab.research.google.com/drive/1kOJ27UGNOGy0Dr8ZFiFmgUiosi4WS8Vq?usp=sharing

                Wenbin ***@***.***

On 5/4/2022 16:09,Hanju ***@***.***> wrote: 

@Echo-cwb One epoch took about one minute on my RTX 3070 machine. Are you running tensorflow on gpu?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kmsiapps commented 2 years ago

Follow https://colab.research.google.com/notebooks/gpu.ipynb to check if tensorflow are using GPUs.

It seems you're using your google drive to load the CIFAR-10, so that might be the bottleneck? Try downloading CIFAR-10 dataset on your colab machine and see if it boosts the training time.

Echo-cwb commented 2 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Dear Hanju:Thanks a lot for your generous help. I would like to know if you have any code related papers out there to read so I can better understand your code.Thanks again for your help!Yours Sincerely!

                Wenbin ***@***.***

On 5/4/2022 23:05,Hanju ***@***.***> wrote: 

Follow https://colab.research.google.com/notebooks/gpu.ipynb to check if tensorflow are using GPUs. It seems you're using your google drive to load the CIFAR-10, so that might be the bottleneck? Try downloading CIFAR-10 dataset on your colab machine and see if it boosts the training time.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kmsiapps commented 2 years ago

For overall architecture, I think system architecture figure on readme would help. https://user-images.githubusercontent.com/23615360/155274350-3c9cf90f-cef4-4e1c-8e88-cbb0284b1923.png

Residual block is from ResNet paper, and ViT block is from ViT paper.

Denoising autoencoder is just a simple Residual block-based autoencoder, and this guide would be helpful :)

Echo-cwb commented 2 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Dear Hanju:Thank you for your generous help. After running and understanding the code completely, I have a few questions that I would like to hear from you:

The first one: You call the whole code a semantic communication system in the title, but you do not load it on the carrier of the wireless communication system after you have performed the encoder, which I don't quite understand; Second: The semantic communication system generally includes semantic extraction coding and channel coding. From your code, there is no channel coding part, but the features after the encoder are directly input into the channel; Third: You don't seem to reflect the background knowledge shared between the transmitter and the receiver here, and it feels more like an end-to-end communication system than a semantic communication system. Hope to get an answer, thank you very much for your help. Yours Sincerely!

                Wenbin ***@***.***

On 5/6/2022 15:20,Hanju ***@***.***> wrote: 

For overall architecture, I think system architecture figure on readme would help. https://user-images.githubusercontent.com/23615360/155274350-3c9cf90f-cef4-4e1c-8e88-cbb0284b1923.png Residual block is from ResNet paper, and ViT block is from ViT paper. Denoising autoencoder is just a simple Residual block-based autoencoder, and this guide would be helpful :)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kmsiapps commented 2 years ago

Hello, thank you for your interest for my project :)

Firstly, this code does not actually send produced constellation via wireless channel. This code is just for simulation, so the encoded signal just go through simulated AWGN/rayleigh channel.

Sencondly, the word "semantic" is frankly bit ambiguous, and I interprete it as utilizing data statistics and prior for given domain (e.g., image, for this work), rather than assuming iid distributions. As the network is trained in an end-to-end manner, the encoder and decoder jointly learn the image pixel's statistics and priors to save them on the network's trained parameter. So in that sense, I think the pretrained encoder and the decoder are exploiting the shared knowledge. This also can be viewed as a deep-learning based joint source-channel coding (as the network are trained to optimize the parameter in the simulated AWGN environment, it learns to produce representations that compresses the signal well and are robust to channel noises)

This work does not compress the image data and produce 1D constellation, which is unrealistic though. Actually this is the old work, and recently I radically changed the architecture for ICC demo to compress the data up to 1/6 data rate and produce I/Q constellations (currently not public, but planning to open the source in the near future). It also contains the SDR-based wireless transmission code (via USRP, but still bit coarse implementation as I'm not an RF guy haha), so stay tuned!

Echo-cwb commented 2 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Dear Hanju:
    Thanks a lot for your help, I have learned much in your code, Thank you very much!Yours Sincerely!

                Wenbin ***@***.***

On 5/14/2022 11:54,Hanju ***@***.***> wrote: 

Hello, thank you for your interest for my project :) Firstly, this code does not actually send produced constellation via wireless channel. This code is just for simulation, so the encoded signal just go through simulated AWGN/rayleigh channel. Sencondly, the word "semantic" is frankly bit ambiguous, and I interpreted it as utilizing data statistics and prior for given domain (e.g., image, for this work), rather than assuming iid distributions. As the network is trained in an end-to-end manner, the encoder and decoder jointly learn the image pixel's statistics and priors to save them on the network's trained parameter. So in that sense, I think the pretrained encoder and the decoder are exploiting the shared knowledge. This also can be viewed as a deep-learning based joint source-channel coding (as the network are trained to optimize the parameter in the simulated AWGN environment) This work does not compress the image data and produce 1D constellation, which is unrealistic though. Actually this is the old work, and recently I radically changed the architecture for ICC demo to compress the data up to 1/6 data rate and produce I/Q constellations (currently not public, but planning to open the source in the near future). It also contains the SDR-based wireless transmission code (via USRP, but still bit coarse implementation as I'm not an RF guy haha), so stay tuned!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Caowintay commented 1 year ago

Dear author: I met some problems when I run this code, I wondered wheather you can provide the data

Hello, now I have some questions about this project. If you are a Chinese, could we have a chat?

kaiyuanzhao1 commented 8 months ago

Could you tell me the vision of Keras and tensorflow, thanks.