Skip to content

Commit 4f8490a

Browse files
authored
Merge pull request #120 from IDEA-Research/dev
Release/0.9.3
2 parents 4b475a6 + a0326b7 commit 4f8490a

File tree

175 files changed

+10075
-3916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+10075
-3916
lines changed

build_doc.sh

100644100755
File mode changed.

deepdataspace/model/image.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ def _add_annotation(self,
326326
keypoint_colors: List[int] = None,
327327
keypoint_skeleton: List[int] = None,
328328
keypoint_names: List[str] = None,
329+
caption: str = None,
329330
confirm_type: int = 0,
330331
):
331332
if bbox:
@@ -341,7 +342,7 @@ def _add_annotation(self,
341342
keypoint_skeleton,
342343
keypoint_names)
343344
anno_obj = Object(label_name=label, label_type=label_type, label_id=label_obj.id,
344-
category_name=category, category_id=category_obj.id,
345+
category_name=category, category_id=category_obj.id, caption=caption,
345346
bounding_box=bounding_box, segmentation=segmentation, alpha=alpha_uri,
346347
points=points, lines=lines, point_colors=colors, point_names=names,
347348
conf=conf, is_group=is_group, confirm_type=confirm_type)
@@ -361,6 +362,7 @@ def add_annotation(self,
361362
keypoint_colors: List[int] = None,
362363
keypoint_skeleton: List[int] = None,
363364
keypoint_names: List[str] = None,
365+
caption: str = None,
364366
confirm_type: int = 0,
365367
):
366368
"""
@@ -380,13 +382,14 @@ def add_annotation(self,
380382
:param keypoint_names: the key point names, ["nose", "left_eye", ...].
381383
:param keypoint_colors: the key point colors, [255, 0, 0, ...].
382384
:param keypoint_skeleton: the key point skeleton, [0, 1, 2, ...].
385+
:param caption: the caption of the annotation.
383386
:param confirm_type: the confirm_type of the annotation, 0 = not confirmed, 1 = gt may be fn, 2 = pred may be fp
384387
"""
385388

386389
self._add_annotation(category, label, label_type, conf,
387390
is_group, bbox, segmentation, alpha_uri,
388391
keypoints, keypoint_colors, keypoint_skeleton, keypoint_names,
389-
confirm_type)
392+
caption, confirm_type)
390393

391394
self.save()
392395
self._update_dataset(bbox, segmentation, alpha_uri, keypoints)
@@ -434,6 +437,7 @@ def batch_add_annotation(self,
434437
:param keypoint_names: the key point names, ["nose", "left_eye", ...].
435438
:param keypoint_colors: the key point colors, [255, 0, 0, ...].
436439
:param keypoint_skeleton: the key point skeleton, [0, 1, 2, ...].
440+
:param caption: the caption of the annotation.
437441
:param confirm_type: the confirm_type of the annotation, 0 = not confirmed, 1 = gt may be fn, 2 = pred may be fp
438442
:return: None
439443
"""
@@ -457,7 +461,7 @@ def batch_add_annotation(self,
457461
self.objects.append(anno_obj)
458462

459463
def finish_batch_add_annotation(self):
460-
self.dataset.batch_save_image(self)
464+
self.dataset.batch_save_image()
461465

462466

463467
_image_models: Dict[str, Type[ImageModel]] = {} # a cache for ImageModel for each dataset

deepdataspace/plugins/coco2017/importer.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Dict
99
from typing import List
1010
from typing import Tuple
11+
import traceback
1112

1213
from deepdataspace.constants import DatasetFileType
1314
from deepdataspace.constants import DatasetType
@@ -32,6 +33,9 @@ def __init__(self, meta_path: str, enforce: bool = False):
3233

3334
self.meta_path = os.path.abspath(meta_path)
3435
info = self.parse_meta(meta_path)
36+
if info is None:
37+
raise RuntimeError(f"Cannot import coco dataset: {meta_path}")
38+
3539
dataset_name = info["dataset_name"]
3640
self.ground_truth = info["ground_truth"]
3741
self.image_root = info["image_root"]
@@ -94,8 +98,11 @@ def parse_meta(meta_path: str):
9498
try:
9599
info = COCO2017Importer._parse_meta(meta_path)
96100
except Exception as err:
101+
logger.error(traceback.format_exc())
97102
logger.error(f"Failed to parse meta file {meta_path}: {err}")
98103
return None
104+
105+
logger.info(f"Successfully parsed meta file {meta_path}: {info}")
99106
return info
100107

101108
def load_ground_truth(self):
@@ -118,7 +125,7 @@ def load_ground_truth(self):
118125

119126
def load_predictions(self):
120127
for file_tag, file_path in self.dataset.files.items():
121-
if not file_tag.startswith("PRED/"):
128+
if not file_tag.startswith(f"{DatasetFileType.Prediction}/"):
122129
continue
123130

124131
pred_name = file_tag.split("/", 1)[-1]

deepdataspace/scripts/start.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
help="Set the http service port, default 8765.")
4545
@click.option("--reload", is_flag=True, default=None,
4646
help="Auto reload service on code change, for development only.")
47-
@click.option("--configfile",
47+
@click.option("--configfile", "-C",
4848
help="Load the target yaml file to initialize more configurations. "
4949
"The command line options take precedence of the config file.")
5050
def start_dds(data_dir, quickstart, verbose, public, host, port, reload, configfile):

deepdataspace/server/static/422.622bc3b6.async.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deepdataspace/server/static/422.e1c904d6.async.js.map deepdataspace/server/static/422.622bc3b6.async.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deepdataspace/server/static/422.e1c904d6.async.js

-5
This file was deleted.

deepdataspace/server/static/482.76b40e08.async.js

-10
This file was deleted.

deepdataspace/server/static/482.76b40e08.async.js.map

-1
This file was deleted.

deepdataspace/server/static/742.95758e3b.async.js

-252
This file was deleted.

deepdataspace/server/static/742.95758e3b.async.js.map

-1
This file was deleted.

deepdataspace/server/static/742.e2aedde2.async.js

+252
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deepdataspace/server/static/742.e2aedde2.async.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deepdataspace/server/static/818.9ff3ddb4.async.js

-27
This file was deleted.

deepdataspace/server/static/818.9ff3ddb4.async.js.map

-1
This file was deleted.

deepdataspace/server/static/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<meta name="description" content="cvr">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
77
<link rel="shortcut icon" href="/static/favicon.png">
8-
<link rel="stylesheet" href="/static/umi.36ffdc32.css">
8+
<link rel="stylesheet" href="/static/umi.26db4b74.css">
99
</head>
1010
<body>
1111
<div id="root"></div>
12-
<script src="/static/umi.e0cbfd9d.js"></script>
12+
<script src="/static/umi.56db2ca8.js"></script>
1313

1414
</body></html>

deepdataspace/server/static/p__Annotator__index.783e658f.async.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deepdataspace/server/static/p__Annotator__index.a6aa2d70.chunk.css

-3
This file was deleted.

deepdataspace/server/static/p__Annotator__index.a6aa2d70.chunk.css.map

-1
This file was deleted.

0 commit comments

Comments
 (0)