Skip to content

Commit 390595a

Browse files
committed
bug fixes
1 parent 2d1bb1d commit 390595a

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

.travis/generate-pipelines-json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222

2323
# add templates here
2424
# TEMPLATE_LIST.append(UU3TestTemplate()) # no enough memory for travis ci
25+
TEMPLATE_LIST.append(DefaultObjectDetectionTemplate())
26+
TEMPLATE_LIST.append(ARIMATemplate())
2527
TEMPLATE_LIST.append(TA1ImageProcessingRegressionTemplate())
2628
TEMPLATE_LIST.append(TA1ImageProcessingRegressionTemplate2())
27-
TEMPLATE_LIST.append(ARIMATemplate())
2829
TEMPLATE_LIST.append(DefaultClassificationTemplate())
2930
TEMPLATE_LIST.append(DefaultClassificationTemplate2())
3031
TEMPLATE_LIST.append(DefaultTimeseriesCollectionTemplate())
3132
TEMPLATE_LIST.append(DefaultRegressionTemplate())
3233
TEMPLATE_LIST.append(DefaultRegressionTemplate2())
3334
TEMPLATE_LIST.append(VotingTemplate())
34-
TEMPLATE_LIST.append(DefaultObjectDetectionTemplate())
3535
TEMPLATE_LIST.append(HorizontalVotingTemplate())
3636
# ends
3737

.travis/library.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,9 @@ def __init__(self):
822822
{
823823
"primitive": "d3m.primitives.feature_extraction.yolo.DSBOX",
824824
"hyperparameters": {
825-
# "use_fitted_weight": [(False)],
826-
# "epochs": [(30)]
825+
"use_fitted_weight": [(True)],
826+
# "confidences_threshold": [(0.8)],
827+
# "nms_threshold": [0.6],
827828
}
828829
}
829830
],

.travis/template.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ def __init__(self, config={}, pipeline_type="classification", test_dataset_id="3
416416

417417

418418
DATASET_MAPPER = {
419-
'classification': "38_sick",
420-
'voting_classification': '38_sick',
421-
'regression': "196_autoMpg",
422-
'timeseries': "uu1_datasmash",
423-
'image_regression': '22_handgeometry',
424-
'time_series_forecasting': 'LL1_736_stock_market',
425-
'object_detection': 'LL1_penn_fudan_pedestrian',
419+
'classification': "38_sick_MIN_METADATA",
420+
'voting_classification': '38_sick_MIN_METADATA',
421+
'regression': "196_autoMpg_MIN_METADATA",
422+
'timeseries': "66_chlorineConcentration_MIN_METADATA",
423+
'image_regression': '22_handgeometry_MIN_METADATA',
424+
'time_series_forecasting': 'LL1_736_population_spawn_MIN_METADATA',
425+
'object_detection': 'LL1_penn_fudan_pedestrian_MIN_METADATA',
426426
'multitable_dataset': 'uu3_world_development_indicators'
427427
}
428428

dsbox/datapreprocessing/featurizer/image/object_detection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Params(params.Params):
125125
output_layer: typing.List[str]
126126
target_column_name: str
127127
input_image_column_name: str
128-
dump_model_path: str
128+
dump_model_path: typing.Optional[str]
129129

130130

131131
class Yolo(SupervisedLearnerPrimitiveBase[Inputs, Outputs, Params, YoloHyperparams]):
@@ -191,7 +191,7 @@ def __init__(self, *, hyperparams: YoloHyperparams, volumes: typing.Union[typing
191191
self.warmup_steps = None
192192
self.total_steps = None
193193
self._loaded_dataset = None
194-
self._dump_model_path = None
194+
self._dump_model_path = ""
195195
self._current_phase = None
196196

197197
def fit(self, *, timeout: float = None, iterations: int = None) -> CallResult[None]:
@@ -392,9 +392,9 @@ def _produce_for_fitted_weight(self, input_df):
392392
image_path = os.path.join(self._location_base_uris, each_image_name)
393393
each_image = cv2.imread(image_path)
394394
if each_image is None:
395-
logger.error("loading image from " + image_path + " failed!")
395+
logger.error("loading image from {} failed!".format(str(image_path)))
396396
continue
397-
logger.debug("Now detecting objects in", each_image_name)
397+
logger.debug("Now detecting objects in {}".format(each_image_name))
398398
# Creates 4-dimensional blob from image.
399399
# swapRB has to be True, otherwise the channel is not R,G,B style
400400
blob = cv2.dnn.blobFromImage(each_image, self.hyperparams["blob_scale_factor"],

0 commit comments

Comments
 (0)