deep-person-reid icon indicating copy to clipboard operation
deep-person-reid copied to clipboard

mAP using osnet_x1_0 and resnet50 is weird

Open a2082761 opened this issue 1 year ago • 2 comments

Hello, I just runned Get started code as below using pretrained model 'osnet_x1_0' and even 'resnet50' too. However, the result was weird. mAP was just 3.9%.... and when I used resnet50, it was 2.xx%. How can I increase mAP and can you check my source code which I just want to use pretrained model and I don't want to train dadaset. Thanks.

** Results ** mAP: 3.9% CMC curve Rank-1 : 13.2% Rank-5 : 25.9% Rank-10 : 33.3% Rank-20 : 40.3%

query: 3368

gallery 15913

`import torchreid import torch

datamanager = torchreid.data.ImageDataManager( root="reid-data", sources="market1501", targets="market1501", height=256, width=128, batch_size_train=32, batch_size_test=100, transforms=["random_flip", "random_crop"] )

model = torchreid.models.build_model( name="osnet_x1_0", num_classes=datamanager.num_train_pids, loss="softmax", pretrained=True )

model = model.cuda()

optimizer = torchreid.optim.build_optimizer( model, optim="adam", lr=0.0003 )

scheduler = torchreid.optim.build_lr_scheduler( optimizer, lr_scheduler="single_step", stepsize=20 )

engine = torchreid.engine.ImageSoftmaxEngine( datamanager, model, optimizer=optimizer, scheduler=scheduler, label_smooth=True )

engine.run( save_dir="log/osnet_x1_0", max_epoch=60, eval_freq=10, print_freq=10, test_only=True, visrank=True, visrank_topk=10 )

`

a2082761 avatar Feb 11 '24 08:02 a2082761

I got the same results as you, but i think you could try load other weights to get better mAP image

erictan23 avatar Apr 10 '24 02:04 erictan23

Hi, I got the same problem when validating my models, have you solved it?

QiqLiang avatar Aug 14 '24 08:08 QiqLiang