xuebinqin / U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."
Apache License 2.0
8.49k stars 1.46k forks source link

How to change Input/Output image dimension from 320x320 to 640x640 #41

Open kamalkantamaity opened 4 years ago

kamalkantamaity commented 4 years ago

Dear Nathan , I hope you are doing well . Your results are really stunning thank you for sharing the project . It would be deeply appreciated if you can kindly answer the following question for me .

I want to change the model input image and output prediction size from 320x320 to 640x640 . Can you please guide me as to how I can get this done .

Thanks a lot

Kinds Regards Kamal Kanta Maity

muhammadabdullah34907 commented 4 years ago

Hi @kamalkantamaity checkout this discussion: https://github.com/NathanUA/U-2-Net/issues/19#issue-619564369

I am also have same issues.

kamalkantamaity commented 4 years ago

Hi @kamalkantamaity checkout this discussion: #19 (comment)

I am also have same issues.

Hi @muhammadabdullah34907 can you tell me how did you solve the issue an also I would like to tell you that I am only looking to make the input size to 640x640 not more than that

cenkbircanoglu commented 4 years ago

+1

xuebinqin commented 4 years ago

Hi,

Recently, we did literature survey on the high resolution image segmentation. We found that combining our U^2-Net with Cascaded PSPNet (https://github.com/hkchengrex/CascadePSP) is a good option for high resolution image segmentation. The only issue is that cascaded pspnet will cost a bit more time. This combination will perform better than changing the input size and retrain the network.

On Sep 16, 2020, at 2:26 AM, Cenk Bircanoğlu notifications@github.com wrote:

+1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NathanUA/U-2-Net/issues/41#issuecomment-693255733, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORLH2I3VAXLZJ4VPY53SGBZB5ANCNFSM4OKBGSSQ.

muhammadabdullah34907 commented 3 years ago

@NathanUA where exactly are you referring to use this ?

CeciliaPYY commented 3 years ago

Hi, Recently, we did literature survey on the high resolution image segmentation. We found that combining our U^2-Net with Cascaded PSPNet (https://github.com/hkchengrex/CascadePSP) is a good option for high resolution image segmentation. The only issue is that cascaded pspnet will cost a bit more time. This combination will perform better than changing the input size and retrain the network. On Sep 16, 2020, at 2:26 AM, Cenk Bircanoğlu @.***> wrote: +1 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#41 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORLH2I3VAXLZJ4VPY53SGBZB5ANCNFSM4OKBGSSQ.

So what do you mean by with cascadePSP, is the pipeline like this, input size still keeps 320 but using cascadePSP as post-process method, or changes the input size larger and do the following~ Quite interested in this topic, cause still find some error of u-2-net when comparing with other method, e.g hrnet+ocr, which is some kind of plan to do high-resolution image segmentation( two-classes).

jorjiang commented 2 years ago

Have you experimented with the idea, how did it go?

xuebinqin commented 2 years ago

Thanks for your interest. It depends on the dataset resolution. Larger input size will help with retraining details of those images with larger sizes. In our next paper, we will provide you another model for larger size input. It will be ready soon, please be aware of our updates.

On Mon, Dec 13, 2021 at 4:51 PM Jiang Ji @.***> wrote:

Have you experimented with the idea, how did it go?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/41#issuecomment-992446586, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORK34F7KWJF73V5MXL3UQXT47ANCNFSM4OKBGSSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

jorjiang commented 2 years ago

Thanks for your interest. It depends on the dataset resolution. Larger input size will help with retraining details of those images with larger sizes. In our next paper, we will provide you another model for larger size input. It will be ready soon, please be aware of our updates. On Mon, Dec 13, 2021 at 4:51 PM Jiang Ji @.***> wrote: Have you experimented with the idea, how did it go? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#41 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORK34F7KWJF73V5MXL3UQXT47ANCNFSM4OKBGSSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. -- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

Thanks, I made it work and tested on a few examples, it truly works amazing. the only problem is the speed, the u2net step takes less than 1 second on a 6 core CPU, but the CascadePSP step would take at least 15 seconds even when I set fast=False. But still, it's really impressive. looking forward to the new paper ;)

deshwalmahesh commented 2 years ago

Thanks for your interest. It depends on the dataset resolution. Larger input size will help with retraining details of those images with larger sizes. In our next paper, we will provide you another model for larger size input. It will be ready soon, please be aware of our updates. On Mon, Dec 13, 2021 at 4:51 PM Jiang Ji @.***> wrote: Have you experimented with the idea, how did it go? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#41 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORK34F7KWJF73V5MXL3UQXT47ANCNFSM4OKBGSSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. -- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

Thanks, I made it work and tested on a few examples, it truly works amazing. the only problem is the speed, the u2net step takes less than 1 second on a 6 core CPU, but the CascadePSP step would take at least 15 seconds even when I set fast=False. But still, it's really impressive. looking forward to the new paper ;)

Hi, I looked at you repo . Could not find the code which merges the both. Can you please provide either a Notebook or the code? @jorjiang

jorjiang commented 2 years ago

Thanks for your interest. It depends on the dataset resolution. Larger input size will help with retraining details of those images with larger sizes. In our next paper, we will provide you another model for larger size input. It will be ready soon, please be aware of our updates. On Mon, Dec 13, 2021 at 4:51 PM Jiang Ji @.***> wrote: Have you experimented with the idea, how did it go? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#41 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORK34F7KWJF73V5MXL3UQXT47ANCNFSM4OKBGSSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. -- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

Thanks, I made it work and tested on a few examples, it truly works amazing. the only problem is the speed, the u2net step takes less than 1 second on a 6 core CPU, but the CascadePSP step would take at least 15 seconds even when I set fast=False. But still, it's really impressive. looking forward to the new paper ;)

Hi, I looked at you repo . Could not find the code which merges the both. Can you please provide either a Notebook or the code? @jorjiang

hey, was just a quick test on a notebook and i did not save it afterwards, but it's pretty straight forward. you just need to check how those two repos work and feed the output of the u2net into CascadePSP, if you understand the output of u2net and the input of CascadePSP, you can do it