cxh0519 / VTB

Official implementation of "A Simple Visual-Textual Baseline for Pedestrian Attribute Recognition" [TCSVT 2022]
MIT License
25 stars 0 forks source link

Inference code #5

Closed AbdullahNasser98 closed 1 year ago

AbdullahNasser98 commented 1 year ago

Just wondering if there is any code published for inference yet.

cxh0519 commented 1 year ago

The test results are reported during the training stage. More specifically, the 'args.valid_split' in train.py is defined as 'test' in config.py. Therefore, the 'valid_results' in train.py are actually the test results.

AbdullahNasser98 commented 1 year ago

I know. But if I want to use the model in production without having to train the model over and over again what should I do?

cxh0519 commented 1 year ago

We have not provided the inference code due to the train.py is easy to be modified. Once you have a trained model in ckpt format, you can test its performance by simply loading it and running the valid codes only.

AbdullahNasser98 commented 1 year ago

Yes that is ture. But when ever I try to use the trained model for validation i get this error KeyError: 'vis_embed'

AbdullahNasser98 commented 1 year ago

Some layers that are trained are not saved when you call the torch.save function Do you have any insight as to why?

AbdullahNasser98 commented 1 year ago

I solved the issue. But I have a request, could you please give me access to the paper?

cxh0519 commented 1 year ago

Please leave your email address and I will send the paper to you.

AbdullahNasser98 commented 1 year ago

abdullah.nasser2597@gmail.com

And thanks a lot.