Skip to content

Commit 9d0d6ef

Browse files
authored
Add USAM module
1 parent 12bb590 commit 9d0d6ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
parser.add_argument('--use_hr', action='store_true', help='use hrNet' )
7070
parser.add_argument('--use_convnext', action='store_true', help='use ConvNext' )
7171
parser.add_argument('--ibn', action='store_true', help='use resnet+ibn' )
72+
parser.add_argument('--usam', action='store_true', help='use resnet+usam (Joint Representation Learning and Keypoint Detection for Cross-view Geo-localization. TIP2022)' )
7273
parser.add_argument('--PCB', action='store_true', help='use PCB+ResNet50' )
7374
# loss
7475
parser.add_argument('--warm_epoch', default=0, type=int, help='the first K epoch that needs warm up')
@@ -494,7 +495,7 @@ def draw_curve(current_epoch):
494495
elif opt.use_convnext:
495496
model = ft_net_convnext(len(class_names), opt.droprate, circle = return_feature, linear_num=opt.linear_num)
496497
else:
497-
model = ft_net(len(class_names), opt.droprate, opt.stride, circle = return_feature, ibn=opt.ibn, linear_num=opt.linear_num)
498+
model = ft_net(len(class_names), opt.droprate, opt.stride, circle = return_feature, ibn=opt.ibn, linear_num=opt.linear_num, usam=opt.usam)
498499

499500
if opt.PCB:
500501
model = PCB(len(class_names))

0 commit comments

Comments
 (0)