Skip to content

2829788992/CV

Repository files navigation

源码地址

https://github.com/AILab-CVC/YOLO-World

开始

1. 克隆项目

git clone --recursive https://github.com/2829788992/CV.git

2. 用anaconda建一个虚拟环境

conda create --n yolow python=3.8 -y
conda activate yolow

3. 安装pytorch

conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3

4. 安装mmengine等OpenMMLab中的库,为了方便安装,可以从pip转为mim进行安装

pip install -U openmim
mim install mmcv==2.0.1
mim install mmdet==3.3.0
mim install mmengine==0.10.3
mim install mmyolo==0.6.0

5. 在项目目录/third_party下,mmyolo是空的,进去clone mmyolo并且安装

git clone https://github.com/open-mmlab/mmyolo.git
pip install -r requirements/albu.txt
mim install -v -e .

6. 回到项目目录,安装supervision和transformers

pip install supervision
pip install transformers

7. 电脑打开科学上网,打开电脑设置>网络和Internet>代理>手动设置代理>编辑代理服务器

在image_demo.py中设置端口

os.environ["HTTP_PROXY"] = "http:https://127.0.0.1:7897"
os.environ["HTTPS_PROXY"] = "http:https://127.0.0.1:7897"

其中 http:https://proxy_ip_address:port 中的 proxy_ip_address 和 port为开启科学上网后的地址和端口

Demo

See demo for more details

  • gradio_demo.py: Gradio demo, ONNX export
  • image_demo.py: inference with images or a directory of images
  • simple_demo.py: a simple demo of YOLO-World, using array (instead of path as input).
  • video_demo.py: inference YOLO-World on videos.
  • inference.ipynb: jupyter notebook for YOLO-World.

运行image_demo

python image_demo.py ./configs/pretrain/yolo_world_v2_s_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py ./weights/yolo_world_v2_s_obj365v1_goldg_pretrain-55b943ea.pth ./data\coco\val2017 'person,dog,cat' --topk 10 --threshold 0.01 --output-dir demo_outputs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages