Update assets location (#637)
This commit is contained in:
Родитель
17541b186e
Коммит
3dc96e00f6
|
@ -506,7 +506,7 @@
|
|||
"import json\n",
|
||||
"\n",
|
||||
"# Extract test images paths\n",
|
||||
"im_url_root = \"https://cvbp.blob.core.windows.net/public/images/\"\n",
|
||||
"im_url_root = \"https://cvbp-secondary.z19.web.core.windows.net/images/\"\n",
|
||||
"im_filenames = [\"cvbp_milk_bottle.jpg\", \"cvbp_water_bottle.jpg\"]\n",
|
||||
"\n",
|
||||
"for im_filename in im_filenames:\n",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<title>Microsoft CVBP - HTML Demo</title>
|
||||
<link rel = "icon" href ="https://cvbp.blob.core.windows.net/public/html_demo/img/logo_small.png" type = "image/x-icon">
|
||||
<link rel = "icon" href ="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/logo_small.png" type = "image/x-icon">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
||||
crossorigin="anonymous">
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
|
@ -202,34 +202,34 @@
|
|||
<div class="card-body">
|
||||
<div class="row text-center">
|
||||
<div class="col-xs">
|
||||
<img id="sample1" data-eid="1" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/can_1.jpg">
|
||||
<img id="sample1" data-eid="1" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/can_1.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample2" data-eid="2" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/can_15.jpg">
|
||||
<img id="sample2" data-eid="2" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/can_15.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample3" data-eid="3" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/can_28.jpg">
|
||||
<img id="sample3" data-eid="3" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/can_28.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample4" data-eid="4" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/carton_33.jpg">
|
||||
<img id="sample4" data-eid="4" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/carton_33.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample5" data-eid="5" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/carton_40.jpg">
|
||||
<img id="sample5" data-eid="5" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/carton_40.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample6" data-eid="6" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/carton_50.jpg">
|
||||
<img id="sample6" data-eid="6" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/carton_50.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample7" data-eid="7" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/milk_bottle_66.jpg">
|
||||
<img id="sample7" data-eid="7" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/milk_bottle_66.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample8" data-eid="8" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/milk_bottle_77.jpg">
|
||||
<img id="sample8" data-eid="8" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/milk_bottle_77.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample9" data-eid="9" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/water_bottle_111.jpg">
|
||||
<img id="sample9" data-eid="9" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/water_bottle_111.jpg">
|
||||
</div>
|
||||
<div class="col-xs">
|
||||
<img id="sample10" data-eid="10" class="rounded m-2 sImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/water_bottle_115.jpg">
|
||||
<img id="sample10" data-eid="10" class="rounded m-2 sImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/water_bottle_115.jpg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -301,14 +301,14 @@
|
|||
<div class="tab-pane fade card-body mt-3" id="seeexample" role="tabpanel" aria-labelledby="seeexample-tab">
|
||||
<!-- img thumbnails and checkbox -->
|
||||
<div id="exampleImages" class="container mx-auto" >
|
||||
<img id="example0" data-eid="0" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/can_8.jpg">
|
||||
<img id="example1" data-eid="1" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/can_31.jpg">
|
||||
<img id="example2" data-eid="2" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/carton_47.jpg">
|
||||
<img id="example3" data-eid="3" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/carton_59.jpg">
|
||||
<img id="example4" data-eid="4" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/milk_bottle_76.jpg">
|
||||
<img id="example5" data-eid="5" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/milk_bottle_97.jpg">
|
||||
<img id="example6" data-eid="6" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/water_bottle_105.jpg">
|
||||
<img id="example7" data-eid="7" class="rounded mr-2 mb-2 eImg" src="https://cvbp.blob.core.windows.net/public/html_demo/img/water_bottle_123.jpg">
|
||||
<img id="example0" data-eid="0" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/can_8.jpg">
|
||||
<img id="example1" data-eid="1" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/can_31.jpg">
|
||||
<img id="example2" data-eid="2" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/carton_47.jpg">
|
||||
<img id="example3" data-eid="3" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/carton_59.jpg">
|
||||
<img id="example4" data-eid="4" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/milk_bottle_76.jpg">
|
||||
<img id="example5" data-eid="5" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/milk_bottle_97.jpg">
|
||||
<img id="example6" data-eid="6" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/water_bottle_105.jpg">
|
||||
<img id="example7" data-eid="7" class="rounded mr-2 mb-2 eImg" src="https://cvbp-secondary.z19.web.core.windows.net/html_demo/img/water_bottle_123.jpg">
|
||||
|
||||
<div class="mt-3 text-center">
|
||||
<div class="form-check-inline">
|
||||
|
|
|
@ -47,7 +47,7 @@ function populateTable(i, tableData) {
|
|||
var item = document.createElement('div');
|
||||
item.classList.add("item");
|
||||
var img = document.createElement('img');
|
||||
img.src = 'https://cvbp.blob.core.windows.net/public/html_demo/small-150/' + rowData[0];
|
||||
img.src = 'https://cvbp-secondary.z19.web.core.windows.net/html_demo/small-150/' + rowData[0];
|
||||
var txt = document.createElement('p');
|
||||
txt.innerHTML = rowData[0] + "<br/><i>Dist.: " + rowData[1] + "</i>";
|
||||
item.appendChild(img);
|
||||
|
@ -76,7 +76,7 @@ function calcSimilar(top, queryFeatures, simType) {
|
|||
if (!queryFeatures) {
|
||||
var queryRow = Math.floor(Math.random() * (rows - 0 + 1) + 0);
|
||||
var queryimg = ref_array[queryRow];
|
||||
retImg = 'https://cvbp.blob.core.windows.net/public/html_demo/small-150/' + fn_array[queryRow];
|
||||
retImg = 'https://cvbp-secondary.z19.web.core.windows.net/html_demo/small-150/' + fn_array[queryRow];
|
||||
} else {
|
||||
var queryimg = queryFeatures;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ async function parseSimFileNames(fileType) {
|
|||
new JSZip.external.Promise(function (resolve, reject) {
|
||||
zipFile_fn = 'data/ref_filenames.zip';
|
||||
if (fileType == "example")
|
||||
zipFile_fn = 'https://cvbp.blob.core.windows.net/public/html_demo/data/ref_filenames.zip';
|
||||
zipFile_fn = 'https://cvbp-secondary.z19.web.core.windows.net/html_demo/data/ref_filenames.zip';
|
||||
JSZipUtils.getBinaryContent(zipFile_fn, function(err, data) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
|
@ -134,7 +134,7 @@ async function parseSimFileFeatures(fileType) {
|
|||
new JSZip.external.Promise(function (resolve, reject) {
|
||||
zipFile_ref = 'data/ref_features.zip';
|
||||
if (fileType == "example")
|
||||
zipFile_ref = 'https://cvbp.blob.core.windows.net/public/html_demo/data/ref_features.zip';
|
||||
zipFile_ref = 'https://cvbp-secondary.z19.web.core.windows.net/html_demo/data/ref_features.zip';
|
||||
JSZipUtils.getBinaryContent(zipFile_ref, function(err, data) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
|
|
|
@ -360,7 +360,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<video src=\"https://cvbp.blob.core.windows.net/public/datasets/action_recognition/action_sample_lowRes.mp4\" controls >\n",
|
||||
"<video src=\"https://cvbp-secondary.z19.web.core.windows.net/datasets/action_recognition/action_sample_lowRes.mp4\" controls >\n",
|
||||
" Your browser does not support the <code>video</code> element.\n",
|
||||
" </video>"
|
||||
],
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"url = (\n",
|
||||
" \"https://cvbp.blob.core.windows.net/public/datasets/action_recognition/drinking.mp4\"\n",
|
||||
" \"https://cvbp-secondary.z19.web.core.windows.net/datasets/action_recognition/drinking.mp4\"\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
],
|
||||
"source": [
|
||||
"# Download an example image\n",
|
||||
"IM_URL = \"https://cvbp.blob.core.windows.net/public/images/cvbp_cup.jpg\"\n",
|
||||
"IM_URL = \"https://cvbp-secondary.z19.web.core.windows.net/images/cvbp_cup.jpg\"\n",
|
||||
"urllib.request.urlretrieve(IM_URL, os.path.join(data_path(), \"example.jpg\"))\n",
|
||||
"\n",
|
||||
"im = open_image(os.path.join(data_path(), \"example.jpg\"), convert_mode='RGB')\n",
|
||||
|
@ -305,7 +305,7 @@
|
|||
"source": [
|
||||
"Now, click the **capture button** in the widget to start classification. Labels are displayed to show the most probable class along with the confidence predicted by the model for an image snapshot.\n",
|
||||
"\n",
|
||||
"<img src=\"https://cvbp.blob.core.windows.net/public/images/cvbp_webcam.png\" width=\"400\" />\n",
|
||||
"<img src=\"https://cvbp-secondary.z19.web.core.windows.net/images/cvbp_webcam.png\" width=\"400\" />\n",
|
||||
"<center>\n",
|
||||
"<i>Example Webcam image</i>\n",
|
||||
"</center>"
|
||||
|
|
|
@ -575,7 +575,7 @@
|
|||
"source": [
|
||||
"To see these details use the widget helper class `ResultsWidget`. The widget shows test images along with the ground truth label and model prediction score. With this tool, it's possible to see how the model predicts each image and debug the model if needed. Note that Jupyter widgets are quite unstable - if the widget below does not show then see the \"Troubleshooting\" section in this [FAQ](./FAQ.md) for possible fixes. \n",
|
||||
"\n",
|
||||
"<img src=\"https://cvbp.blob.core.windows.net/public/images/ic_widget.png\" width=\"600\"/>\n",
|
||||
"<img src=\"https://cvbp-secondary.z19.web.core.windows.net/images/ic_widget.png\" width=\"600\"/>\n",
|
||||
"<center><i>Image Classification Result Widget</i></center>"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -302,7 +302,7 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"# Extract test images paths\n",
|
||||
"im_url_root = \"https://cvbp.blob.core.windows.net/public/images/\"\n",
|
||||
"im_url_root = \"https://cvbp-secondary.z19.web.core.windows.net/images/\"\n",
|
||||
"im_filenames = [\"cvbp_milk_bottle.jpg\", \"cvbp_water_bottle.jpg\"]\n",
|
||||
"\n",
|
||||
"for im_filename in im_filenames:\n",
|
||||
|
|
|
@ -1210,7 +1210,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"test_image_directory = \"https://cvbp.blob.core.windows.net/public/images/\"\n",
|
||||
"test_image_directory = \"https://cvbp-secondary.z19.web.core.windows.net/images/\"\n",
|
||||
"test_image_filenames = [\"cvbp_milk_bottle.jpg\", \"cvbp_water_bottle.jpg\"]\n",
|
||||
"local_test_image_paths = []\n",
|
||||
"\n",
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
],
|
||||
"source": [
|
||||
"# Download an example image\n",
|
||||
"IM_URL = \"https://cvbp.blob.core.windows.net/public/images/cvbp_cup.jpg\"\n",
|
||||
"IM_URL = \"https://cvbp-secondary.z19.web.core.windows.net/images/cvbp_cup.jpg\"\n",
|
||||
"im_path = os.path.join(data_path(), \"example.jpg\")\n",
|
||||
"urllib.request.urlretrieve(IM_URL, im_path)\n",
|
||||
"\n",
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
"source": [
|
||||
"## Browse the Dataset\n",
|
||||
"\n",
|
||||
"We are going to use the [odFridgeObjectsMask dataset](https://cvbp.blob.core.windows.net/public/datasets/object_detection/odFridgeObjectsMask.zip) for illustration. The dataset is already downloaded and unzipped into `DATA_PATH`. This dataset includes 31 images of 4 class labels: `can`, `carton`, `milk_bottle` and `water_bottle`.\n",
|
||||
"We are going to use the [odFridgeObjectsMask dataset](https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/odFridgeObjectsMask.zip) for illustration. The dataset is already downloaded and unzipped into `DATA_PATH`. This dataset includes 31 images of 4 class labels: `can`, `carton`, `milk_bottle` and `water_bottle`.\n",
|
||||
"\n",
|
||||
"```\n",
|
||||
"odFridgeObjectsMask/\n",
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
],
|
||||
"source": [
|
||||
"# download image\n",
|
||||
"im_url = \"https://cvbp.blob.core.windows.net/public/datasets/object_detection/keypoint_detection.jpg\"\n",
|
||||
"im_url = \"https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/keypoint_detection.jpg\"\n",
|
||||
"im_path = data_path() / im_url.split('/')[-1]\n",
|
||||
"urllib.request.urlretrieve(im_url, im_path)\n",
|
||||
"\n",
|
||||
|
|
|
@ -718,7 +718,7 @@
|
|||
],
|
||||
"source": [
|
||||
"# Download an example image\n",
|
||||
"IM_URL = \"https://cvbp.blob.core.windows.net/public/images/cvbp_two_cartons.jpg\"\n",
|
||||
"IM_URL = \"https://cvbp-secondary.z19.web.core.windows.net/images/cvbp_two_cartons.jpg\"\n",
|
||||
"im_path = \"example.jpg\"\n",
|
||||
"urllib.request.urlretrieve(IM_URL, im_path)\n",
|
||||
"\n",
|
||||
|
|
|
@ -62,6 +62,9 @@ from utils_cv.action_recognition.dataset import (
|
|||
get_default_tfms_config
|
||||
)
|
||||
|
||||
storage_url = "https://cvbp-secondary.z19.web.core.windows.net/"
|
||||
|
||||
|
||||
def path_classification_notebooks():
|
||||
""" Returns the path of the classification notebooks folder. """
|
||||
return os.path.abspath(
|
||||
|
@ -438,18 +441,16 @@ def testing_databunch(tmp_session):
|
|||
@pytest.fixture(scope="session")
|
||||
def od_cup_path(tmp_session) -> str:
|
||||
""" Returns the path to the downloaded cup image. """
|
||||
IM_URL = "https://cvbp.blob.core.windows.net/public/images/cvbp_cup.jpg"
|
||||
im_url = storage_url + "images/cvbp_cup.jpg"
|
||||
im_path = os.path.join(tmp_session, "example.jpg")
|
||||
urllib.request.urlretrieve(IM_URL, im_path)
|
||||
urllib.request.urlretrieve(im_url, im_path)
|
||||
return im_path
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def od_cup_mask_path(tmp_session) -> str:
|
||||
""" Returns the path to the downloaded cup mask image. """
|
||||
im_url = (
|
||||
"https://cvbp.blob.core.windows.net/public/images/cvbp_cup_mask.png"
|
||||
)
|
||||
im_url = storage_url + "images/cvbp_cup_mask.png"
|
||||
im_path = os.path.join(tmp_session, "example_mask.png")
|
||||
urllib.request.urlretrieve(im_url, im_path)
|
||||
return im_path
|
||||
|
|
|
@ -77,7 +77,9 @@ def test_model_to_learner(tmp):
|
|||
assert isinstance(learn.model, models.ResNet)
|
||||
|
||||
# Test if model can predict very simple image
|
||||
IM_URL = "https://cvbp.blob.core.windows.net/public/images/cvbp_cup.jpg"
|
||||
IM_URL = (
|
||||
"https://cvbp-secondary.z19.web.core.windows.net/images/cvbp_cup.jpg"
|
||||
)
|
||||
imagefile = os.path.join(tmp, "cvbp_cup.jpg")
|
||||
urllib.request.urlretrieve(IM_URL, imagefile)
|
||||
|
||||
|
|
|
@ -49,9 +49,9 @@ def test_coco_labels():
|
|||
def test_coco2voc(coco_sample_path):
|
||||
output_dir = "coco2voc_output"
|
||||
coco2voc(
|
||||
anno_path = coco_sample_path,
|
||||
output_dir = output_dir,
|
||||
download_images = False
|
||||
anno_path=coco_sample_path,
|
||||
output_dir=output_dir,
|
||||
download_images=False,
|
||||
)
|
||||
filenames = os.listdir(os.path.join(output_dir, "annotations"))
|
||||
assert len(filenames) == 3
|
||||
|
@ -168,11 +168,11 @@ def labelbox_export_data(tmp_session):
|
|||
"objects": [
|
||||
{
|
||||
"value": "carton",
|
||||
"instanceURI": "https://cvbp.blob.core.windows.net/public/datasets/object_detection/labelbox_test_dummy_carton_mask.png"
|
||||
"instanceURI": "https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/labelbox_test_dummy_carton_mask.png"
|
||||
},
|
||||
{
|
||||
"value": "milk_bottle",
|
||||
"instanceURI": "https://cvbp.blob.core.windows.net/public/datasets/object_detection/labelbox_test_dummy_milk_bottle_mask.png"
|
||||
"instanceURI": "https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/labelbox_test_dummy_milk_bottle_mask.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -42,7 +42,7 @@ class _DatasetSpec:
|
|||
|
||||
class Urls:
|
||||
# base url
|
||||
base = "https://cvbp.blob.core.windows.net/public/datasets/action_recognition/"
|
||||
base = "https://cvbp-secondary.z19.web.core.windows.net/datasets/action_recognition/"
|
||||
|
||||
# label maps
|
||||
kinetics_label_map = "https://github.com/microsoft/ComputerVision/files/3746975/kinetics400_lable_map.txt"
|
||||
|
@ -75,9 +75,9 @@ class Urls:
|
|||
|
||||
|
||||
KINETICS = _DatasetSpec(
|
||||
Urls.kinetics_label_map, 400, os.path.join("data", "kinetics400"),
|
||||
Urls.kinetics_label_map, 400, os.path.join("data", "kinetics400")
|
||||
)
|
||||
|
||||
HMDB51 = _DatasetSpec(
|
||||
Urls.hmdb51_label_map, 51, os.path.join("data", "hmdb51"),
|
||||
Urls.hmdb51_label_map, 51, os.path.join("data", "hmdb51")
|
||||
)
|
||||
|
|
|
@ -15,7 +15,7 @@ from tqdm import tqdm
|
|||
|
||||
class Urls:
|
||||
# for now hardcoding base url into Urls class
|
||||
base = "https://cvbp.blob.core.windows.net/public/datasets/image_classification/"
|
||||
base = "https://cvbp-secondary.z19.web.core.windows.net/datasets/image_classification/"
|
||||
|
||||
# ImageNet labels Keras is using
|
||||
imagenet_labels_json = "https://s3.amazonaws.com/deep-learning-models/image-models/imagenet_class_index.json"
|
||||
|
|
|
@ -14,11 +14,10 @@ import xml.etree.ElementTree as ET
|
|||
|
||||
from .references.anno_coco2voc import coco2voc_main
|
||||
|
||||
|
||||
class Urls:
|
||||
# for now hardcoding base url into Urls class
|
||||
base = (
|
||||
"https://cvbp.blob.core.windows.net/public/datasets/object_detection/"
|
||||
)
|
||||
base = "https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/"
|
||||
|
||||
# traditional datasets
|
||||
fridge_objects_path = urljoin(base, "odFridgeObjects.zip")
|
||||
|
@ -163,7 +162,7 @@ def coco2voc(
|
|||
anno_path: str,
|
||||
output_dir: str,
|
||||
anno_type: str = "instance",
|
||||
download_images: bool = False
|
||||
download_images: bool = False,
|
||||
) -> None:
|
||||
""" Convert COCO annotation (single .json file) to Pascal VOC annotations
|
||||
(multiple .xml files).
|
||||
|
@ -191,7 +190,7 @@ def extract_masks_from_labelbox_json(
|
|||
mask into a directory called "segmentation-masks".
|
||||
|
||||
The annotation files in
|
||||
[odFridgeObjects](https://cvbp.blob.core.windows.net/public/datasets/object_detection/odFridgeObjects.zip)
|
||||
[odFridgeObjects](https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/odFridgeObjects.zip)
|
||||
are in the format of PASCAL VOC shown in our
|
||||
[01 notebook](../../scenarios/detection/01_training_introduction.ipynb).
|
||||
|
||||
|
@ -230,7 +229,7 @@ def extract_masks_from_labelbox_json(
|
|||
binary mask of the object, with 0 as background, 255 as the object.
|
||||
|
||||
Take the
|
||||
[`odFridgeObjects`](https://cvbp.blob.core.windows.net/public/datasets/object_detection/odFridgeObjects.zip)
|
||||
[`odFridgeObjects`](https://cvbp-secondary.z19.web.core.windows.net/datasets/object_detection/odFridgeObjects.zip)
|
||||
dataset as an example. Here the XML annotations are in the
|
||||
`odFridgeObjects/annotations` folder and the original images are in
|
||||
the `odFridgeObjects/images` folder. For an arbitrary image
|
||||
|
|
|
@ -340,6 +340,8 @@ def ims_eval_detections(
|
|||
score_thresholds: List[float] = np.linspace(0, 1, 51),
|
||||
):
|
||||
""" Count number of wrong detections and number of missed objects for multiple image """
|
||||
score_thresholds = [int(f) for f in score_thresholds]
|
||||
|
||||
# get detection bounding boxes and corresponding ground truth for all images
|
||||
det_bboxes_list = [d["det_bboxes"] for d in detections]
|
||||
gt_bboxes_list = [
|
||||
|
|
|
@ -6,7 +6,7 @@ from urllib.parse import urljoin
|
|||
|
||||
class Urls:
|
||||
# base url
|
||||
base = "https://cvbp.blob.core.windows.net/public/datasets/image_segmentation/"
|
||||
base = "https://cvbp-secondary.z19.web.core.windows.net/datasets/image_segmentation/"
|
||||
|
||||
# traditional datasets
|
||||
fridge_objects_path = urljoin(base, "segFridgeObjects.zip")
|
||||
|
|
|
@ -12,12 +12,16 @@ from utils_cv.similarity.metrics import vector_distance
|
|||
|
||||
|
||||
class Urls:
|
||||
# base url
|
||||
base = "https://cvbp.blob.core.windows.net/public/datasets/image_similarity/"
|
||||
# base url
|
||||
base = "https://cvbp-secondary.z19.web.core.windows.net/datasets/image_similarity/"
|
||||
|
||||
# traditional datasets
|
||||
fridge_objects_retrieval_path = urljoin(base, "fridgeObjectsImageRetrieval.zip")
|
||||
fridge_objects_retrieval_tiny_path = urljoin(base, "fridgeObjectsImageRetrievalTiny.zip")
|
||||
fridge_objects_retrieval_path = urljoin(
|
||||
base, "fridgeObjectsImageRetrieval.zip"
|
||||
)
|
||||
fridge_objects_retrieval_tiny_path = urljoin(
|
||||
base, "fridgeObjectsImageRetrievalTiny.zip"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def all(cls) -> List[str]:
|
||||
|
|
|
@ -6,7 +6,7 @@ from urllib.parse import urljoin
|
|||
|
||||
|
||||
class Urls:
|
||||
base = "https://cvbp.blob.core.windows.net/public/datasets/tracking/"
|
||||
base = "https://cvbp-secondary.z19.web.core.windows.net/datasets/tracking/"
|
||||
|
||||
cans_path = urljoin(base, "cans.zip")
|
||||
fridge_objects_path = urljoin(base, "odFridgeObjects_FairMOT-Format.zip")
|
||||
|
|
Загрузка…
Ссылка в новой задаче