• Stars
    star
    243
  • Rank 160,773 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A unified evaluation library for multiple machine learning libraries
 
OpenMMLab website HOT      OpenMMLab platform TRY IT OUT
 

PyPI - Python Version PyPI license open issues issue resolution

🤔Reporting Issues

English | 简体中文

Introduction

MMEval is a machine learning evaluation library that supports efficient and accurate distributed evaluation on a variety of machine learning frameworks.

Major features:

  • Comprehensive metrics for various computer vision tasks (NLP will be covered soon!)
  • Efficient and accurate distributed evaluation, backed by multiple distributed communication backends
  • Support multiple machine learning frameworks via dynamic input dispatching mechanism
Supported distributed communication backends
MPI4Py torch.distributed Horovod paddle.distributed oneflow.comm
MPI4PyDist TorchCPUDist
TorchCUDADist
TFHorovodDist PaddleDist OneFlowDist
Supported metrics and ML frameworks

NOTE: MMEval tested with PyTorch 1.6+, TensorFlow 2.4+, Paddle 2.2+ and OneFlow 0.8+.

Metric numpy.ndarray torch.Tensor tensorflow.Tensor paddle.Tensor oneflow.Tensor
Accuracy
SingleLabelMetric
MultiLabelMetric
AveragePrecision
MeanIoU
VOCMeanAP
OIDMeanAP
COCODetection
ProposalRecall
F1Score
HmeanIoU
PCKAccuracy
MpiiPCKAccuracy
JhmdbPCKAccuracy
EndPointError
AVAMeanAP
StructuralSimilarity
SignalNoiseRatio
PeakSignalNoiseRatio
MeanAbsoluteError
MeanSquaredError

Installation

MMEval requires Python 3.6+ and can be installed via pip.

pip install mmeval

To install the dependencies required for all the metrics provided in MMEval, you can install them with the following command.

pip install 'mmeval[all]'

Get Started

There are two ways to use MMEval's metrics, using Accuracy as an example:

from mmeval import Accuracy
import numpy as np

accuracy = Accuracy()

The first way is to directly call the instantiated Accuracy object to calculate the metric.

labels = np.asarray([0, 1, 2, 3])
preds = np.asarray([0, 2, 1, 3])
accuracy(preds, labels)
# {'top1': 0.5}

The second way is to calculate the metric after accumulating data from multiple batches.

for i in range(10):
    labels = np.random.randint(0, 4, size=(100, ))
    predicts = np.random.randint(0, 4, size=(100, ))
    accuracy.add(predicts, labels)

accuracy.compute()
# {'top1': ...}

Learn More

Tutorials
Examples
Design

In the works

  • Continue to add more metrics and expand more tasks (e.g. NLP, audio).
  • Support more ML frameworks and explore multiple ML framework support paradigms.

Contributing

We appreciate all contributions to improve MMEval. Please refer to CONTRIBUTING.md for the contributing guideline.

License

This project is released under the Apache 2.0 license.

Projects in OpenMMLab

  • MMEngine: OpenMMLab foundational library for training deep learning models.
  • MIM: MIM installs OpenMMLab packages.
  • MMCV: OpenMMLab foundational library for computer vision.
  • MMClassification: OpenMMLab image classification toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab's next-generation platform for general 3D object detection.
  • MMRotate: OpenMMLab rotated object detection toolbox and benchmark.
  • MMYOLO: OpenMMLab YOLO series toolbox and benchmark.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMOCR: OpenMMLab text detection, recognition, and understanding toolbox.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMHuman3D: OpenMMLab 3D human parametric model toolbox and benchmark.
  • MMSelfSup: OpenMMLab self-supervised learning toolbox and benchmark.
  • MMRazor: OpenMMLab model compression toolbox and benchmark.
  • MMFewShot: OpenMMLab fewshot learning toolbox and benchmark.
  • MMAction2: OpenMMLab's next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMFlow: OpenMMLab optical flow toolbox and benchmark.
  • MMEditing: OpenMMLab image and video editing toolbox.
  • MMGeneration: OpenMMLab image and video generative models toolbox.
  • MMDeploy: OpenMMLab model deployment framework.

More Repositories

1

mmdetection

OpenMMLab Detection Toolbox and Benchmark
Python
27,899
star
2

mmsegmentation

OpenMMLab Semantic Segmentation Toolbox and Benchmark.
Python
7,372
star
3

mmagic

OpenMMLab Multimodal Advanced, Generative, and Intelligent Creation Toolbox. Unlock the magic 🪄: Generative-AI (AIGC), easy-to-use APIs, awsome model zoo, diffusion models, for text-to-image generation, image/video restoration/enhancement, etc.
Jupyter Notebook
6,575
star
4

mmcv

OpenMMLab Computer Vision Foundation
Python
5,626
star
5

mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
Python
4,969
star
6

mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
Python
4,781
star
7

OpenPCDet

OpenPCDet Toolbox for LiDAR-based 3D Object Detection.
Python
4,342
star
8

mmocr

OpenMMLab Text Detection, Recognition and Understanding Toolbox
Python
4,099
star
9

Amphion

Amphion (/æmˈfaɪən/) is a toolkit for Audio, Music, and Speech Generation. Its purpose is to support reproducible research and help junior researchers and engineers get started in the field of audio, music, and speech generation research and development.
Python
3,947
star
10

mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
Python
3,903
star
11

mmtracking

OpenMMLab Video Perception Toolbox. It supports Video Object Detection (VID), Multiple Object Tracking (MOT), Single Object Tracking (SOT), Video Instance Segmentation (VIS) with a unified framework.
Python
3,384
star
12

mmpretrain

OpenMMLab Pre-training Toolbox and Benchmark
Python
3,138
star
13

mmselfsup

OpenMMLab Self-Supervised Learning Toolbox and Benchmark
Python
3,084
star
14

mmskeleton

A OpenMMLAB toolbox for human pose estimation, skeleton-based action recognition, and action synthesis.
Python
2,855
star
15

mmyolo

OpenMMLab YOLO series toolbox and benchmark. Implemented RTMDet, RTMDet-Rotated,YOLOv5, YOLOv6, YOLOv7, YOLOv8,YOLOX, PPYOLOE, etc.
Python
2,719
star
16

mmdeploy

OpenMMLab Model Deployment Framework
Python
2,520
star
17

mmaction

An open-source toolbox for action understanding based on PyTorch
Python
1,847
star
18

mmgeneration

MMGeneration is a powerful toolkit for generative models, based on PyTorch and MMCV.
Python
1,796
star
19

mmrotate

OpenMMLab Rotated Object Detection Toolbox and Benchmark
Python
1,724
star
20

Multimodal-GPT

Multimodal-GPT
Python
1,397
star
21

mmrazor

OpenMMLab Model Compression Toolbox and Benchmark.
Python
1,366
star
22

mmfashion

Open-source toolbox for visual fashion analysis based on PyTorch
Python
1,204
star
23

mmhuman3d

OpenMMLab 3D Human Parametric Model Toolbox and Benchmark
Python
1,129
star
24

mmengine

OpenMMLab Foundational Library for Training Deep Learning Models
Python
1,029
star
25

playground

A central hub for gathering and showcasing amazing projects that extend OpenMMLab with SAM and other exciting features.
Python
1,017
star
26

OpenMMLabCourse

OpenMMLab course index and stuff
Jupyter Notebook
919
star
27

mmflow

OpenMMLab optical flow toolbox and benchmark
Python
889
star
28

PIA

[CVPR 2024] PIA, your Personalized Image Animator. Animate your images by text prompt, combing with Dreambooth, achieving stunning videos. PIA,你的个性化图像动画生成器,利用文本提示将图像变为奇妙的动画
Python
716
star
29

mmfewshot

OpenMMLab FewShot Learning Toolbox and Benchmark
Python
662
star
30

awesome-vit

396
star
31

OpenUnReID

PyTorch open-source toolbox for unsupervised or domain adaptive object re-ID.
Python
389
star
32

labelbee-client

Out-of-the-box Annotation Toolbox
JavaScript
374
star
33

mim

MIM Installs OpenMMLab Packages
Python
329
star
34

denseflow

Extracting optical flow and frames
C++
286
star
35

MMGEN-FaceStylor

Python
245
star
36

labelbee

LabelBee is an annotation Library
TypeScript
223
star
37

OpenMMLabCamp

Jupyter Notebook
92
star
38

polynet

The Github Repo for PolyNet
77
star
39

CLUE

C++ Lightweight Utility Extensions
C++
70
star
40

mim-example

Python
57
star
41

mmengine-template

Python
47
star
42

ecosystem

36
star
43

mmstyles

Latex style file to facilitate writing of technical papers
TeX
36
star
44

mmpose-webcam-demo

Python
23
star
45

pre-commit-hooks

Python
17
star
46

mdformat-openmmlab

Python
8
star
47

.github

3
star