chufengt / ALM-pedestrian-attribute

Code for the paper "Improving Pedestrian Attribute Recognition With Weakly-Supervised Multi-Scale Attribute-Specific Localization", ICCV 2019, http://arxiv.org/abs/1910.04562.
Apache License 2.0
188 stars 66 forks source link

Training on custom data and attribute #33

Closed abhigoku10 closed 3 years ago

abhigoku10 commented 3 years ago

@chufengt

  1. If we want to train on custom data what keeping the same number of attributes as the RAP/PETA what is the process is there any changes required in the code base
  2. If i want to increase the attributes for the RAP dataset from 51 to 56 what all changes have to be made in the code base
  3. what tool do u use to annotate the attributes and convert to rap format any std procedure or custom procedure Thanks in advance
chufengt commented 3 years ago
  1. Custom data: You need to change the configs in datasets.py, e.g. attr_nums, description, and the corresponding dataset (just like what we did for RAP/PETA/PA100K). In addition, self.weights in main.py should also be modified according to statistics on your own dataset.
  2. No. of attributes: attr_nums in datasets.py.
  3. For RAP annotation format, please refer to the original paper (https://arxiv.org/pdf/1603.07054.pdf).
abhigoku10 commented 3 years ago

@chufengt thanks for the response

  1. how to obtain the values of self.weights for additional attribute or custom attributes you have cited paper 13
chufengt commented 3 years ago

For self.weights, just calculate the ratio of positive labels for each attribute.

abhigoku10 commented 3 years ago

@chufengt oh wokay shall do , below are additional queries 1.approximately how many number of images /data is required for training for per attribute to obtain good results

  1. can we train a model with color as an attribute ie (person color)
  2. if we want to have a fine grained model ie to differentiate between jeans i.e normal jean , stripped jeans or shirts ie full sleeve , short sleeve,tees like that will be architecture be able to handle the close distinguish btw attributes
chufengt commented 3 years ago
  1. It depends. Different attributes may vary in difficulties. For reference, you can calculate the number of images in RAP/PETA for each attribute.
  2. Sure you can have some color attributes. It seems some color attributes are included in RAP (not used for evaluation).
  3. Some fine-grained attributes are already included in RAP/PA-100K. It's more difficult to distinguish these fine-grained attributes.
Mohamed209 commented 2 years ago

@chufengt if finetune on custom data (small number), for example after loading pretrained checkpoint using --resume config , i think the code updates all netowrk layers , not freezing any layer do you recommend that or freeze some layers and if freeze layers what layers do you think should be important and contain general info and should not be updated

chufengt commented 2 years ago

@Mohamed209 Sorry I haven't tried but you can try them both.