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

mAP using osnet_x1_0 and resnet50 is weird #576

Open
a2082761 opened this issue Feb 11, 2024 · 1 comment
Open

mAP using osnet_x1_0 and resnet50 is weird #576

a2082761 opened this issue Feb 11, 2024 · 1 comment

Comments

@a2082761
Copy link

a2082761 commented Feb 11, 2024

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
)

`

@erictan23
Copy link

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

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

No branches or pull requests

2 participants