milesial / Pytorch-UNet

PyTorch implementation of the U-Net for image semantic segmentation with high quality images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

where is the skip-connect?

wangwxr opened this issue · comments

commented

where is the skip-connect????
it's missng in the code

hi , I want to know how to down the dataset. I run the code of "bash scripts/download_data.sh", but need the “Kaggle username”and " Kaggle username".
Please, i don't know how to solve this.

嗯,就是在git上运行的 ,随后就提示Kaggle username输入,
Bin@DESKTOP-DLQF623 MINGW64 /e/Pytorch-UNet-master/scripts
$ bash download_data.sh
Kaggle username:

Bin@DESKTOP-DLQF623 MINGW64 /e/Pytorch-UNet-master/scripts
$ bash download_data.sh
Kaggle username:

Bin@DESKTOP-DLQF623 MINGW64 /e/Pytorch-UNet-master/scripts
$ bash download_data.sh
Requirement already satisfied: kaggle in d:\anaconda\lib\site-packages (1.5.16)
Requirement already satisfied: requests in d:\anaconda\lib\site-packages (from kaggle) (2.28.1)
Requirement already satisfied: certifi in d:\anaconda\lib\site-packages (from kaggle) (2022.12.7)
Requirement already satisfied: python-slugify in d:\anaconda\lib\site-packages (from kaggle) (5.0.2)
Requirement already satisfied: bleach in d:\anaconda\lib\site-packages (from kaggle) (4.1.0)
Requirement already satisfied: six>=1.10 in d:\anaconda\lib\site-packages (from kaggle) (1.16.0)
Requirement already satisfied: python-dateutil in d:\anaconda\lib\site-packages (from kaggle) (2.8.2)
Requirement already satisfied: urllib3 in d:\anaconda\lib\site-packages (from kaggle) (1.26.14)
Requirement already satisfied: tqdm in d:\anaconda\lib\site-packages (from kaggle) (4.64.1)
Requirement already satisfied: packaging in d:\anaconda\lib\site-packages (from bleach->kaggle) (22.0)
Requirement already satisfied: webencodings in d:\anaconda\lib\site-packages (from bleach->kaggle) (0.5.1)
Requirement already satisfied: text-unidecode>=1.3 in d:\anaconda\lib\site-packages (from python-slugify->kaggle) (1.3)
Requirement already satisfied: charset-normalizer<3,>=2 in d:\anaconda\lib\site-packages (from requests->kaggle) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in d:\anaconda\lib\site-packages (from requests->kaggle) (3.4)
Requirement already satisfied: colorama in d:\anaconda\lib\site-packages (from tqdm->kaggle) (0.4.6)
401 - Unauthorized
unzip: cannot find or open train_hq.zip, train_hq.zip.zip or train_hq.zip.ZIP.
mv: cannot stat 'train_hq/': No such file or directory
rm: cannot remove 'train_hq': No such file or directory
rm: cannot remove 'train_hq.zip': No such file or directory
401 - Unauthorized
unzip: cannot find or open train_masks.zip, train_masks.zip.zip or train_masks.zip.ZIP.
mv: cannot stat 'train_masks/
': No such file or directory
rm: cannot remove 'train_masks': No such file or directory
rm: cannot remove 'train_masks.zip': No such file or directory

不好意思,这些报错了....

想问下这个数据集是自己准备吗?我一直认为是作者给了运行数据集,然后运行这个是下载数据集的

输入kaggle的用户名和密码

------------------ 原始邮件 ------------------ 发件人: "milesial/Pytorch-UNet" @.>; 发送时间: 2023年8月30日(星期三) 下午4:22 @.>; 抄送: "Ghost @.@.>; 主题: Re: [milesial/Pytorch-UNet] where is the skip-connect? (Issue #456) 嗯,就是在git上运行的 ,随后就提示Kaggle username输入, @.*** MINGW64 /e/Pytorch-UNet-master/scripts $ bash download_data.sh Kaggle username: @.*** MINGW64 /e/Pytorch-UNet-master/scripts $ bash download_data.sh Kaggle username: — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

哥,作者的数据集你能用百度网盘、阿里云盘分享一下吗?我这边Git一直下载报错
拜托

Hello. Here is the skip connect

x = torch.cat([x2, x1], dim=1)

where is the skip-connect???? it's missng in the code

I was searching for it quite a while as well. The skip connection is actually included in the forward method of the UP class in unit_parts.py. That is why the up methods in the undet_model.py also get 2 parameters instead of 1 as for the down

Also there is some padding added to the upsampled tensor for dimension matching as the corresponding tensor from the downsampling path is bigger as you can see from the unet architecture.
although I am not quite sure if this is the right way to go.. in the original paper on unets the tensor from the downsampling path was cropped rather than to pad the tensor from the upsampling path