chaitanya100100 / TailorNet

Code for our CVPR 2020 (ORAL) paper - TailorNet: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style.
https://virtualhumans.mpi-inf.mpg.de/tailornet/
Other
408 stars 67 forks source link

Minimizing model sizes #35

Closed defunct-ff closed 3 years ago

defunct-ff commented 3 years ago

Screenshot from 2021-05-05 18-43-10 DISCLAIMER: I am deploying Tailornet for academic dissertation

1) I have applied a simple dynamic quantization which reduced the model sizes to 1/4. How do I evaluate the accuracy vs original model weights?

2) Applying any sort of PyTorch pruning even with very very small amount results in all weights to be removed. Any idea why this happens?

chaitanya100100 commented 3 years ago
  1. Use the evaluate function (link given below). It's fairly easy to understand and modify. You will need to set garment class, gender and your model as runner. It will evaluate on the test set of the data. https://github.com/chaitanya100100/TailorNet/blob/0adae42b0b28b5bfacd9951ac542281fad96b110/utils/eval.py#L21
  2. You need to provide some more details in order for us to comment anything. Which model are you talking about - lf, hf, ss2d? Which garment? Which gender? What procedure did you use to prune? How much pruning happened?
chaitanya100100 commented 3 years ago

... and what were the evaluation results after pruning (if results drop drastically with little pruning, then all weights are important. Else the learned weights are sparse)?

defunct-ff commented 3 years ago

It looks like dynamic_quantization does not affect the accuracy (in a way that I can see) - 8.153631990087488 error for pants, male. Inference time gets a bit shorter - 1.1 to 0.8.

However loading time goes up by double for my machine - 11s to 24s.

chaitanya100100 commented 3 years ago

How can loading time goes up when the model is smaller now? And did you try with stronger quantization?