Views
No views yet
Online Demo is available now in Homepage, Try as you like!!!
1git clone https://github.com/InternRobotics/VLAC.git
2cd VLAC
3pip install -e .| Range | Recommended | Notes | |
|---|---|---|---|
| python | >=3.9 | 3.10 | |
| cuda | cuda12 | No need to install if using CPU, NPU, MPS | |
| torch | >=2.0 | ||
| transformers | >=4.51 | 4.51.3 | |
| peft | >=0.15.2 | ||
| ms-swift | 3.3 |
1from evo_vlac import GAC_model
2from evo_vlac.utils.video_tool import compress_video
3import os
4#Consistent with the web interface, the value and citic rewards of video input can be evaluated.
5
6
7#assign local model path
8model_path="set to your local model path"
9#download model form https://huggingface.co/InternRobotics/VLAC-8b
10
11#assign video path and task description
12test_video='evo_vlac/examples/videos/pick-bowl-test.mp4'
13ref_video='evo_vlac/examples/videos/pick-bowl-ref.mov'
14task_description='Put up the bowl and place it back in the white storage box.'
15
16#init model
17Critic=GAC_model(tag='critic')
18Critic.init_model(model_path=model_path,model_type='internvl2',device_map=f'cuda:0')
19Critic.temperature=0.5
20Critic.top_k=1
21Critic.set_config()
22Critic.set_system_prompt()
23
24# transform video
25test_video_compressed = os.path.join(os.path.dirname(test_video),"test.mp4")
26_,output_fps=compress_video(test_video, test_video_compressed,fps=5)
27reference_video_compressed = None
28if ref_video:
29 reference_video_compressed = os.path.join(os.path.dirname(ref_video),"ref.mp4")
30 compress_video(ref_video, reference_video_compressed,fps=5)
31
32
33# generate Critic results
34result_path,value_list,critic_list,done_list = Critic.web_trajectory_critic(
35 task_description=task_description,
36 main_video_path=test_video_compressed,
37 reference_video_path=reference_video_compressed,#if None means no reference video, only use task_description to indicate the task
38 batch_num=10,#batch number
39 ref_num=6,#image number used in reference video
40 think=False,# whether to CoT
41 skip=5,#pair-wise step
42 rich=False,#whether to output decimal value
43 reverse_eval=False,#whether to reverse the evaluation(for VROC evaluation)
44 output_path="results",
45 fps=float(output_fps),
46 frame_skip=True,#whether to skip frames(if false, each frame while be evaluated, cost more time)
47 done_flag=False,#whether to out put done value
48 in_context_done=False,#whether use reference video to generate done value
49 done_threshold=0.9,#done threshold
50 video_output=True#whether to output video
51)
52
53
54print("=" * 100)
55print(">>>>>>>>>Critic results<<<<<<<<<<")
56print(" ")
57
58print(f"result path: {result_path}")
59print(f"task description: {task_description}")
60print("=" * 50)
61
62print("value_list:")
63print(value_list)
64print("=" * 50)
65
66print("critic_list:")
67print(critic_list)
68print("=" * 50)
69
70print("done_list:")
71print(done_list)
72print("=" * 100)1@inproceedings{zhanggeneralist,
2 title={A Generalist Pair-wise Progress Critic Model for Vision-Language-Action Robots},
3 author={Zhang, Qi and Zhai, Shaopeng and Zhang, Shengzhe and Liu, Litao and Zhang, Tianyi and Huang, Fuxian and Zhou, Ming},
4 booktitle={Forty-third International Conference on Machine Learning}
5}1@article{zhai2025vision,
2 title={A vision-language-action-critic model for robotic real-world reinforcement learning},
3 author={Zhai, Shaopeng and Zhang, Qi and Zhang, Tianyi and Huang, Fuxian and Zhang, Haoran and Zhou, Ming and Zhang, Shengzhe and Liu, Litao and Lin, Sixu and Pang, Jiangmiao},
4 journal={arXiv preprint arXiv:2509.15937},
5 year={2025}
6}