We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix download_mmdet_configs
No need to download the zip file if it exists. This will solve the issue encountered in the Kaggle offline installation.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `icevision/models/mmdet/download_configs.py`
Content:
```
1 __all__ = ["download_mmdet_configs"]
2 
3 from icevision.imports import *
4 from icevision.utils import *
5 
6 VERSION = "v2.10.0"
7 BASE_URL = "https://codeload.github.com/airctic/mmdetection_configs/zip/refs/tags"
8 
9 
10 def download_mmdet_configs() -> Path:
11     save_dir = get_root_dir() / f"mmdetection_configs"
12     save_dir.mkdir(parents=True, exist_ok=True)
13 
14     download_path = save_dir / f"{VERSION}.zip"
15     if not download_path.exists():
16         logger.info("Downloading mmdet configs")
17 
18         download_and_extract(f"{BASE_URL}/{VERSION}", download_path)
19 
20     return save_dir / f"mmdetection_configs-{VERSION[1:]}/configs"
21
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/icevision/models/mmdet/download_configs.py b/icevision/models/mmdet/download_configs.py
--- a/icevision/models/mmdet/download_configs.py
+++ b/icevision/models/mmdet/download_configs.py
@@ -9,12 +9,26 @@
 
 def download_mmdet_configs() -> Path:
     save_dir = get_root_dir() / f"mmdetection_configs"
-    save_dir.mkdir(parents=True, exist_ok=True)
 
+    mmdet_config_path = save_dir / f"mmdetection_configs-{VERSION[1:]}/configs"
     download_path = save_dir / f"{VERSION}.zip"
-    if not download_path.exists():
-        logger.info("Downloading mmdet configs")
 
-        download_and_extract(f"{BASE_URL}/{VERSION}", download_path)
+    if mmdet_config_path.exists():
+        logger.info(
+            f"The mmdet config folder already exists. No need to downloaded it. Path : {mmdet_config_path}"
+        )
+    elif download_path.exists():
+        # The zip file was downloaded by not extracted yet
+        # Extract zip file
+        logger.info(f"Extracting the {VERSION}.zip file.")
+        save_dir = Path(download_path).parent
+        shutil.unpack_archive(filename=str(download_path), extract_dir=str(save_dir))
+    else:
+        save_dir.mkdir(parents=True, exist_ok=True)
 
-    return save_dir / f"mmdetection_configs-{VERSION[1:]}/configs"
+        download_path = save_dir / f"{VERSION}.zip"
+        if not download_path.exists():
+            logger.info("Downloading mmdet configs")
+            download_and_extract(f"{BASE_URL}/{VERSION}", download_path)
+
+    return mmdet_config_path

{"golden_diff": "diff --git a/icevision/models/mmdet/download_configs.py b/icevision/models/mmdet/download_configs.py\n--- a/icevision/models/mmdet/download_configs.py\n+++ b/icevision/models/mmdet/download_configs.py\n@@ -9,12 +9,26 @@\n \n def download_mmdet_configs() -> Path:\n     save_dir = get_root_dir() / f\"mmdetection_configs\"\n-    save_dir.mkdir(parents=True, exist_ok=True)\n \n+    mmdet_config_path = save_dir / f\"mmdetection_configs-{VERSION[1:]}/configs\"\n     download_path = save_dir / f\"{VERSION}.zip\"\n-    if not download_path.exists():\n-        logger.info(\"Downloading mmdet configs\")\n \n-        download_and_extract(f\"{BASE_URL}/{VERSION}\", download_path)\n+    if mmdet_config_path.exists():\n+        logger.info(\n+            f\"The mmdet config folder already exists. No need to downloaded it. Path : {mmdet_config_path}\"\n+        )\n+    elif download_path.exists():\n+        # The zip file was downloaded by not extracted yet\n+        # Extract zip file\n+        logger.info(f\"Extracting the {VERSION}.zip file.\")\n+        save_dir = Path(download_path).parent\n+        shutil.unpack_archive(filename=str(download_path), extract_dir=str(save_dir))\n+    else:\n+        save_dir.mkdir(parents=True, exist_ok=True)\n \n-    return save_dir / f\"mmdetection_configs-{VERSION[1:]}/configs\"\n+        download_path = save_dir / f\"{VERSION}.zip\"\n+        if not download_path.exists():\n+            logger.info(\"Downloading mmdet configs\")\n+            download_and_extract(f\"{BASE_URL}/{VERSION}\", download_path)\n+\n+    return mmdet_config_path\n", "issue": "Fix download_mmdet_configs\nNo need to download the zip file if it exists. This will solve the issue encountered in the Kaggle offline installation.\r\n\n", "before_files": [{"content": "__all__ = [\"download_mmdet_configs\"]\n\nfrom icevision.imports import *\nfrom icevision.utils import *\n\nVERSION = \"v2.10.0\"\nBASE_URL = \"https://codeload.github.com/airctic/mmdetection_configs/zip/refs/tags\"\n\n\ndef download_mmdet_configs() -> Path:\n    save_dir = get_root_dir() / f\"mmdetection_configs\"\n    save_dir.mkdir(parents=True, exist_ok=True)\n\n    download_path = save_dir / f\"{VERSION}.zip\"\n    if not download_path.exists():\n        logger.info(\"Downloading mmdet configs\")\n\n        download_and_extract(f\"{BASE_URL}/{VERSION}\", download_path)\n\n    return save_dir / f\"mmdetection_configs-{VERSION[1:]}/configs\"\n", "path": "icevision/models/mmdet/download_configs.py"}], "after_files": [{"content": "__all__ = [\"download_mmdet_configs\"]\n\nfrom icevision.imports import *\nfrom icevision.utils import *\n\nVERSION = \"v2.10.0\"\nBASE_URL = \"https://codeload.github.com/airctic/mmdetection_configs/zip/refs/tags\"\n\n\ndef download_mmdet_configs() -> Path:\n    save_dir = get_root_dir() / f\"mmdetection_configs\"\n\n    mmdet_config_path = save_dir / f\"mmdetection_configs-{VERSION[1:]}/configs\"\n    download_path = save_dir / f\"{VERSION}.zip\"\n\n    if mmdet_config_path.exists():\n        logger.info(\n            f\"The mmdet config folder already exists. No need to downloaded it. Path : {mmdet_config_path}\"\n        )\n    elif download_path.exists():\n        # The zip file was downloaded by not extracted yet\n        # Extract zip file\n        logger.info(f\"Extracting the {VERSION}.zip file.\")\n        save_dir = Path(download_path).parent\n        shutil.unpack_archive(filename=str(download_path), extract_dir=str(save_dir))\n    else:\n        save_dir.mkdir(parents=True, exist_ok=True)\n\n        download_path = save_dir / f\"{VERSION}.zip\"\n        if not download_path.exists():\n            logger.info(\"Downloading mmdet configs\")\n            download_and_extract(f\"{BASE_URL}/{VERSION}\", download_path)\n\n    return mmdet_config_path\n", "path": "icevision/models/mmdet/download_configs.py"}]}