diff --git a/demo.py b/demo.py index 0655a4b..57426e6 100644 --- a/demo.py +++ b/demo.py @@ -9,7 +9,8 @@ from utils.torch_utils import select_device from utilsK.queRiver import get_labelnames,get_label_arrays import numpy as np import torch - +from utilsK.masterUtils import get_needed_objectsIndex + def main(): ##预先设置的参数 device_='1' ##选定模型,可选 cpu,'0','1' @@ -21,9 +22,29 @@ def main(): conf_thres,iou_thres,classes= 0.25,0.45,5 labelnames = "../AIlib/weights/yolov5/class5/labelnames.json" rainbows = [ [0,0,255],[0,255,0],[255,0,0],[255,0,255],[255,255,0],[255,129,0],[255,0,127],[127,255,0],[0,255,127],[0,127,255],[127,0,255],[255,127,255],[255,255,127],[127,255,255],[0,255,255],[255,127,255],[127,255,255], [0,127,0],[0,0,127],[0,255,255]] - allowedList=[0,1,2,3] + ####模型选择参数用如下: + mode_paras=[ + { + "id":"0", + "config":{ + "k1":"v1", + "k2":"v2" + } + }, + { + "id":"1", + "config":{ + "k1":"v1", + "k2":"v2" + } + } + ] + + allowedList,allowedList_string=get_needed_objectsIndex(mode_paras) + #allowedList=[0,1,2,3] + ##加载模型,准备好显示字符 device = select_device(device_) names=get_labelnames(labelnames) diff --git a/images/results/2022-07-27-13-35-23_frame-160-240_type-排口_UfNOMh78smt0wezB_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-35-23_frame-160-240_type-排口_UfNOMh78smt0wezB_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..bac3065 Binary files /dev/null and b/images/results/2022-07-27-13-35-23_frame-160-240_type-排口_UfNOMh78smt0wezB_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-35-32_frame-428-480_type-排污口_jFuIUO357Z6kBxXg_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-35-32_frame-428-480_type-排污口_jFuIUO357Z6kBxXg_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..a17d3f0 Binary files /dev/null and b/images/results/2022-07-27-13-35-32_frame-428-480_type-排污口_jFuIUO357Z6kBxXg_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-35-41_frame-516-720_type-排污口_o2QNRX4xrpcziV9w_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-35-41_frame-516-720_type-排污口_o2QNRX4xrpcziV9w_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..d455ecc Binary files /dev/null and b/images/results/2022-07-27-13-35-41_frame-516-720_type-排污口_o2QNRX4xrpcziV9w_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-35-50_frame-931-960_type-排污口_h6Xr2u0T4Y5ZkFUA_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-35-50_frame-931-960_type-排污口_h6Xr2u0T4Y5ZkFUA_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..5e26ae6 Binary files /dev/null and b/images/results/2022-07-27-13-35-50_frame-931-960_type-排污口_h6Xr2u0T4Y5ZkFUA_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-35-59_frame-1068-1200_type-排污口_epkNQdPqMcgsC8Du_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-35-59_frame-1068-1200_type-排污口_epkNQdPqMcgsC8Du_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..0066685 Binary files /dev/null and b/images/results/2022-07-27-13-35-59_frame-1068-1200_type-排污口_epkNQdPqMcgsC8Du_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-36-08_frame-1315-1440_type-排污口_28X6uDsAYzi0VmaG_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-36-08_frame-1315-1440_type-排污口_28X6uDsAYzi0VmaG_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..d105360 Binary files /dev/null and b/images/results/2022-07-27-13-36-08_frame-1315-1440_type-排污口_28X6uDsAYzi0VmaG_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-36-16_frame-1519-1680_type-排污口_LUiuGqmd10XMTtKY_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-36-16_frame-1519-1680_type-排污口_LUiuGqmd10XMTtKY_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..de5ca43 Binary files /dev/null and b/images/results/2022-07-27-13-36-16_frame-1519-1680_type-排污口_LUiuGqmd10XMTtKY_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-36-25_frame-1750-1920_type-排口_mVkyctd4HIuzNreF_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-36-25_frame-1750-1920_type-排口_mVkyctd4HIuzNreF_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..406d2ba Binary files /dev/null and b/images/results/2022-07-27-13-36-25_frame-1750-1920_type-排口_mVkyctd4HIuzNreF_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-36-34_frame-2116-2160_type-水生植被_QuXwfae6vck3j4qJ_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-36-34_frame-2116-2160_type-水生植被_QuXwfae6vck3j4qJ_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..ccb91ba Binary files /dev/null and b/images/results/2022-07-27-13-36-34_frame-2116-2160_type-水生植被_QuXwfae6vck3j4qJ_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-36-43_frame-2329-2400_type-水生植被_EqPuHXg2hsxUA5Y7_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-36-43_frame-2329-2400_type-水生植被_EqPuHXg2hsxUA5Y7_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..4419fbc Binary files /dev/null and b/images/results/2022-07-27-13-36-43_frame-2329-2400_type-水生植被_EqPuHXg2hsxUA5Y7_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-36-52_frame-2604-2640_type-水生植被_QjZ4FYy3twCdr5ga_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-36-52_frame-2604-2640_type-水生植被_QjZ4FYy3twCdr5ga_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..8a71de8 Binary files /dev/null and b/images/results/2022-07-27-13-36-52_frame-2604-2640_type-水生植被_QjZ4FYy3twCdr5ga_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-00_frame-2728-2880_type-水生植被_RC5sTu1qOdXH2WBh_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-00_frame-2728-2880_type-水生植被_RC5sTu1qOdXH2WBh_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..b0f5cf3 Binary files /dev/null and b/images/results/2022-07-27-13-37-00_frame-2728-2880_type-水生植被_RC5sTu1qOdXH2WBh_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-10_frame-3117-3120_type-水生植被_genKJUQ2XFxYGSA3_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-10_frame-3117-3120_type-水生植被_genKJUQ2XFxYGSA3_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..ce13020 Binary files /dev/null and b/images/results/2022-07-27-13-37-10_frame-3117-3120_type-水生植被_genKJUQ2XFxYGSA3_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-19_frame-3131-3360_type-排口_AC6d4PocQ7W2DzrS_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-19_frame-3131-3360_type-排口_AC6d4PocQ7W2DzrS_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..406d557 Binary files /dev/null and b/images/results/2022-07-27-13-37-19_frame-3131-3360_type-排口_AC6d4PocQ7W2DzrS_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-28_frame-3517-3600_type-排污口_BPJyiMcu5X1mZfGw_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-28_frame-3517-3600_type-排污口_BPJyiMcu5X1mZfGw_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..d28f5d6 Binary files /dev/null and b/images/results/2022-07-27-13-37-28_frame-3517-3600_type-排污口_BPJyiMcu5X1mZfGw_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-37_frame-3792-3840_type-水生植被_HvUOAF1CncGgRiqJ_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-37_frame-3792-3840_type-水生植被_HvUOAF1CncGgRiqJ_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..f975895 Binary files /dev/null and b/images/results/2022-07-27-13-37-37_frame-3792-3840_type-水生植被_HvUOAF1CncGgRiqJ_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-46_frame-3992-4080_type-排污口_bdoy79MHKY6SqJz4_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-46_frame-3992-4080_type-排污口_bdoy79MHKY6SqJz4_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..1e2f03a Binary files /dev/null and b/images/results/2022-07-27-13-37-46_frame-3992-4080_type-排污口_bdoy79MHKY6SqJz4_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-37-55_frame-4174-4320_type-排污口_fiKbtqDLXPZ5ANoe_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-37-55_frame-4174-4320_type-排污口_fiKbtqDLXPZ5ANoe_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..908fc77 Binary files /dev/null and b/images/results/2022-07-27-13-37-55_frame-4174-4320_type-排污口_fiKbtqDLXPZ5ANoe_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-38-05_frame-4485-4560_type-排口_ZPxLFlRT9ds1crzh_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-38-05_frame-4485-4560_type-排口_ZPxLFlRT9ds1crzh_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..cb8f032 Binary files /dev/null and b/images/results/2022-07-27-13-38-05_frame-4485-4560_type-排口_ZPxLFlRT9ds1crzh_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-38-14_frame-4631-4800_type-排口_pyq8su0Y4xZvGNAc_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-38-14_frame-4631-4800_type-排口_pyq8su0Y4xZvGNAc_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..85c5454 Binary files /dev/null and b/images/results/2022-07-27-13-38-14_frame-4631-4800_type-排口_pyq8su0Y4xZvGNAc_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-38-23_frame-4857-5040_type-水生植被_gB3oJ7ivRfOe0Lrj_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-38-23_frame-4857-5040_type-水生植被_gB3oJ7ivRfOe0Lrj_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..f1eef8a Binary files /dev/null and b/images/results/2022-07-27-13-38-23_frame-4857-5040_type-水生植被_gB3oJ7ivRfOe0Lrj_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ diff --git a/images/results/2022-07-27-13-38-32_frame-5124-5280_type-水生植被_f836RQ9PDzvH5qIK_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg b/images/results/2022-07-27-13-38-32_frame-5124-5280_type-水生植被_f836RQ9PDzvH5qIK_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg new file mode 100644 index 0000000..20f2676 Binary files /dev/null and b/images/results/2022-07-27-13-38-32_frame-5124-5280_type-水生植被_f836RQ9PDzvH5qIK_s-off-P20220727133456697-30e25a4f15eb4756abd4571a2fcad2de_OR.jpg differ