diff --git a/deploy/configs/build_inshop.yaml b/deploy/configs/build_inshop.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ab5392d3b3aa2fc74777573d267ed38f4eb1f44d --- /dev/null +++ b/deploy/configs/build_inshop.yaml @@ -0,0 +1,35 @@ +Global: + rec_inference_model_dir: "./inshop/rec/" + batch_size: 1 + use_gpu: True + enable_mkldnn: True + cpu_num_threads: 100 + enable_benchmark: True + use_fp16: False + ir_optim: True + use_tensorrt: False + gpu_mem: 8000 + enable_profile: False + +RecPreProcess: + transform_ops: + - ResizeImage: + size: 224 + - NormalizeImage: + scale: 0.00392157 + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + order: '' + - ToCHWImage: + +RecPostProcess: null + +# indexing engine config +IndexProcess: + index_path: "./inshop/inshop_index/" + image_root: "./inshop/dataset/" + data_file: "./inshop/inshop_gallery_demo.txt" + delimiter: " " + dist_type: "IP" + pq_size: 100 + embedding_size: 512 diff --git a/deploy/configs/inference_inshop.yaml b/deploy/configs/inference_inshop.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2714afc89be3ed9ac2b065f19c53c024585c9b2c --- /dev/null +++ b/deploy/configs/inference_inshop.yaml @@ -0,0 +1,54 @@ +Global: + infer_imgs: "./inshop/demo/01_3_back.jpg" + det_inference_model_dir: "./inshop/det/" + rec_inference_model_dir: "./inshop/rec/" + batch_size: 1 + image_shape: [3, 640, 640] + threshold: 0.0 + max_det_results: 3 + labe_list: + - foreground + + # inference engine config + use_gpu: True + enable_mkldnn: True + cpu_num_threads: 100 + enable_benchmark: True + use_fp16: False + ir_optim: True + use_tensorrt: False + gpu_mem: 8000 + enable_profile: False + +DetPreProcess: + transform_ops: + - DetResize: + interp: 2 + keep_ratio: false + target_size: [640, 640] + - DetNormalizeImage: + is_scale: true + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + - DetPermute: {} +DetPostProcess: {} + +RecPreProcess: + transform_ops: + - ResizeImage: + size: 224 + - NormalizeImage: + scale: 0.00392157 + mean: [0.485, 0.456, 0.406] + std: [0.229, 0.224, 0.225] + order: '' + - ToCHWImage: + +RecPostProcess: null + +# indexing engine config +IndexProcess: + index_path: "./inshop/inshop_index" + search_budget: 100 + return_k: 10 + dist_type: "IP" diff --git a/ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml b/ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml index e686791dc8f0a67f9d829dfd8663b92d8e0130a8..795178300ddccf8005a1ea7de6ee1c91f95ef200 100644 --- a/ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml +++ b/ppcls/configs/Products/ResNet50_vd_Aliproduct.yaml @@ -77,7 +77,7 @@ DataLoader: shuffle: True loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Eval: # TOTO: modify to the latest trainer dataset: @@ -101,7 +101,7 @@ DataLoader: shuffle: False loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Metric: Train: - TopkAcc: diff --git a/ppcls/configs/Products/ResNet50_vd_Inshop.yaml b/ppcls/configs/Products/ResNet50_vd_Inshop.yaml index 5d1b1e312bd3d735b4aa12f19d5a5369cafe412b..2d264922cbd2a684759ed9b694c21586f4af4271 100644 --- a/ppcls/configs/Products/ResNet50_vd_Inshop.yaml +++ b/ppcls/configs/Products/ResNet50_vd_Inshop.yaml @@ -34,7 +34,9 @@ Arch: class_num: 3997 margin: 0.15 scale: 30 - + infer_output_key: "features" + infer_add_softmax: False + # loss function config for traing/eval process Loss: Train: @@ -93,7 +95,7 @@ DataLoader: shuffle: True loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Eval: Query: # TOTO: modify to the latest trainer @@ -116,7 +118,7 @@ DataLoader: shuffle: False loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Gallery: # TOTO: modify to the latest trainer @@ -139,7 +141,7 @@ DataLoader: shuffle: False loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Metric: Eval: diff --git a/ppcls/configs/Products/ResNet50_vd_SOP.yaml b/ppcls/configs/Products/ResNet50_vd_SOP.yaml index 4ea9674eeb97f738343e0bfa9085dcb16a8a8f33..a3bddf4a801f81fadcf7f80e5342bca6b42cd02e 100644 --- a/ppcls/configs/Products/ResNet50_vd_SOP.yaml +++ b/ppcls/configs/Products/ResNet50_vd_SOP.yaml @@ -34,7 +34,9 @@ Arch: class_num: 11319 margin: 0.15 scale: 30 - + infer_output_key: "features" + infer_add_softmax: False + # loss function config for traing/eval process Loss: Train: @@ -93,7 +95,7 @@ DataLoader: shuffle: True loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Eval: Query: # TOTO: modify to the latest trainer @@ -116,7 +118,7 @@ DataLoader: shuffle: False loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Gallery: # TOTO: modify to the latest trainer @@ -139,7 +141,7 @@ DataLoader: shuffle: False loader: num_workers: 6 - use_shared_memory: False + use_shared_memory: True Metric: Eval: