You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Development pipeline and Module APIs unified (#385)
1. Interface Unify
1.1 Abstract uniform training pipeline into modules:
*Augmentor* : used to augment the image training data. Basic class is `Model.BasicAugmentor`.
*PreProcessor* : used to generate target heatmap from the augmented image data and the key point annotations for model to regression. Basic class is `Model.BasicPreProcessor`.
*PostProcessor*: used to generated detected human body joints from the model predict heatmap. Basic class is `Model.BasicPostProcessor`.
*Visualizer*: used to visualize the model predict heatmap and the humans detected together with the origin images. Basic class is `Model.BasicVisualizer`.
The difference of the training procedure between different pose estimation methods are then divided into pre-processing handled by the PreProcessor, post-processing handled by the PostProcessor and visualizing handled by the Visualizer. Inherit the corresponding Basic class, implementing member functions according to the provided function protocals, and then use `Config` module to set these 3 custom modules to implement any pose estimation pipeline you want.
1.2 Abtract uniform model API protocal
uniform model APIs including `forwarding`, `cal_loss` and `infer` and provide a basic class `Model.BasicModel` for model customization. Inherite the model basic class to implement any pose estimation model you want.
2. Additional handy component
2.1 Metric Manager
Introducing `Model.MetricManager` that provides `update` and `report` function to statistic loss values during training and generate report massages for logging.
2.2 Image Processor
Introducing `Model.ImageProcessor` that provides useful interfaces to read images, pad and scale them for easily converting images into model input format.
2.3 Weight Examination
Introducing weight examination APIs in Model module for model, npz file and npz_dict file to easily exam the model weights.
3. Issue Fix
3.1 Python Demo
Providing `python_demo.py` as a python demo to replace the old problematic demo program `infer.py`. python_demo.py is used to easily try the npz model weights (both pretrained model weights or weights trained by users themselves) and also demonstraste the usage of PostProcessor, Visualizer and ImageProcessor modules.
3.2 Shape mismatch issues
Fix the shape mismatch issue that occurs when loading the pretrained model weights. (The issue was introduced by version compatibility)
3.3 Domain adapation
Fix the domain adaptation loss calculation and optimization issue occurs in tensorflow tape scope. warp all the domain adaptation data pipeline into the Domainadapt_dataset class. Domain adaptation can be put into pratical usage now.
3.4 Parallel training
Fit Kungfu new APIs for parallel and distributed training.
3.5 Other
other known issues in Processor modules such as tensorflow eager tensor and numpy ndarray compatibility issue, pyplot value clip issue.
4. Standarize
4.1 Logging info standardize
Use standard file stream and std-out stream in logging module to output log, split the logging information of hyperpose into [DATA],[MODEL],[TRAIN] 3 parts to regulate the logging information. Formate human body joints output string format
4.2 Channels format standardize.
Adapt all the pre-processing, post-processing, and visualizing functions to accept `channel_first` data in default to make the system clearer.
4.3 Model weights format standardize.
Adapat all the model weights loading and saving procedure default format from `npz` to `npz_dict` format to make model weight conversion and examination convenient. (`npz` format weights are ordered arrays while `npz_dict` format weights are dictionary, which is more convenient to locate and examine specific weight.)
4.4 Help information standardize.
Add help informations about variable definition, object definition, development platform basic usage, development platform custom usage, additional features when constructing models.
4.5 Tidy up all 10 model backbones provided.
4.6 Tidy up custom APIs in Config module.
0 commit comments