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.43k stars 1.45k forks source link

文件写入错误, 修改:‘/’->'\\' #268

Open cattle2320 opened 2 years ago

cattle2320 commented 2 years ago

cv2.imwrite(out_dir+"/"+im_list[i].split('\')[-1][0:-4]+'.png', (im_portrait*255).astype(np.uint8))

xuebinqin commented 2 years ago

Thanks for raising this issue. This problem depends on what OS you are using. Our default setting is on Ubuntu System. Or you can try os.sep to replace /'' and\''.

On Fri, Nov 12, 2021 at 12:17 PM snake2320 @.***> wrote:

cv2.imwrite(out_dir+"/"+im_list[i].split('\')[-1][0:-4]+'.png', (im_portrait*255).astype(np.uint8))

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/268, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORNW3QOTJ3DGVHHEOYDULTEQXANCNFSM5H4IEVVQ . 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/