Comments (5)
参考文档:Models/official/vision/detection/ReadMe.md
from models.
感谢反馈,请把50行的["state_dict"]
去掉,改为model.load_state_dict(mge.load(args.model))
。这是由于我们更新了预训练权重但未更新代码导致的,我们将尽快修复。
from models.
非常感谢你的回复。
1修改了inference.py的50行代码为:model.load_state_dict(mge.load(args.model))。重新测试。
2 执行Models/official/vision/detection/inference.py出现下面错误:
Traceback (most recent call last):
File "tools/inference.py", line 68, in
main()
File "tools/inference.py", line 50, in main
model.load_state_dict(mge.load(args.model))
File "/home/liyeguang/.local/lib/python3.6/site-packages/megengine/module/module.py", line 342, in load_state_dict
"Unused params violate strict=True
, unused={}".format(unused)。
3 继续修改inference.py的50行代码为:model.load_state_dict(mge.load(args.model),strict=False),进行测试。
4 执行Models/official/vision/detection/inference.py,能够正常结束,生成results.jpg文件。
但是出现了很多下面的警告:
30 18:33:26 WRN skip loading param backbone.bottom_up.bn1.bias
30 18:33:26 WRN skip loading param backbone.bottom_up.bn1.running_mean
30 18:33:26 WRN skip loading param backbone.bottom_up.bn1.running_var
30 18:33:26 WRN skip loading param backbone.bottom_up.bn1.weight
30 18:33:26 WRN skip loading param backbone.bottom_up.conv1.weight
30 18:33:26 WRN skip loading param backbone.bottom_up.fc.bias
5.仔细查看了result.jpg,和cat.jpg相比,没有看到任何变化。
我个人理解:result.jpg中是否圈出猫的轮廓?----还请多多指教。
from models.
这是由于模型与你预训练权重不匹配导致的。你通过model = hub.load('megengine/models', 'resnet50', pretrained=True)
下载的是ResNet50的分类模型,因此在加载入Detection模型时没有正确加载,因此网络不会输出期望的结果。
请通过model = hub.load('megengine/models', 'retinanet_res50_1x_800size', pretrained=True)
或者直接从
https://data.megengine.org.cn/models/weights/retinanet_d3f58dce_res50_1x_800size_36dot0.pkl 下载Detection用的预训练权重。
from models.
按照你的建议,重新获取了训练权重文件。重新测试之后,results.jpg文件能够标记出猫的轮廓了。
非常感谢!
from models.
Related Issues (20)
- 请问有没有 GPT2-ML 预训练模型,希望结合 DTR 进行微调 HOT 4
- 量化模型的时候出现不预期的问题 HOT 1
- COCO数据集测试速度异常 HOT 2
- Missing Code(有代码遗漏导致无法运行) HOT 1
- Missing Code(代码遗漏导致无法运行) HOT 1
- 为什么都不放一下训好的模型权重下载链接? HOT 1
- resnet分类模型无法指定分类数量
- 关于DetectionPadCollator HOT 1
- About '3x' in configs like 'atss_res101_coco_3x_800size.py' HOT 5
- 训练segmentation的时候出现nan HOT 1
- 大佬求帮助,我在训练语义分割的时候,自定义了模型的数据输入,然后训练时偶发性报错'mgb::CudaError' HOT 1
- 大佬求帮助,在训练atss检测的时候,按照官方dump成mge出错,.tm模型不能可视化 HOT 2
- 训练出错(https://github.com/MegEngine/Models/tree/master/official/quantization) HOT 5
- NLP部分的模型试验过程发现无法按照readme运行 HOT 1
- 需要贵公司thundernet的开源 HOT 2
- 有关shufflenet训练学习率的问题 HOT 2
- 无法dump resnet50的量化模型 HOT 1
- add type in argparse
- 想要直接训练好的量化模型(resnet50)来测速 HOT 1
- mutliprocess 替换成dist.launcher HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from models.