当前位置:网站首页>旋转框目标检测mmrotate v0.3.1 学习模型
旋转框目标检测mmrotate v0.3.1 学习模型
2022-07-02 02:44:00 【qq_41627642】
1、我们基本上将模型组件分为5种类型
1、backbone: usually an FCN network to extract feature maps, e.g., ResNet, Swin.
2、neck: the component between backbones and heads, e.g., FPN, ReFPN.
3、head: the component for specific tasks, e.g., bbox prediction.
4、roi extractor: the part for extracting RoI features from feature maps, e.g., RoI Align Rotated.
5、loss: the component in head for calculating losses, e.g., FocalLoss, GWDLoss, and KFIoULoss.
2、开发新的组件
2.1 Add a new backbone
这里我们以MobileNet为例展示如何开发新组件
1. Define a new backbone (e.g. MobileNet)
Create a new file mmrotate/models/backbones/mobilenet.py.
import torch.nn as nn
from mmrotate.models.builder import ROTATED_BACKBONES
@ROTATED_BACKBONES.register_module()
class MobileNet(nn.Module):
def __init__(self, arg1, arg2):
pass
def forward(self, x): # should return a tuple
pass
2.2 导入模块
You can either add the following line to mmrotate/models/backbones/init.py
from .mobilenet import MobileNet
or alternatively add
custom_imports = dict(
imports=['mmrotate.models.backbones.mobilenet'],
allow_failed_imports=False)
到配置文件,以避免修改原始代码。
2.3. Use the backbone in your config file
model = dict(
...
backbone=dict(
type='MobileNet',
arg1=xxx,
arg2=xxx),
...
边栏推荐
- Es interview questions
- As a software testing engineer, will you choose the bank post? Laolao bank test post
- 【带你学c带你飞】1day 第2章 (练习2.2 求华氏温度 100°F 对应的摄氏温度
- 【做题打卡】集成每日5题分享(第二期)
- Start from scratch - Web Host - 01
- Share the basic knowledge of a common Hongmeng application
- Vsocde has cli every time it is opened js
- 2022-2028 global deep sea generator controller industry research and trend analysis report
- What kind of good and cost-effective Bluetooth sports headset to buy
- [learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
猜你喜欢
New programmer magazine | Li Penghui talks about open source cloud native message flow system
【OpenCV】-5种图像滤波的综合示例
【带你学c带你飞】4day第2章 用C语言编写程序(练习 2.5 生成乘方表与阶乘表
Which kind of sports headphones is easier to use? The most recommended sports headphones
[liuyubobobo play with leetcode algorithm interview] [00] Course Overview
[opencv] - comprehensive examples of five image filters
STM32__05—PWM控制直流电机
Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
Share the basic knowledge of a common Hongmeng application
QT implementation interface jump
随机推荐
[learn C and fly] 3day Chapter 2 program in C language (exercise 2.3 calculate piecewise functions)
CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
C # use system data. The split mixed mode assembly is generated for the "v2.0.50727" version of the runtime, and it cannot be loaded in the 4.0 runtime without configuring other information
What kind of good and cost-effective Bluetooth sports headset to buy
2022-2028 global encryption software industry research and trend analysis report
QT implementation interface jump
[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
What are the common proxy servers and what are the differences?
Yyds dry goods inventory accelerating vacuum in PG
[untitled]
自定义组件的 v-model
How to hide the scroll bar of scroll view in uniapp
flutter 中間一個元素,最右邊一個元素
oracle创建只读权限的用户简单四步走
Comparative analysis of MVC, MVP and MVVM, source code analysis
Use usedeferredvalue for asynchronous rendering
STM32__ 05 - PWM controlled DC motor
MVVM and MVC
Calculation (computer) code of suffix expression
Soul app released the annual report on generation Z behavior: nearly 20% of young people love shopping in the vegetable market