U-2-Net icon indicating copy to clipboard operation
U-2-Net copied to clipboard

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

Open kamalkantamaity opened this issue 4 years ago • 11 comments

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

kamalkantamaity avatar Jun 27 '20 13:06 kamalkantamaity

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

I am also have same issues.

muhammadabdullah34907 avatar Jun 27 '20 16:06 muhammadabdullah34907

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

kamalkantamaity avatar Jun 27 '20 17:06 kamalkantamaity

+1

cenkbircanoglu avatar Sep 16 '20 08:09 cenkbircanoglu

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 [email protected] 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.

xuebinqin avatar Sep 16 '20 15:09 xuebinqin

@NathanUA where exactly are you referring to use this ?

muhammadabdullah34907 avatar Oct 13 '20 02:10 muhammadabdullah34907

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).

CeciliaPYY avatar Jan 27 '21 05:01 CeciliaPYY

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

jorjiang avatar Dec 13 '21 12:12 jorjiang

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/

xuebinqin avatar Dec 13 '21 13:12 xuebinqin

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 ;)

jorjiang avatar Dec 14 '21 02:12 jorjiang

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

deshwalmahesh avatar Apr 25 '22 13:04 deshwalmahesh

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

jorjiang avatar Apr 26 '22 18:04 jorjiang