当前位置:网站首页>Detectron2 usage model
Detectron2 usage model
2022-04-23 21:01:00 【Top of the program】
from Yacs Config Build the model
from yacs Configuration object , Model ( And its sub models ) Can pass build_model、build_backbone、build_roi_heads Equifunction construction :
from detectron2.modeling import build_model
model = build_model(cfg) # returns a torch.nn.Module
build_model Build a random model with only structural parameters . About how to put existing checkpoint Information about loading into the model and how to use the model object , See below .
load / Save checkpoint
from detectron2.checkpoint import DetectionCheckpointer
DetectionCheckpointer(model).load(file_path_or_url) # load a file, usually from cfg.MODEL.WEIGHTS
checkpointer = DetectionCheckpointer(model, save_dir="output")
checkpointer.save("model_999") # save to output/model_999.pth
Detectron2 Checkpoint identification for pytorch Of .pth Format model , And us model zoon Medium .pkl file . More details about its usage , see also API file .
have access to torch.{load,save} Yes .pth File or pickle.{dump,load} Yes .pkl File arbitrary operation .
版权声明
本文为[Top of the program]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/111/202204210545090198.html
边栏推荐
- 1.整理华子面经--1
- Reentrant function
- Addition, deletion, modification and query of advanced MySQL data (DML)
- On the three paradigms of database design
- Ubuntu 20 installing centernet
- Send email to laravel
- Reference of custom message in ROS function pack failed
- Identifier CV is not defined in opencv4_ CAP_ PROP_ FPS; CV_ CAP_ PROP_ FRAME_ COUNT; CV_ CAP_ PROP_ POS_ Frames problem
- Valueerror: invalid literal for int() with base 10 conversion error related to data type
- 引入结构化并发,Swift 5.5 发布!
猜你喜欢

CUDA, NVIDIA driver, cudnn download address and version correspondence

Google 尝试在 Chrome 中使用 Rust

Opencv application -- jigsaw puzzle
![[matlab 2016 use mex command to find editor visual studio 2019]](/img/34/dd883f0ce4358234eb694287228687.png)
[matlab 2016 use mex command to find editor visual studio 2019]

Matlab: psychtoolbox installation

Some grounded words

MySQL数据库常识之储存引擎

MySQL进阶之表的增删改查

MySQL基础之写表(创建表)

Reentrant function
随机推荐
matplotlib. Pyplot partition drawing
Xiaomi mobile phone has abandoned the "Mi" brand all over the world and switched to the full name brand of "Xiaomi"
ubutnu20安装CenterNet
Unity ECS dots notes
Go limit depth traversal of files in directory
go map
wait、waitpid
MySQL进阶之表的增删改查
go slice
Thinking after learning to type
Win 11K in 100 days, super complete learning guide for job transfer test
What about laptop Caton? Teach you to reinstall the system with one click to "revive" the computer
DeNO 1.13.2 release
The iswow64process function determines the number of program bits
Problem brushing plan -- dynamic programming (III)
Thinkphp5 + data large screen display effect
[SDU chart team - core] enumeration of SVG attribute class design
管道和xargs
MySQL进阶之数据的增删改查(DML)
100天拿下11K,转岗测试的超全学习指南