Open abhigoku10 opened 3 years ago
Hello.
Sorry for the late response. Yes, you can alter the architecture for that goal.
One of the required changes is, besides a new .pkl of datasets with all the intended information (ours only has gender info), is a change in the _numatt variable (e.g., line 37 in train.py) to your number of attributes. This will alter the model (check line 91 in train.py), particularly in the classifier layer (models/base_block_meta.py, in the function starting in line 7).
Another thing that needs to be changed is the _attmodel variable (line 33 in train.py). It is currently "-1," but you need to adapt it since this variable affects, at least, the "batch_trainer" (in batch_engine.py, lines 29 and 39). Another change is the way accuracy is calculated. Currently, it is only considering one variable but with more attributes it will probably not work (tools/function.py, in line 93).
If you change all the variables mentioned in all the files where they are used, you should be on the right track to have the model for multi-label attribute recognition.
@Tiago-Roxo thanks for sharing the code base , can we modify the architecture to perform attribute recognition like age , clothings and accessories ie multi lablel attribute recoginition . Pls share your thoughts Thanks in advance