Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## 0.6.1

Released on August 1, 2025.

### Fixed
* PostArgMax post-processor to handle tuple inputs (resolves TypeError: argmax(): argument 'input' must be Tensor, not tuple)

### Changed
* Removed non-working paperswithcode badges from README for better readability


## 0.6.0

Released on May 24, 2025.
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ analyzer
1. biubug6
* code: [Pytorch_Retinaface](https://github.com/biubug6/Pytorch_Retinaface)
* paper: [Deng et al. - RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild](https://openaccess.thecvf.com/content_CVPR_2020/html/Deng_RetinaFace_Single-Shot_Multi-Level_Face_Localisation_in_the_Wild_CVPR_2020_paper.html)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/190500641/face-detection-on-wider-face-hard)](https://paperswithcode.com/sota/face-detection-on-wider-face-hard?p=190500641)



Expand All @@ -131,14 +130,10 @@ analyzer
1. Jung-Jun-Uk
* code: [UNPG](https://github.com/jung-jun-uk/unpg)
* paper: [Jung et al. - Unified Negative Pair Generation toward Well-discriminative Feature Space for Face Recognition](https://arxiv.org/abs/2203.11593)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/unified-negative-pair-generation-toward-well/face-verification-on-ijb-b)](https://paperswithcode.com/sota/face-verification-on-ijb-b?p=unified-negative-pair-generation-toward-well)(FAR=0.01)
* Note: ```include_tensors``` needs to be True in order to include the model prediction in Prediction.logits
2. mk-minchul
* code: [AdaFace](https://github.com/mk-minchul/adaface)
* paper: [Kim et al. - AdaFace: Quality Adaptive Margin for Face Recognition](https://arxiv.org/abs/2204.00964)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/adaface-quality-adaptive-margin-for-face/face-verification-on-ijb-b)](https://paperswithcode.com/sota/face-verification-on-ijb-b?p=adaface-quality-adaptive-margin-for-face) <
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/adaface-quality-adaptive-margin-for-face/face-verification-on-ijb-c)](https://paperswithcode.com/sota/face-verification-on-ijb-c?p=adaface-quality-adaptive-margin-for-face) <
* < badges represent models trained on smaller WebFace 4M dataset
* Note: ```include_tensors``` needs to be True in order to include the model prediction in Prediction.logits


Expand All @@ -152,9 +147,6 @@ analyzer
1. HSE-asavchenko
* code: [face-emotion-recognition](https://github.com/HSE-asavchenko/face-emotion-recognition)
* paper: [Savchenko - Facial expression and attributes recognition based on multi-task learning of lightweight neural networks](https://ieeexplore.ieee.org/abstract/document/9582508)
* B2 [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/classifying-emotions-and-engagement-in-online/facial-expression-recognition-on-affectnet)](https://paperswithcode.com/sota/facial-expression-recognition-on-affectnet?p=classifying-emotions-and-engagement-in-online)
* B0 [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/facial-expression-and-attributes-recognition/facial-expression-recognition-on-affectnet)](https://paperswithcode.com/sota/facial-expression-recognition-on-affectnet?p=facial-expression-and-attributes-recognition)
* B0 [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/facial-expression-and-attributes-recognition/facial-expression-recognition-on-acted-facial)](https://paperswithcode.com/sota/facial-expression-recognition-on-acted-facial?p=facial-expression-and-attributes-recognition)

#### Facial Action Unit Detection (au)

Expand All @@ -165,7 +157,6 @@ analyzer
1. CVI-SZU
* code: [ME-GraphAU](https://github.com/CVI-SZU/ME-GraphAU)
* paper: [Luo et al. - Learning Multi-dimensional Edge Feature-based AU Relation Graph for Facial Action Unit Recognition](https://arxiv.org/abs/2205.01782)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/learning-multi-dimensional-edge-feature-based/facial-action-unit-detection-on-bp4d)](https://paperswithcode.com/sota/facial-action-unit-detection-on-bp4d?p=learning-multi-dimensional-edge-feature-based)
* ! Does not work with CUDA > 12.0

#### Facial Valence Arousal (va)
Expand Down Expand Up @@ -198,9 +189,6 @@ for Identity-invariant Facial Expression Recognition](https://arxiv.org/abs/2209
1. choyingw
* code: [SynergyNet](https://github.com/choyingw/SynergyNet)
* challenge: [Wu et al. - Synergy between 3DMM and 3D Landmarks for Accurate 3D Facial Geometry](https://arxiv.org/abs/2110.09772)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/synergy-between-3dmm-and-3d-landmarks-for/face-alignment-on-aflw)](https://paperswithcode.com/sota/face-alignment-on-aflw?p=synergy-between-3dmm-and-3d-landmarks-for)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/synergy-between-3dmm-and-3d-landmarks-for/head-pose-estimation-on-aflw2000)](https://paperswithcode.com/sota/head-pose-estimation-on-aflw2000?p=synergy-between-3dmm-and-3d-landmarks-for)
* [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/synergy-between-3dmm-and-3d-landmarks-for/face-alignment-on-aflw2000-3d)](https://paperswithcode.com/sota/face-alignment-on-aflw2000-3d?p=synergy-between-3dmm-and-3d-landmarks-for)
* Note: ```include_tensors``` needs to be True in order to include the model prediction in Prediction.logits


Expand Down
7 changes: 5 additions & 2 deletions facetorch/analyzer/predictor/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,18 @@ def __init__(
self.dim = dim

@Timer("PostArgMax.run", "{name}: {milliseconds:.2f} ms", logger=logger.debug)
def run(self, preds: torch.Tensor) -> List[Prediction]:
def run(self, preds: Union[torch.Tensor, Tuple[torch.Tensor]]) -> List[Prediction]:
"""Post-processes the prediction tensor using argmax and returns a list of prediction data structures, one for each face.

Args:
preds (torch.Tensor): Batch prediction tensor.
preds (Union[torch.Tensor, Tuple[torch.Tensor]]): Batch prediction tensor.

Returns:
List[Prediction]: List of prediction data structures containing the predicted labels and confidence scores for each face in the batch.
"""
if isinstance(preds, tuple):
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a check for empty tuples to prevent potential IndexError when accessing preds[0]. An empty tuple would cause the next line to fail.

Suggested change
if isinstance(preds, tuple):
if isinstance(preds, tuple):
if len(preds) == 0:
# Handle empty tuple gracefully, e.g., return empty list
return []

Copilot uses AI. Check for mistakes.

preds = preds[0]

indices = torch.argmax(preds, dim=self.dim).cpu().numpy().tolist()
pred_list = self.create_pred_list(preds, indices)

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.6.1
Loading