Skip to content

Commit

Permalink
Merge pull request #252 from onuralpszr/fix/collab
Browse files Browse the repository at this point in the history
fix(notebook): 🐞 small config and weight file name fix
  • Loading branch information
wondervictor authored Apr 19, 2024
2 parents 9b1a677 + a8bf61e commit da0fcb0
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,15 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "rlsGVhscqjY0",
"outputId": "382bd549-11ee-4e1b-ec00-5e1401911bf4"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Cloning into 'YOLO-World'...\n",
"remote: Enumerating objects: 297, done.\u001b[K\n",
"remote: Counting objects: 100% (94/94), done.\u001b[K\n",
"remote: Compressing objects: 100% (45/45), done.\u001b[K\n",
"remote: Total 297 (delta 74), reused 49 (delta 49), pack-reused 203\u001b[K\n",
"Receiving objects: 100% (297/297), 535.73 KiB | 2.16 MiB/s, done.\n",
"Resolving deltas: 100% (137/137), done.\n",
"Submodule 'third_party/mmyolo' (https://github.com/onuralpszr/mmyolo.git) registered for path 'third_party/mmyolo'\n",
"Cloning into '/content/YOLO-World/third_party/mmyolo'...\n",
"remote: Enumerating objects: 4944, done. \n",
"remote: Counting objects: 100% (1388/1388), done. \n",
"remote: Compressing objects: 100% (290/290), done. \n",
"remote: Total 4944 (delta 1180), reused 1102 (delta 1098), pack-reused 3556 \n",
"Receiving objects: 100% (4944/4944), 3.61 MiB | 2.54 MiB/s, done.\n",
"Resolving deltas: 100% (3195/3195), done.\n",
"Submodule path 'third_party/mmyolo': checked out '4d97b3a06609dba94b8ec584be2f2029cfdb7519'\n",
"/content/YOLO-World\n"
]
}
],
"outputs": [],
"source": [
"!git clone --recursive https://github.com/AILab-CVC/YOLO-World\n",
"%cd YOLO-World/"
Expand Down Expand Up @@ -256,10 +232,10 @@
"if __name__ == \"__main__\":\n",
" # load config\n",
" cfg = Config.fromfile(\n",
" \"configs/pretrain/yolo_world_l_t2i_bn_2e-4_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py\"\n",
" \"configs/pretrain/yolo_world_v2_l_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_1280ft_lvis_minival.py\"\n",
" )\n",
" cfg.work_dir = \".\"\n",
" cfg.load_from = \"pretrained_weights/yolow-v8_l_clipv2_frozen_t2iv2_bn_o365_goldg_pretrain.pth\"\n",
" cfg.load_from = \"pretrained_weights/yolo_world_v2_l_obj365v1_goldg_pretrain_1280ft-9babe3f6.pth\"\n",
" runner = Runner.from_cfg(cfg)\n",
" runner.call_hook(\"before_run\")\n",
" runner.load_or_resume()\n",
Expand Down Expand Up @@ -332,7 +308,7 @@
" runner,\n",
" input_image,\n",
" max_num_boxes=100,\n",
" score_thr=0.04,\n",
" score_thr=0.05,\n",
" nms_thr=0.5,\n",
" output_image=\"output.png\",\n",
"):\n",
Expand Down

0 comments on commit da0fcb0

Please sign in to comment.