"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

March 27, 2019

Day #227 - Learning Re-Id

1. Installed the Pytorch framework for deep-learning person re-identification - Link
2. Followed the steps commenting out the GPU code and ran it on CPU
3. Code to Check Available Models
from torchreid import models
print(models.show_avai_models())


4. Running it on Other Datasets
import torchreid
datamanager = torchreid.data.ImageDataManager(
root='reid-data',
sources='market1501',
height=256,
width=128,
batch_size=32,
market1501_500k=False)
model = torchreid.models.build_model(
name = 'resnet50',
num_classes = datamanager.num_train_pids,
loss='softmax',
pretrained=True)
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/resnet50',
max_epoch=60,
eval_freq=10,
print_freq=10,
test_only=False)

5. Next Step - On Custom Dataset Setting up, Testing Models




















Happy Mastering DL!!!

No comments: