MogaNet: Efficient Convolutional Neural Networks
repository·main·Indexed 42 days ago
https://github.com/westlake-ai/moganetA family of efficient Convolutional Neural Networks (ConvNets) based on multi-order gated aggregation. Designed for high performance across vision tasks, MogaNet is compatible with MMDetection (v2.19.0+), MMSegmentation, and MMPose. The project includes support for object detection, instance segmentation, and human pose estimation, featuring tools for FLOPs calculation and integration with post-processing methods like DeciWatch and SmoothNet.
What's inside MogaNet
- MMHuman3D is an open-source PyTorch-based codebase (requiring PyTorch 1.7+) designed for using 3D human parametric models in computer vision and computer graphics. As part of the OpenMMLab project, it provides a modular framework to reproduce state-of-the-art (SOTA) methods, supports various datasets through a unified HumanData convention, and includes a visualization toolbox for rendering human parametric models (including part segmentation, depth maps, and point clouds) and 2D/3D keypoints.
Overview of MogaNet
mainMogaNet (Multi-order Gated Aggregation Network) is a family of efficient ConvNets designed using multi-order game-theoretic interaction. It is optimized for informative context mining with a focus on the complexity-performance trade-off.
Key features include:
- High scalability.
- Competitive performance on ImageNet and various vision benchmarks.
- Efficient parameter usage.
- Support for multiple downstream tasks including object detection, semantic segmentation, human pose estimation (2D & 3D), and video prediction.
The repository provides PyTorch implementations and is integrated with tools like
timmandOpenMixup.Access pre-trained models and configurations in the Model Zoo
mainThe Moganet Model Zoo provides configuration files, log files, and pre-trained models for all supported algorithms. Pre-trained models are evaluated across three primary benchmarks:
3DPWHuman3.6MMPI-INF-3DHP
Perform Image-based Human Body 2D Pose Estimation
mainMogaNet supports multi-person human pose estimation, which involves detecting the poses (keypoints) of all people within an input image. The task can be approached using two methodologies:
- Top-down approaches: These divide the task into two stages: first performing human detection, and then performing single-person pose estimation within the detected human bounding boxes.
- Bottom-up approaches: These first detect all keypoints in the image and then group or associate those keypoints into individual person instances.
Explore the mmhuman3d API structure
mainThe
mmhuman3dlibrary is organized into several core modules that handle different aspects of 3D human pose estimation and modeling. Developers can interact with the following primary namespaces:mmhuman3d.apis: High-level APIs for common tasks.mmhuman3d.core: Foundational components includingcameras,conventions,evaluation,filter,optimizer,parametric_model, andvisualization.mmhuman3d.models: Model definitions, includingarchitectures,backbones,discriminators,necks,heads, andlosses.mmhuman3d.data: Data management components includingdatasets,data_converters, anddata_structures.mmhuman3d.utils: General utility functions.
Supported Video Prediction Methods and MetaFormers
mainThe project supports a variety of video prediction methods and MetaFormer architectures used within the SimVP framework.
Supported Video Prediction Methods:
- ConvLSTM
- PredRNN, PredRNN++, PredRNN.V2
- E3D-LSTM
- MAU
- CrevNet
- PhyDNet
- SimVP, SimVP.V2
Supported MetaFormers (for SimVP): These architectures can replace the hidden Translator in SimVP to achieve token mixing and channel mixing. Supported models include ViT, Swin-Transformer, MLP-Mixer, ConvMixer, UniFormer, PoolFormer, ConvNeXt, VAN, IncepU (SimVP.V1), gSTA (SimVP.V2), HorNet, and MogaNet.
Access pretrained models and configurations for human pose estimation baselines
mainThe Moganet repository provides a Model Zoo containing configuration files, log files, and pretrained models for several supported human pose estimation methods. All pretrained models are evaluated on the following three benchmarks:
- 3DPW
- Human3.6M
- MPI-INF-3DHP
For specific implementation details and configurations of individual baseline methods, refer to the external documentation links provided below.
Overview of the Moganet data pipeline
mainMoganet uses aHumanDatastructure for storing and loading datasets. Raw data is converted into preprocessed.npzfiles using specific data converters. The pipeline supports a wide range of datasets through various converter classes.Overview of Dataset Preprocessing
mainMoganet uses theHumanDatastructure for storing and loading data. Raw data from various sources can be converted into processed.npzfiles using the provided conversion scripts. This allows the project to work with a unified data format regardless of the original dataset's structure.What is HumanData?
mainA
HumanDataobject is a subclass of the Python built-indictdesigned to hold single-view, image-based data for a human being. It stores values asnumpy.ndarrayor Python built-in types. While it does not natively holdtorch.Tensordata, it provides a.to()method for easy conversion to CPU or GPU tensors.Key characteristics:
- Base Structure: Follows a well-defined schema for universal human data.
- Customization: Supports custom features via a
miscdictionary or by disabling key strictness. - Tensor Conversion: Can be converted to a dictionary of tensors using
.to().
# Convert all ndarray values to CPU tensors dict_of_tensor = human_data.to() # Convert all ndarray values to a specific GPU device import torch gpu0_device = torch.device('cuda:0') dict_of_gpu_tensor = human_data.to(gpu0_device)Understand top-down heatmap-based pose estimation
mainTop-down pose estimation methods approach the task in two distinct stages:
- Human Detection: The system first identifies humans within an image and generates bounding boxes for each person.
- Pose Estimation: Using the detected bounding boxes, the system performs single-person pose estimation for each individual.
Unlike coordinate-based methods that predict $(x, y)$ values directly, this approach produces heatmaps. These heatmaps represent the spatial likelihood of a keypoint existing at any given pixel location. Common neural network architectures used for this task include stacked hourglass networks and HRNet.
Configure multi-person SMPL data shapes
mainFor multi-person visualization, add an extra dimension for
num_personto your input tensors/arrays:verts:(num_frame, num_person, 6890, 3)poses:(num_frame, num_person, 72)betas:(num_frame, num_person, 10)vibe pred_cam:(num_frame, num_person, 3)
Note that camera parameters
K,R, andTare applied per frame and do not require thenum_persondimension.