-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* seperate mmdet and yolov5 utils * fix test imports * fix notebook imports
- Loading branch information
Showing
7 changed files
with
57 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import urllib.request | ||
from os import path | ||
from pathlib import Path | ||
from typing import Optional | ||
|
||
|
||
class Yolov5TestConstants: | ||
YOLOV5S6_MODEL_URL = "https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s6.pt" | ||
YOLOV5S6_MODEL_PATH = "tests/data/models/yolov5/yolov5s6.pt" | ||
|
||
YOLOV5M6_MODEL_URL = "https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5m6.pt" | ||
YOLOV5M6_MODEL_PATH = "tests/data/models/yolov5/yolov5m6.pt" | ||
|
||
|
||
def download_yolov5s6_model(destination_path: Optional[str] = None): | ||
|
||
if destination_path is None: | ||
destination_path = Yolov5TestConstants.YOLOV5S6_MODEL_PATH | ||
|
||
Path(destination_path).parent.mkdir(parents=True, exist_ok=True) | ||
|
||
if not path.exists(destination_path): | ||
urllib.request.urlretrieve( | ||
Yolov5TestConstants.YOLOV5S6_MODEL_URL, | ||
destination_path, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters