Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地部署教程 #66

Open
win4r opened this issue Nov 1, 2024 · 1 comment
Open

本地部署教程 #66

win4r opened this issue Nov 1, 2024 · 1 comment

Comments

@win4r
Copy link

win4r commented Nov 1, 2024

https://youtu.be/IJsDfoZg2QM

@abrichr
Copy link

abrichr commented Nov 1, 2024

请参考 #52 中的Dockerfile,该文件已实现。使用方法如下:

% sudo nvidia-docker build -t omniparser .
% sudo docker run -d -p 7861:7861 --gpus all --name omniparser-container omniparser
% python client.py "http://0.0.0.0:7861" ~/Desktop/screenshot.png
Loaded as API: http://44.198.58.162:7861/ ✔                                                                                                                                                                                                               
2024-10-29 18:55:51.336 | INFO     | __main__:predict:61 - Prediction completed successfully                                                                                                                                                              
2024-10-29 18:55:51.337 | INFO     | __main__:predict:70 - label_coordinates={'0': [0.12276943773031235, 0.002296212362125516, 0.045681655406951904, 0.028702640905976295],
...                 
2024-10-29 18:55:51.339 | INFO     | __main__:predict:71 - parsed_content_list=['Text Box ID 0: 5 v G', 'Text Box ID 1: Book1', 'Text Box ID 2: Home', 
...
2024-10-29 18:55:51.341 | INFO     | __main__:predict:77 - Parsed content saved to: result_data_20241029_185545.json         
2024-10-29 18:55:51.343 | INFO     | __main__:predict:83 - Output image saved to: output_image_20241029_185545.png  
% open output_image.png 
% head result_data_20241029_185545.json                                              
{                                                                                                                            
    "label_coordinates": {                                                                                                   
        "0": [                                                                                                               
            0.12276943773031235,                                                                                             
            0.002296212362125516,                                                                                            
            0.045681655406951904,                                                                                            
            0.028702640905976295                                                                                             
        ],                                                                                                                   
        "1": [                                                                                                               
            0.48429691791534424,                                                                                             
% tail result_data_20241029_185545.json                                              
        "Icon Box ID 72: Decrease",                                                                                          
        "Icon Box ID 73: Download",                                                                                          
        "Icon Box ID 74: a menu or list.",                                                                                   
        "Icon Box ID 75: navigating to the previous item or screen.",                                                        
        "Icon Box ID 76: the \"E\" function.",                                                                               
        "Icon Box ID 77: Justified",                                                                                         
        "Icon Box ID 78: Text formatting options.",                                                                          
        "Icon Box ID 79: a search function."                                                                                 
    ]                                                                                                                        
}%      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants