Skip to content

Commit d254680

Browse files
authored
Add USAM module
1 parent 9d0d6ef commit d254680

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
parser.add_argument('--multi', action='store_true', help='use multiple query' )
4646
parser.add_argument('--fp16', action='store_true', help='use fp16.' )
4747
parser.add_argument('--ibn', action='store_true', help='use ibn.' )
48+
parser.add_argument('--usam', action='store_true', help='use usam.' )
4849
parser.add_argument('--ms',default='1', type=str,help='multiple_scale: e.g. 1 1,1.1 1,1.1,1.2')
4950

5051
opt = parser.parse_args()
@@ -74,6 +75,8 @@
7475
else:
7576
opt.nclasses = 751
7677

78+
if 'usam' in config:
79+
opt.usam = config['usam']
7780
if 'ibn' in config:
7881
opt.ibn = config['ibn']
7982
if 'linear_num' in config:
@@ -282,7 +285,7 @@ def get_id(img_path):
282285
elif opt.use_hr:
283286
model_structure = ft_net_hr(opt.nclasses, linear_num=opt.linear_num)
284287
else:
285-
model_structure = ft_net(opt.nclasses, stride = opt.stride, ibn = opt.ibn, linear_num=opt.linear_num)
288+
model_structure = ft_net(opt.nclasses, stride = opt.stride, ibn = opt.ibn, linear_num=opt.linear_num, usam=opt.usam)
286289

287290
if opt.PCB:
288291
model_structure = PCB(opt.nclasses)

0 commit comments

Comments
 (0)