main code
update anchors
This commit is contained in:
parent
fef71ef42c
commit
54d3908a0c
@ -38,7 +38,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"with open('cfg/deploy/yolov7.yaml') as f:\n",
|
"with open('cfg/deploy/yolov7.yaml') as f:\n",
|
||||||
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
||||||
"anchors = len(yml['anchors'])\n",
|
"anchors = len(yml['anchors'][0]) // 2\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# copy intersect weights\n",
|
"# copy intersect weights\n",
|
||||||
"state_dict = ckpt['model'].float().state_dict()\n",
|
"state_dict = ckpt['model'].float().state_dict()\n",
|
||||||
@ -100,7 +100,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"with open('cfg/deploy/yolov7x.yaml') as f:\n",
|
"with open('cfg/deploy/yolov7x.yaml') as f:\n",
|
||||||
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
||||||
"anchors = len(yml['anchors'])\n",
|
"anchors = len(yml['anchors'][0]) // 2\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# copy intersect weights\n",
|
"# copy intersect weights\n",
|
||||||
"state_dict = ckpt['model'].float().state_dict()\n",
|
"state_dict = ckpt['model'].float().state_dict()\n",
|
||||||
@ -162,7 +162,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"with open('cfg/deploy/yolov7-w6.yaml') as f:\n",
|
"with open('cfg/deploy/yolov7-w6.yaml') as f:\n",
|
||||||
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
||||||
"anchors = len(yml['anchors'])\n",
|
"anchors = len(yml['anchors'][0]) // 2\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# copy intersect weights\n",
|
"# copy intersect weights\n",
|
||||||
"state_dict = ckpt['model'].float().state_dict()\n",
|
"state_dict = ckpt['model'].float().state_dict()\n",
|
||||||
@ -248,7 +248,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"with open('cfg/deploy/yolov7-e6.yaml') as f:\n",
|
"with open('cfg/deploy/yolov7-e6.yaml') as f:\n",
|
||||||
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
||||||
"anchors = len(yml['anchors'])\n",
|
"anchors = len(yml['anchors'][0]) // 2\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# copy intersect weights\n",
|
"# copy intersect weights\n",
|
||||||
"state_dict = ckpt['model'].float().state_dict()\n",
|
"state_dict = ckpt['model'].float().state_dict()\n",
|
||||||
@ -334,7 +334,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"with open('cfg/deploy/yolov7-d6.yaml') as f:\n",
|
"with open('cfg/deploy/yolov7-d6.yaml') as f:\n",
|
||||||
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
||||||
"anchors = len(yml['anchors'])\n",
|
"anchors = len(yml['anchors'][0]) // 2\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# copy intersect weights\n",
|
"# copy intersect weights\n",
|
||||||
"state_dict = ckpt['model'].float().state_dict()\n",
|
"state_dict = ckpt['model'].float().state_dict()\n",
|
||||||
@ -420,7 +420,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"with open('cfg/deploy/yolov7-e6e.yaml') as f:\n",
|
"with open('cfg/deploy/yolov7-e6e.yaml') as f:\n",
|
||||||
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
" yml = yaml.load(f, Loader=yaml.SafeLoader)\n",
|
||||||
"anchors = len(yml['anchors'])\n",
|
"anchors = len(yml['anchors'][0]) // 2)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# copy intersect weights\n",
|
"# copy intersect weights\n",
|
||||||
"state_dict = ckpt['model'].float().state_dict()\n",
|
"state_dict = ckpt['model'].float().state_dict()\n",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user