mirror of
https://github.com/NanjingForestryUniversity/supermachine-tobacco.git
synced 2025-11-08 14:23:55 +00:00
调整了tobacco,yolo模型和YOLO的置信度
This commit is contained in:
parent
12870b3880
commit
210c7354cf
@ -54,14 +54,14 @@
|
|||||||
"dataset_file = \"data/dataset/dataset_2022-07-20_10-04.mat\"\n",
|
"dataset_file = \"data/dataset/dataset_2022-07-20_10-04.mat\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# color_dict = {(0, 0, 255): \"yangeng\", (255, 0, 0): 'beijing',(0, 255, 0): \"zibian\"} # 颜色对应的类别\n",
|
"# color_dict = {(0, 0, 255): \"yangeng\", (255, 0, 0): 'beijing',(0, 255, 0): \"zibian\"} # 颜色对应的类别\n",
|
||||||
"# color_dict = {(0, 0, 255): \"yangeng\"}\n",
|
"color_dict = {(0, 0, 255): \"yangeng\"}\n",
|
||||||
"color_dict = {(255, 0, 0): 'beijing'}\n",
|
"# color_dict = {(255, 0, 0): 'beijing'}\n",
|
||||||
"# color_dict = {(0, 255, 0): \"zibian\"}\n",
|
"# color_dict = {(0, 255, 0): \"zibian\"}\n",
|
||||||
"label_index = {\"yangeng\": 1, \"beijing\": 0, \"zibian\":2} # 类别对应的序号\n",
|
"label_index = {\"yangeng\": 1, \"beijing\": 0, \"zibian\":2} # 类别对应的序号\n",
|
||||||
"show_samples = False # 是否展示样本\n",
|
"show_samples = False # 是否展示样本\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# 定义一些训练量\n",
|
"# 定义一些训练量\n",
|
||||||
"threshold = 2 # 正样本周围多大范围内的还算是正样本\n",
|
"threshold = 3 # 正样本周围多大范围内的还算是正样本\n",
|
||||||
"node_num = 20 # 如果使用ELM作为分类器物,有多少的节点\n",
|
"node_num = 20 # 如果使用ELM作为分类器物,有多少的节点\n",
|
||||||
"negative_sample_num = None # None或者一个数字,对应生成的负样本数量"
|
"negative_sample_num = None # None或者一个数字,对应生成的负样本数量"
|
||||||
],
|
],
|
||||||
@ -169,7 +169,7 @@
|
|||||||
"name": "stderr",
|
"name": "stderr",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"147099it [31:23, 78.09it/s] \n"
|
"23961it [00:46, 519.87it/s] "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -178,12 +178,19 @@
|
|||||||
"text": [
|
"text": [
|
||||||
" precision recall f1-score support\n",
|
" precision recall f1-score support\n",
|
||||||
"\n",
|
"\n",
|
||||||
" 0 1.00 1.00 1.00 44129\n",
|
" 0 1.00 1.00 1.00 7188\n",
|
||||||
" 1 1.00 1.00 1.00 36775\n",
|
" 1 1.00 1.00 1.00 5991\n",
|
||||||
"\n",
|
"\n",
|
||||||
" accuracy 1.00 80904\n",
|
" accuracy 1.00 13179\n",
|
||||||
" macro avg 1.00 1.00 1.00 80904\n",
|
" macro avg 1.00 1.00 1.00 13179\n",
|
||||||
"weighted avg 1.00 1.00 1.00 80904\n",
|
"weighted avg 1.00 1.00 1.00 13179\n",
|
||||||
|
"\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stderr",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
"\n"
|
"\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,13 +25,13 @@ class Config:
|
|||||||
spec_size_threshold = 3
|
spec_size_threshold = 3
|
||||||
|
|
||||||
# rgb模型参数
|
# rgb模型参数
|
||||||
rgb_tobacco_model_path = r"weights/tobacco_dt_2022-08-05_10-38.model"
|
rgb_tobacco_model_path = r"weights/tobacco_dt_2022-08-27_14-43.model"
|
||||||
rgb_background_model_path = r"weights/background_dt_2022-08-22_22-15.model"
|
rgb_background_model_path = r"weights/background_dt_2022-08-22_22-15.model"
|
||||||
threshold_low, threshold_high = 10, 230
|
threshold_low, threshold_high = 10, 230
|
||||||
threshold_s = 190 # 饱和度的最高允许值
|
threshold_s = 190 # 饱和度的最高允许值
|
||||||
rgb_size_threshold = 4 # rgb的尺寸限制
|
rgb_size_threshold = 4 # rgb的尺寸限制
|
||||||
ai_path = 'weights/best0825.pt'
|
ai_path = 'weights/best0827.pt'
|
||||||
ai_conf_threshold = 0.5
|
ai_conf_threshold = 0.6
|
||||||
|
|
||||||
# mask parameter
|
# mask parameter
|
||||||
target_size = (1024, 1024) # (Width, Height) of mask
|
target_size = (1024, 1024) # (Width, Height) of mask
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user