Download inference/core/models/utils/validate.py from ftopal/OMG: direct link, hf CLI and curl.
- Browser
- Download file 173 Bytes
-
https://huggingface.co/spaces/ftopal/OMG/resolve/main/inference/core/models/utils/validate.py
- Command line
-
hf download hf://spaces/ftopal/OMG/inference/core/models/utils/validate.py
-
curl -L -o validate.py https://huggingface.co/spaces/ftopal/OMG/resolve/main/inference/core/models/utils/validate.py
173 Bytes
| def get_num_classes_from_model_prediction_shape(len_prediction, masks=0, keypoints=0): | |
| num_classes = len_prediction - 5 - masks - (keypoints * 3) | |
| return num_classes | |