Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All configurations available in Detectron2 are not supported by D2go #150

Open
shivadvg19 opened this issue Dec 6, 2021 · 1 comment
Open
Labels
documentation Improvements or additions to documentation

Comments

@shivadvg19
Copy link

  • I am able to apply Object detection with Mask-RCNN using detectron2 and getting good results for my custom dataset. but when i try to use the same architecture with d2go to create a mobile deployable model am not able to use the same config file.

  • can we have a list of configurations/architectures supported in d2go with quantization aware training and deployable in android mobiles.

@shivadvg19 shivadvg19 added the documentation Improvements or additions to documentation label Dec 6, 2021
@zhanghang1989
Copy link
Contributor

Standard detectron models are not deployable. The supported backbones are available at

MODEL_ARCH_BUILTIN = {
"default": {
"trunk": DEFAULT_STAGES[0:4],
"rpn": [[_repeat_last(DEFAULT_STAGES[3])]],
"bbox": LARGE_BOX_HEAD_STAGES,
"mask": LARGE_UPSAMPLE_HEAD_STAGES,
"kpts": LARGE_UPSAMPLE_HEAD_STAGES,
"basic_args": _BASIC_ARGS,
},
"default_dsmask": {
"trunk": DEFAULT_STAGES[0:4],
"rpn": [[_repeat_last(DEFAULT_STAGES[3])]],
"bbox": SMALL_BOX_HEAD_STAGES,
"mask": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"kpts": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_A": {
"trunk": FBNetV3_A[0:4],
"rpn": [[_repeat_last(FBNetV3_A[3])]],
"bbox": [FBNetV3_A[4]],
"mask": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_B": {
"trunk": FBNetV3_B[0:4],
"rpn": [[_repeat_last(FBNetV3_B[3])]],
"bbox": [FBNetV3_B[4]],
"basic_args": _BASIC_ARGS,
},
"FBNetV3_C": {
"trunk": FBNetV3_C[0:4],
"rpn": [[_repeat_last(FBNetV3_C[3])]],
"bbox": [FBNetV3_C[4]],
"basic_args": _BASIC_ARGS,
},
"FBNetV3_D": {
"trunk": FBNetV3_D[0:4],
"rpn": [[_repeat_last(FBNetV3_D[3])]],
"bbox": [FBNetV3_D[4]],
"basic_args": _BASIC_ARGS,
},
"FBNetV3_E": {
"trunk": FBNetV3_E[0:4],
"rpn": [[_repeat_last(FBNetV3_E[3])]],
"bbox": [FBNetV3_E[4]],
"basic_args": _BASIC_ARGS,
},
"FBNetV3_F": {
"trunk": FBNetV3_F[0:4],
"rpn": [[_repeat_last(FBNetV3_F[3])]],
"bbox": [FBNetV3_F[4]],
"basic_args": _BASIC_ARGS,
},
"FBNetV3_G": {
"trunk": FBNetV3_G[0:4],
"rpn": [[_repeat_last(FBNetV3_G[3])]],
"bbox": [FBNetV3_G[4]],
"mask": LARGE_UPSAMPLE_HEAD_STAGES,
"kpts": LARGE_UPSAMPLE_HEAD_D21_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_H": {
"trunk": FBNetV3_H[0:4],
"rpn": [[_repeat_last(FBNetV3_H[3])]],
"bbox": [FBNetV3_H[4]],
"basic_args": _BASIC_ARGS,
},
"FBNetV3_A_dsmask_C5": {
"trunk": FBNetV3_A_dsmask,
"rpn": [[_repeat_last(FBNetV3_A_dsmask[3])]],
"bbox": SMALL_BOX_HEAD_STAGES,
"mask": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"kpts": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_A_dsmask": {
"trunk": FBNetV3_A_dsmask[0:4],
"rpn": [[_repeat_last(FBNetV3_A_dsmask[3])]],
"bbox": SMALL_BOX_HEAD_STAGES,
"mask": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"kpts": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_A_dsmask_tiny": {
"trunk": FBNetV3_A_dsmask_tiny[0:4],
"rpn": [[_repeat_last(FBNetV3_A_dsmask_tiny[3])]],
"bbox": TINY_BOX_HEAD_STAGES,
"mask": TINY_DS_UPSAMPLE_HEAD_STAGES,
"kpts": TINY_DS_UPSAMPLE_HEAD_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_B_light_large": {
"trunk": FBNetV3_B_light_no_se[0:4],
"rpn": [[_repeat_last(FBNetV3_B_light_no_se[3])]],
"bbox": SMALL_BOX_HEAD_STAGES,
"mask": SMALL_DS_UPSAMPLE_HEAD_STAGES,
"kpts": LARGE_UPSAMPLE_HEAD_D21_STAGES,
"basic_args": _BASIC_ARGS,
},
"FBNetV3_G_fpn": {
"trunk": FBNetV3_G[0:5], # FPN uses all 5 stages
"rpn": [[_repeat_last(FBNetV3_G[3], n=1)]],
"bbox": [FBNetV3_G[4]],
"mask": FPN_UPSAMPLE_HEAD_STAGES,
"kpts": LARGE_UPSAMPLE_HEAD_D21_STAGES,
"basic_args": _BASIC_ARGS,
},
}

Please also used the built-in faster rcnn / mask rcnn model configs https://github.com/facebookresearch/d2go/tree/master/configs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants