https://github.com/masadcv/propel
Official PyTorch implementation for "PROPEL: Probabilistic Parametric Regression Loss for Convolutional Neural Networks"
https://github.com/masadcv/propel
deep-learning loss-function machine-learning probabilistic pytorch-implementation regression
Last synced: 7 months ago
JSON representation
Official PyTorch implementation for "PROPEL: Probabilistic Parametric Regression Loss for Convolutional Neural Networks"
- Host: GitHub
- URL: https://github.com/masadcv/propel
- Owner: masadcv
- License: bsd-3-clause
- Created: 2021-02-24T01:32:38.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-15T03:11:26.000Z (almost 4 years ago)
- Last Synced: 2025-06-17T03:26:58.255Z (8 months ago)
- Topics: deep-learning, loss-function, machine-learning, probabilistic, pytorch-implementation, regression
- Language: Python
- Homepage: https://masadcv.github.io/PROPEL/index.html
- Size: 2.74 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PRObablistic Parametric rEgression Loss (PROPEL)
PRObabilistic Parametric rEgresison Loss (PROPEL) is a loss function that enables probabilisitic regression for a neural network. It achieves this by enabling a neural network to learn parameters of a mixture of Gaussian distribution.
Further details about the loss can be found in the paper: [PROPEL: Probabilistic Parametric Regression Loss for Convolutional Neural Networks](https://arxiv.org/pdf/1807.10937.pdf)
This repository provides official pytorch implementation of PROPEL.
# Installation Instructions
PROPEL can be installed using the following command
```bash
pip install torchpropel
```
```bash
pip install git+https://github.com/masadcv/PROPEL.git
```
# Usage Example
```python
import torch
import numpy as np
from torchpropel import PROPEL
# Our example has a neural network with
# output [num_batch, num_gaussians, num_dims]
num_batch = 4
num_gaussians = 6
num_dims = 3
# setting ground-truth variance sigma_gt=0.2
sigma_gt = 0.2
propel_loss = PROPEL(sigma_gt)
# ground truth targets for loss
y = torch.ones((num_batch, num_dims)) * 0.5
# example prediction - this can also be coming as output of a neural network
feat_g = np.random.randn(num_batch, num_gaussians, 2 * num_dims) * 0.5
feat_g[:, :, num_dims::] = 0.2
feat = torch.tensor(feat_g, dtype=y.dtype)
# compute the loss
L = propel_loss(feat, y)
print(L)
```
# Documentation
Further details of each function implemented for PROPEL can be accessed at the documentation hosted at: [https://masadcv.github.io/PROPEL/index.html](https://masadcv.github.io/PROPEL/index.html).
# Citing PROPEL
Pre-print of PROPEL can be found at: [PROPEL: Probabilistic Parametric Regression Loss for Convolutional Neural Networks](https://arxiv.org/pdf/1807.10937.pdf)
If you use PROPEL in your research, then please cite:
BibTeX:
```
@inproceedings{asad2020propel,
title={PROPEL: Probabilistic Parametric Regression Loss for Convolutional Neural Networks},
author={Asad, Muhammad and Basaru, Rilwan and Arif, SM and Slabaugh, Greg},
booktitle={25th International Conference on Pattern Recognition},
pages={},
year={2020}}
```