piggyjerry / dc-net Goto Github PK
View Code? Open in Web Editor NEWThe code for paper: "DC-Net: Divide-and-Conquer for Salient Object Detection"
Home Page: https://arxiv.org/pdf/2305.14955.pdf
License: MIT License
The code for paper: "DC-Net: Divide-and-Conquer for Salient Object Detection"
Home Page: https://arxiv.org/pdf/2305.14955.pdf
License: MIT License
io.imsave(os.path.join(result_path,im_name+".png"),(result*255).permute(1,2,0).cpu().data.numpy().astype(np.uint8))
raise ValueError("Can't write images with one color channel.")
need .squeeze() reshape (WH1) to (WH) :
io.imsave(os.path.join(result_path,im_name+".png"),(result255).permute(1,2,0).cpu().data.numpy().astype(np.uint8).squeeze())
Inference-S.py
line 106 test_state_dict[weight]=torch.cat(weights,0)
TypeError: expected Tensor as element 0 in argument 0, but got str
Hi author,thanks for your hard work! I have a problem when I run the "main-DC-Net-R.py":
D:\program\Anaconda\envs\DCNet\python.exe D:/PythonProject/DC-Net/main-DC-Net-R.py
building model...
D:\program\Anaconda\envs\DCNet\lib\site-packages\torchvision\models_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
D:\program\Anaconda\envs\DCNet\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None
for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet34_Weights.IMAGENET1K_V1
. You can also use weights=ResNet34_Weights.DEFAULT
to get the most up-to-date weights.
warnings.warn(msg)
Model Name: DC-Net-R
batch size: 32
--- create training dataloader ---
------------------------------ train --------------------------------
--->>> train dataset 0 / 1 DUTS-TR <<<---
-im- DUTS-TR ./datasets/DUTS-TR/im : 10553
-gt- DUTS-TR ./datasets/DUTS-TR/gt : 10553
1 train dataloaders created
--- create valid dataloader ---
------------------------------ valid --------------------------------
--->>> valid dataset 0 / 1 DUTS-TE <<<---
-im- DUTS-TE ./datasets/DUTS-TE/im : 5019
-gt- DUTS-TE ./datasets/DUTS-TE/gt : 5019
1 valid dataloaders created
--- build model ---
Number of parameters: 88956629
--- define optimizer ---
Selected optimization level O1: Insert automatic casts around Pytorch functions and Tensor methods.
Defaults for this optimization level are:
enabled : True
opt_level : O1
cast_model_type : None
patch_torch_functions : True
keep_batchnorm_fp32 : None
master_weights : None
loss_scale : dynamic
Processing user overrides (additional kwargs that are not None)...
After processing overrides, optimization options are:
enabled : True
opt_level : O1
cast_model_type : None
patch_torch_functions : True
keep_batchnorm_fp32 : None
master_weights : None
loss_scale : dynamic
Warning: multi_tensor_applier fused unscale kernel is unavailable, possibly because apex was installed without --cuda_ext --cpp_ext. Using Python fallback. Original ImportError was: ModuleNotFoundError("No module named 'amp_C'")
.\apex_init_.py:68: DeprecatedFeatureWarning: apex.amp is deprecated and will be removed by the end of February 2023. Use PyTorch AMP
warnings.warn(msg, DeprecatedFeatureWarning)
Could you tell me how to fix it ? I am looking forward to your reply.
数据集里的图像大小已经是[384,384]了吗
这个sod的任务点应该是目前刷的最高的点了吧。真的很不容易。👍
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.