Merge pull request #2091 from LDOUBLEV/trt_cpp
fix gap between train_model predict and inference
This commit is contained in:
commit
f1cd0c35e4
|
@ -39,10 +39,7 @@ class TextDetector(object):
|
||||||
self.args = args
|
self.args = args
|
||||||
self.det_algorithm = args.det_algorithm
|
self.det_algorithm = args.det_algorithm
|
||||||
pre_process_list = [{
|
pre_process_list = [{
|
||||||
'DetResizeForTest': {
|
'DetResizeForTest': None
|
||||||
'limit_side_len': args.det_limit_side_len,
|
|
||||||
'limit_type': args.det_limit_type
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
'NormalizeImage': {
|
'NormalizeImage': {
|
||||||
'std': [0.229, 0.224, 0.225],
|
'std': [0.229, 0.224, 0.225],
|
||||||
|
|
|
@ -97,7 +97,7 @@ def main():
|
||||||
preds = model(images)
|
preds = model(images)
|
||||||
post_result = post_process_class(preds, shape_list)
|
post_result = post_process_class(preds, shape_list)
|
||||||
boxes = post_result[0]['points']
|
boxes = post_result[0]['points']
|
||||||
# write resule
|
# write result
|
||||||
dt_boxes_json = []
|
dt_boxes_json = []
|
||||||
for box in boxes:
|
for box in boxes:
|
||||||
tmp_json = {"transcription": ""}
|
tmp_json = {"transcription": ""}
|
||||||
|
|
Loading…
Reference in New Issue