shawnnew / ammnet Goto Github PK
View Code? Open in Web Editor NEWA Tri-map free direct Alpha Matting.
License: MIT License
A Tri-map free direct Alpha Matting.
License: MIT License
Hello, I can't successfully run the code
To Reproduce
Command:
python3 test.py --device 2 --testList testlist
Error:
Traceback (most recent call last):
File "test.py", line 169, in
main(config, args)
NameError: name 'config' is not defined
Expected behavior
Should have received matting image output for the respectful "testlist" folder
Running on Ubuntu 18, 2 GPU
Hi thanks for sharing your work, I noticed latest commits use different dataset, any chance you can upload the updated pretrained model?
Current I tested was https://github.com/ShawnNew/AMMNet/blob/master/pretrained.pth
你好,能提供预训练模型测试一下吗?
另外,如果使用爱分割的数据集,https://github.com/aisegmentcn/matting_human_datasets,
该怎么处理呢
size mismatch for module.fusion_model.fusion_model.0.0.weight: copying a param with shape torch.Size([64, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 128, 3, 3])
Hi,
When I run test.py I get this error:
copying a param with shape torch.Size([64, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
I think, pre-trained model is for previous version. Can you please update the pretrained.pth
file? I didn't change any param in the config file.
complete error code:
Trainable parameters: 5759030
Traceback (most recent call last):
File "/home/mahdi/Temp/Mask/AMSMNet/test.py", line 183, in <module>
main(config, args.resume, args.device, output_path)
File "/home/mahdi/Temp/Mask/AMSMNet/test.py", line 113, in main
model.load_state_dict(state_dict)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 769, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
Missing key(s) in state_dict: "module.msmnet_model.body.2.weight", "module.msmnet_model.body.2.bias".
Unexpected key(s) in state_dict: "module.msmnet_model.body.3.body.0.weight", "module.msmnet_model.body.3.body.0.bias", "module.msmnet_model.body.3.body.1.weight", "module.msmnet_model.body.3.body.1.bias", "module.msmnet_model.body.3.body.1.running_mean", "module.msmnet_model.body.3.body.1.running_var", "module.msmnet_model.body.3.body.1.num_batches_tracked", "module.msmnet_model.body.3.body.3.weight", "module.msmnet_model.body.3.body.3.bias", "module.msmnet_model.body.3.body.4.weight", "module.msmnet_model.body.3.body.4.bias", "module.msmnet_model.body.3.body.4.running_mean", "module.msmnet_model.body.3.body.4.running_var", "module.msmnet_model.body.3.body.4.num_batches_tracked", "module.msmnet_model.body.4.body.0.weight", "module.msmnet_model.body.4.body.0.bias", "module.msmnet_model.body.4.body.1.weight", "module.msmnet_model.body.4.body.1.bias", "module.msmnet_model.body.4.body.1.running_mean", "module.msmnet_model.body.4.body.1.running_var", "module.msmnet_model.body.4.body.1.num_batches_tracked", "module.msmnet_model.body.4.body.3.weight", "module.msmnet_model.body.4.body.3.bias", "module.msmnet_model.body.4.body.4.weight", "module.msmnet_model.body.4.body.4.bias", "module.msmnet_model.body.4.body.4.running_mean", "module.msmnet_model.body.4.body.4.running_var", "module.msmnet_model.body.4.body.4.num_batches_tracked", "module.msmnet_model.body.5.body.0.weight", "module.msmnet_model.body.5.body.0.bias", "module.msmnet_model.body.5.body.1.weight", "module.msmnet_model.body.5.body.1.bias", "module.msmnet_model.body.5.body.1.running_mean", "module.msmnet_model.body.5.body.1.running_var", "module.msmnet_model.body.5.body.1.num_batches_tracked", "module.msmnet_model.body.5.body.3.weight", "module.msmnet_model.body.5.body.3.bias", "module.msmnet_model.body.5.body.4.weight", "module.msmnet_model.body.5.body.4.bias", "module.msmnet_model.body.5.body.4.running_mean", "module.msmnet_model.body.5.body.4.running_var", "module.msmnet_model.body.5.body.4.num_batches_tracked", "module.msmnet_model.body.6.weight", "module.msmnet_model.body.6.bias", "module.msmnet_model.body.2.body.0.weight", "module.msmnet_model.body.2.body.0.bias", "module.msmnet_model.body.2.body.1.weight", "module.msmnet_model.body.2.body.1.bias", "module.msmnet_model.body.2.body.1.running_mean", "module.msmnet_model.body.2.body.1.running_var", "module.msmnet_model.body.2.body.1.num_batches_tracked", "module.msmnet_model.body.2.body.3.weight", "module.msmnet_model.body.2.body.3.bias", "module.msmnet_model.body.2.body.4.weight", "module.msmnet_model.body.2.body.4.bias", "module.msmnet_model.body.2.body.4.running_mean", "module.msmnet_model.body.2.body.4.running_var", "module.msmnet_model.body.2.body.4.num_batches_tracked", "module.fusion_model.fusion_model.1.2.body.0.weight", "module.fusion_model.fusion_model.1.2.body.0.bias", "module.fusion_model.fusion_model.1.2.body.1.weight", "module.fusion_model.fusion_model.1.2.body.1.bias", "module.fusion_model.fusion_model.1.2.body.1.running_mean", "module.fusion_model.fusion_model.1.2.body.1.running_var", "module.fusion_model.fusion_model.1.2.body.1.num_batches_tracked", "module.fusion_model.fusion_model.1.2.body.3.weight", "module.fusion_model.fusion_model.1.2.body.3.bias", "module.fusion_model.fusion_model.1.2.body.4.weight", "module.fusion_model.fusion_model.1.2.body.4.bias", "module.fusion_model.fusion_model.1.2.body.4.running_mean", "module.fusion_model.fusion_model.1.2.body.4.running_var", "module.fusion_model.fusion_model.1.2.body.4.num_batches_tracked", "module.fusion_model.fusion_model.1.3.body.0.weight", "module.fusion_model.fusion_model.1.3.body.0.bias", "module.fusion_model.fusion_model.1.3.body.1.weight", "module.fusion_model.fusion_model.1.3.body.1.bias", "module.fusion_model.fusion_model.1.3.body.1.running_mean", "module.fusion_model.fusion_model.1.3.body.1.running_var", "module.fusion_model.fusion_model.1.3.body.1.num_batches_tracked", "module.fusion_model.fusion_model.1.3.body.3.weight", "module.fusion_model.fusion_model.1.3.body.3.bias", "module.fusion_model.fusion_model.1.3.body.4.weight", "module.fusion_model.fusion_model.1.3.body.4.bias", "module.fusion_model.fusion_model.1.3.body.4.running_mean", "module.fusion_model.fusion_model.1.3.body.4.running_var", "module.fusion_model.fusion_model.1.3.body.4.num_batches_tracked", "module.fusion_model.fusion_model.1.4.body.0.weight", "module.fusion_model.fusion_model.1.4.body.0.bias", "module.fusion_model.fusion_model.1.4.body.1.weight", "module.fusion_model.fusion_model.1.4.body.1.bias", "module.fusion_model.fusion_model.1.4.body.1.running_mean", "module.fusion_model.fusion_model.1.4.body.1.running_var", "module.fusion_model.fusion_model.1.4.body.1.num_batches_tracked", "module.fusion_model.fusion_model.1.4.body.3.weight", "module.fusion_model.fusion_model.1.4.body.3.bias", "module.fusion_model.fusion_model.1.4.body.4.weight", "module.fusion_model.fusion_model.1.4.body.4.bias", "module.fusion_model.fusion_model.1.4.body.4.running_mean", "module.fusion_model.fusion_model.1.4.body.4.running_var", "module.fusion_model.fusion_model.1.4.body.4.num_batches_tracked", "module.fusion_model.fusion_model.1.5.body.0.weight", "module.fusion_model.fusion_model.1.5.body.0.bias", "module.fusion_model.fusion_model.1.5.body.1.weight", "module.fusion_model.fusion_model.1.5.body.1.bias", "module.fusion_model.fusion_model.1.5.body.1.running_mean", "module.fusion_model.fusion_model.1.5.body.1.running_var", "module.fusion_model.fusion_model.1.5.body.1.num_batches_tracked", "module.fusion_model.fusion_model.1.5.body.3.weight", "module.fusion_model.fusion_model.1.5.body.3.bias", "module.fusion_model.fusion_model.1.5.body.4.weight", "module.fusion_model.fusion_model.1.5.body.4.bias", "module.fusion_model.fusion_model.1.5.body.4.running_mean", "module.fusion_model.fusion_model.1.5.body.4.running_var", "module.fusion_model.fusion_model.1.5.body.4.num_batches_tracked".
size mismatch for module.fusion_model.fusion_model.0.0.weight: copying a param with shape torch.Size([64, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
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.