Coder Social home page Coder Social logo

ytzhao / mmeval Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-mmlab/mmeval

0.0 0.0 0.0 1.42 MB

A unified evaluation library for multiple machine learning libraries

Home Page: https://mmeval.readthedocs.io/en/latest/

License: Apache License 2.0

Python 100.00%

mmeval's Introduction

 
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
CocoDetectionMetric
ProposalRecall
F1Metric
HmeanIoU
PCKAccuracy
MpiiPCKAccuracy
JhmdbPCKAccuracy
EndPointError
AVAMeanAP
SSIM
SNR
PSNR
MAE
MSE

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.

mmeval's People

Contributors

ice-tong avatar zhouzaida avatar bigwangyudong avatar yingfhu avatar gaotongxiao avatar ofhwei avatar leoxing1996 avatar liqikai9 avatar xuan07472 avatar z-fran avatar zachary-66 avatar go-with-me000 avatar vansin avatar dai-wenxun avatar fengsxy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.