Automatically generating deployable models from language instructions for computer vision tasks
AutoMMLab is the first request-to-model AutoML platform for computer vision tasks, which involves understanding the user’s natural language request and execute the entire workflow to output production-ready models. The whole pipeline of AutoMMLab consists of five main stages,including request understanding, data selection, model selection, model training with hyperparameter optimization (HPO), and model deployment. Based on AutoMMLab, we build a benchmark termed LAMP for evaluating end-to-end prompt-based model production, and also studying each component in the whole production pipeline.
Jan. 29, 2024: AutoMMLab is now open source.
# download the code
git clone git@github.com:yang-ze-kang/AutoMMLab.git
# create python environment
cd AutoMMLab
conda create -n autommlab python=3.9
source activate autommlab
pip install -r requirements.txtDownload datsets of dataset zoo
| Task | Dataset | URL |
|---|---|---|
| Cls. | ImageNet | https://www.image-net.org/challenges/LSVRC/index.php |
| Det. | COCO | https://cocodataset.org/#download |
| Seg. | Cityscapes | https://www.cityscapes-dataset.com//a> |
| Kpt. |
COCO | https://cocodataset.org/#download |
| AP-10k | https://github.com/AlexTheBad/AP-10K?tab=readme-ov-file#download |
And change the path of datasets in configuration file (automlab/configs.py) with your path.
DATASET_ZOO = {
'ImageNet':'sh1984:s3://openmmlab/datasets/classification/imagenet',
'COCO':'sh1984:s3://openmmlab/datasets/detection/coco',
'object365': 'sh1984:s3://openmmlab/datasets/detection/Objects365',
'openimage': 'sh1984:s3://openmmlab/datasets/detection/coco',
'cityscapes':'s3://openmmlab/datasets/segmentation/cityscapes',
'ap10k':'sh1986:s3://ap10k/ap-10k/'
}-
Download the base model and LoRA weights: Base Model: https://huggingface.co/meta-llama/Llama-2-7b-hf/tree/main LoRA Weights: https://drive.google.com/file/d/136jt458c6rMOHwDwwVS6U4iVrX9cmo1p/view?usp=drive_link
-
Change the configuration file (autommlab/configs.py) with your path.
PATH_LLAMA2 = 'llama_weights/llama-2-7b-hf' PATH_LORAS = { 'ru-llama2':'weights/llama2_lora_weights/save_dir_reqparse_v2', 'hpo-llama2-classification':'weights/llama2_lora_weights/hpo_classification', 'hpo-llama2-detection':'weights/llama2_lora_weights/hpo_detection', 'hpo-llama2-segmentation':'weights/llama2_lora_weights/hpo_segmentation', 'hpo-llama2-pose':'weights/llama2_lora_weights/hpo_pose' }
Please edit file 'autommlab/configs.py' to modify the configuration of the demo.
URL_LLAMA = "http://127.0.0.1:10068/llama2"
TRAIN_GPU_NUM = 1
RU_MODEL = 'ru-llama2'
HPO_MODEL = 'hpo-llama2'
HPO_MAX_TRY = 3
TENSORBOARD_PORT = 10066
IP_ADDRESS = 'localhost'export PYTHONPATH=$PYTHONPATH:$(pwd)
# step 1
# If you use RU-LLaMA and HPO-LLaMA, please deploy them first.
CUDA_VISIBLE_DEVICES=0 python autommlab/models/deploy_llama.py
# step 2
CUDA_VISIBLE_DEVICES=1 python autommlab/main.py demo.mp4
- MMEngine: OpenMMLab foundational library for training deep learning models.
- MMCV: OpenMMLab foundational library for computer vision.
- MMPreTrain: OpenMMLab pre-training toolbox and benchmark.
- MMDetection: OpenMMLab detection toolbox and benchmark.
- MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
- MMPose: OpenMMLab pose estimation toolbox and benchmark.
- MMDeploy: OpenMMLab model deployment framework.
Codes and data are freely available for free non-commercial use, and may be redistributed under these conditions. For commercial queries, please contact Mr. Sheng Jin (jinsheng13@foxmail.com). We will send the detail agreement to you.
To cite AutoMMLab in publications, please use the following BibTeX entrie.
@inproceedings{yang2025autommlab,
title={Autommlab: Automatically generating deployable models from language instructions for computer vision tasks},
author={Yang, Zekang and Zeng, Wang and Jin, Sheng and Qian, Chen and Luo, Ping and Liu, Wentao},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={39},
number={21},
pages={22056--22064},
year={2025}
}
