diff --git a/media/Exam Monitoring System v2.v2i.yolov8.zip b/media/Exam Monitoring System v2.v2i.yolov8.zip new file mode 100644 index 0000000000000000000000000000000000000000..f578c3e00c2b91410fa30349a6fdd406788ec24c Binary files /dev/null and b/media/Exam Monitoring System v2.v2i.yolov8.zip differ diff --git a/media/predicttest.py b/media/predicttest.py new file mode 100644 index 0000000000000000000000000000000000000000..3764397eb633065db31dfc3c8358ac7279fde340 --- /dev/null +++ b/media/predicttest.py @@ -0,0 +1,44 @@ +import os + +from ultralytics import YOLO +import cv2 +import matplotlib.pyplot as plt +os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" + +# 加载训练好的模型 +model = YOLO(r'D:\djangoProject\talktive\media\runs\detect\cheating_detection2\weights\best.pt') # 使用训练后保存的模型 + +# 图像路径(替换为你要检测的图像路径) +image_path = r"D:\djangoProject\talktive\media\Exam Monitoring System v2.v2i.yolov8\Dataset\images\test\cheat89_jpg.rf.e8d8fb2e4ed32f2f072672b142f4a3f3.jpg" + +# 运行推理 +results = model.predict(source=image_path, save=False) + +# 显示检测结果 +for result in results: + img = result.orig_img # 原始图像 + boxes = result.boxes.xyxy # 目标框 [x_min, y_min, x_max, y_max] + confidences = result.boxes.conf # 置信度 + classes = result.boxes.cls # 分类索引 + # 加载分类名称(从 data.yaml 中提取类别) + class_names = model.names # 类别名称列表 + # 绘制检测框和分类信息 + for box, confidence, cls in zip(boxes, confidences, classes): + x_min, y_min, x_max, y_max = box + label = f"{class_names[int(cls)]} {confidence:.2f}" + + # 绘制矩形框 + cv2.rectangle(img, (int(x_min), int(y_min)), (int(x_max), int(y_max)), (0, 255, 0), 2) + + # 绘制分类标签 + cv2.putText(img, label, (int(x_min), int(y_min) - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2) + +# 将检测结果显示 +plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB)) +plt.axis('off') +plt.show() + +# 如果需要保存结果图像 +output_path = r"D:\djangoProject\talktive\media\result_image.jpg" +cv2.imwrite(output_path, img) +print(f"结果图像已保存至: {output_path}") diff --git a/media/result_image.jpg b/media/result_image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3dd1446ed57a9d2b3efb229e34b9f9a0e64a62b7 Binary files /dev/null and b/media/result_image.jpg differ diff --git a/media/runs/detect/cheating_detection/args.yaml b/media/runs/detect/cheating_detection/args.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5719c7559cd169a45ea734a172840d8fe3d5d40 --- /dev/null +++ b/media/runs/detect/cheating_detection/args.yaml @@ -0,0 +1,106 @@ +task: detect +mode: train +model: yolov8n.pt +data: D:\djangoProject\talktive\media\Exam Monitoring System v2.v2i.yolov8\Dataset\data.yaml +epochs: 50 +time: null +patience: 100 +batch: 16 +imgsz: 640 +save: true +save_period: -1 +cache: false +device: null +workers: 8 +project: null +name: cheating_detection +exist_ok: false +pretrained: true +optimizer: auto +verbose: true +seed: 0 +deterministic: true +single_cls: false +rect: false +cos_lr: false +close_mosaic: 10 +resume: false +amp: true +fraction: 1.0 +profile: false +freeze: null +multi_scale: false +overlap_mask: true +mask_ratio: 4 +dropout: 0.0 +val: true +split: val +save_json: false +save_hybrid: false +conf: null +iou: 0.7 +max_det: 300 +half: false +dnn: false +plots: true +source: null +vid_stride: 1 +stream_buffer: false +visualize: false +augment: false +agnostic_nms: false +classes: null +retina_masks: false +embed: null +show: false +save_frames: false +save_txt: false +save_conf: false +save_crop: false +show_labels: true +show_conf: true +show_boxes: true +line_width: null +format: torchscript +keras: false +optimize: false +int8: false +dynamic: false +simplify: true +opset: null +workspace: null +nms: false +lr0: 0.01 +lrf: 0.01 +momentum: 0.937 +weight_decay: 0.0005 +warmup_epochs: 3.0 +warmup_momentum: 0.8 +warmup_bias_lr: 0.1 +box: 7.5 +cls: 0.5 +dfl: 1.5 +pose: 12.0 +kobj: 1.0 +nbs: 64 +hsv_h: 0.015 +hsv_s: 0.7 +hsv_v: 0.4 +degrees: 0.0 +translate: 0.1 +scale: 0.5 +shear: 0.0 +perspective: 0.0 +flipud: 0.0 +fliplr: 0.5 +bgr: 0.0 +mosaic: 1.0 +mixup: 0.0 +copy_paste: 0.0 +copy_paste_mode: flip +auto_augment: randaugment +erasing: 0.4 +crop_fraction: 1.0 +cfg: null +tracker: botsort.yaml +save_dir: runs\detect\cheating_detection diff --git a/media/runs/detect/cheating_detection/events.out.tfevents.1733748786.DESKTOP-KM6TDH9.31816.0 b/media/runs/detect/cheating_detection/events.out.tfevents.1733748786.DESKTOP-KM6TDH9.31816.0 new file mode 100644 index 0000000000000000000000000000000000000000..2caa454ead7ffac3d554404cf1b4617adf771b50 Binary files /dev/null and b/media/runs/detect/cheating_detection/events.out.tfevents.1733748786.DESKTOP-KM6TDH9.31816.0 differ diff --git a/media/runs/detect/cheating_detection2/F1_curve.png b/media/runs/detect/cheating_detection2/F1_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..f56982d7197be729a3363f89b9916dde39f6873f Binary files /dev/null and b/media/runs/detect/cheating_detection2/F1_curve.png differ diff --git a/media/runs/detect/cheating_detection2/PR_curve.png b/media/runs/detect/cheating_detection2/PR_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..9c5d2d3738b671c31dbecfd0049ee6f05ef3cd95 Binary files /dev/null and b/media/runs/detect/cheating_detection2/PR_curve.png differ diff --git a/media/runs/detect/cheating_detection2/P_curve.png b/media/runs/detect/cheating_detection2/P_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..ef5508c15ae3daec5e0843cbee364dea4590d427 Binary files /dev/null and b/media/runs/detect/cheating_detection2/P_curve.png differ diff --git a/media/runs/detect/cheating_detection2/R_curve.png b/media/runs/detect/cheating_detection2/R_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..c90ef6ad0660a5358a31e97f9eb98a04906bd193 Binary files /dev/null and b/media/runs/detect/cheating_detection2/R_curve.png differ diff --git a/media/runs/detect/cheating_detection2/args.yaml b/media/runs/detect/cheating_detection2/args.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1e3c700da37239a4b085e70bad11afe42d3f7d33 --- /dev/null +++ b/media/runs/detect/cheating_detection2/args.yaml @@ -0,0 +1,106 @@ +task: detect +mode: train +model: yolov8n.pt +data: D:\djangoProject\talktive\media\Exam Monitoring System v2.v2i.yolov8\Dataset\data.yaml +epochs: 50 +time: null +patience: 100 +batch: 16 +imgsz: 640 +save: true +save_period: -1 +cache: false +device: null +workers: 8 +project: null +name: cheating_detection2 +exist_ok: false +pretrained: true +optimizer: auto +verbose: true +seed: 0 +deterministic: true +single_cls: false +rect: false +cos_lr: false +close_mosaic: 10 +resume: false +amp: true +fraction: 1.0 +profile: false +freeze: null +multi_scale: false +overlap_mask: true +mask_ratio: 4 +dropout: 0.0 +val: true +split: val +save_json: false +save_hybrid: false +conf: null +iou: 0.7 +max_det: 300 +half: false +dnn: false +plots: true +source: null +vid_stride: 1 +stream_buffer: false +visualize: false +augment: false +agnostic_nms: false +classes: null +retina_masks: false +embed: null +show: false +save_frames: false +save_txt: false +save_conf: false +save_crop: false +show_labels: true +show_conf: true +show_boxes: true +line_width: null +format: torchscript +keras: false +optimize: false +int8: false +dynamic: false +simplify: true +opset: null +workspace: null +nms: false +lr0: 0.01 +lrf: 0.01 +momentum: 0.937 +weight_decay: 0.0005 +warmup_epochs: 3.0 +warmup_momentum: 0.8 +warmup_bias_lr: 0.1 +box: 7.5 +cls: 0.5 +dfl: 1.5 +pose: 12.0 +kobj: 1.0 +nbs: 64 +hsv_h: 0.015 +hsv_s: 0.7 +hsv_v: 0.4 +degrees: 0.0 +translate: 0.1 +scale: 0.5 +shear: 0.0 +perspective: 0.0 +flipud: 0.0 +fliplr: 0.5 +bgr: 0.0 +mosaic: 1.0 +mixup: 0.0 +copy_paste: 0.0 +copy_paste_mode: flip +auto_augment: randaugment +erasing: 0.4 +crop_fraction: 1.0 +cfg: null +tracker: botsort.yaml +save_dir: runs\detect\cheating_detection2 diff --git a/media/runs/detect/cheating_detection2/confusion_matrix.png b/media/runs/detect/cheating_detection2/confusion_matrix.png new file mode 100644 index 0000000000000000000000000000000000000000..ad9c56c90975517d24c51218e8952a725833d09c Binary files /dev/null and b/media/runs/detect/cheating_detection2/confusion_matrix.png differ diff --git a/media/runs/detect/cheating_detection2/confusion_matrix_normalized.png b/media/runs/detect/cheating_detection2/confusion_matrix_normalized.png new file mode 100644 index 0000000000000000000000000000000000000000..85c3c7a73ba60f5450f6ff04790792e9d781cb43 Binary files /dev/null and b/media/runs/detect/cheating_detection2/confusion_matrix_normalized.png differ diff --git a/media/runs/detect/cheating_detection2/events.out.tfevents.1733748906.DESKTOP-KM6TDH9.35712.0 b/media/runs/detect/cheating_detection2/events.out.tfevents.1733748906.DESKTOP-KM6TDH9.35712.0 new file mode 100644 index 0000000000000000000000000000000000000000..fbc1cfef8133c85797da892b97c144be04da3416 Binary files /dev/null and b/media/runs/detect/cheating_detection2/events.out.tfevents.1733748906.DESKTOP-KM6TDH9.35712.0 differ diff --git a/media/runs/detect/cheating_detection2/labels.jpg b/media/runs/detect/cheating_detection2/labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..91f6a0b356676d6d5a6664468c22d164c1d13dd5 Binary files /dev/null and b/media/runs/detect/cheating_detection2/labels.jpg differ diff --git a/media/runs/detect/cheating_detection2/labels_correlogram.jpg b/media/runs/detect/cheating_detection2/labels_correlogram.jpg new file mode 100644 index 0000000000000000000000000000000000000000..78e1979a7b1032db69d0aeb7d057e5667fe208c0 Binary files /dev/null and b/media/runs/detect/cheating_detection2/labels_correlogram.jpg differ diff --git a/media/runs/detect/cheating_detection2/results.csv b/media/runs/detect/cheating_detection2/results.csv new file mode 100644 index 0000000000000000000000000000000000000000..da7932d94dd0a2e00d3a6e9cacb4150f3f971fb6 --- /dev/null +++ b/media/runs/detect/cheating_detection2/results.csv @@ -0,0 +1,51 @@ +epoch,time,train/box_loss,train/cls_loss,train/dfl_loss,metrics/precision(B),metrics/recall(B),metrics/mAP50(B),metrics/mAP50-95(B),val/box_loss,val/cls_loss,val/dfl_loss,lr/pg0,lr/pg1,lr/pg2 +1,639.109,1.16253,2.32974,1.58175,0.36262,0.58886,0.39008,0.20331,1.48105,2.73797,2.22485,0.000550615,0.000550615,0.000550615 +2,1421.08,1.20841,2.01943,1.61389,0.39202,0.41821,0.30551,0.13346,1.88727,2.59323,2.56141,0.00108438,0.00108438,0.00108438 +3,2055.86,1.21758,1.91712,1.62325,0.10393,0.32994,0.10506,0.03807,2.03512,3.12661,2.69645,0.00159614,0.00159614,0.00159614 +4,2817.67,1.24852,1.81542,1.62925,0.35933,0.60274,0.37701,0.20612,1.54359,2.19496,2.09953,0.00156798,0.00156798,0.00156798 +5,3564.95,1.21343,1.77373,1.60271,0.4528,0.55972,0.46812,0.2312,1.64287,2.12126,2.22638,0.00153497,0.00153497,0.00153497 +6,4358.55,1.20698,1.7317,1.59825,0.31051,0.62163,0.39598,0.22715,1.43954,1.90207,2.00631,0.00150197,0.00150197,0.00150197 +7,5112.22,1.16978,1.67846,1.56051,0.36355,0.6533,0.39247,0.20796,1.48391,1.95578,2.05089,0.00146896,0.00146896,0.00146896 +8,5815.8,1.14275,1.62488,1.54818,0.47527,0.6163,0.5299,0.29769,1.46132,1.78036,2.06285,0.00143595,0.00143595,0.00143595 +9,6176.12,1.12806,1.57136,1.52554,0.60656,0.56787,0.56807,0.33401,1.34845,1.52594,1.91886,0.00140295,0.00140295,0.00140295 +10,6776.74,1.09713,1.54176,1.50917,0.5247,0.58161,0.53615,0.31784,1.39295,1.69307,1.98164,0.00136994,0.00136994,0.00136994 +11,7489.38,1.08747,1.51524,1.51046,0.54052,0.60282,0.59187,0.34602,1.42075,1.62882,1.96273,0.00133693,0.00133693,0.00133693 +12,8278.27,1.08003,1.48806,1.50491,0.52848,0.70056,0.61772,0.37657,1.35358,1.56615,1.91765,0.00130393,0.00130393,0.00130393 +13,8653.13,1.05363,1.45773,1.4821,0.51862,0.6608,0.61248,0.38048,1.26138,1.48805,1.7983,0.00127092,0.00127092,0.00127092 +14,8999.26,1.04084,1.42386,1.4626,0.4991,0.62508,0.58977,0.35728,1.29542,1.4211,1.81972,0.00123791,0.00123791,0.00123791 +15,9423.32,1.03222,1.40611,1.44884,0.48692,0.71766,0.57694,0.35621,1.25889,1.55823,1.79956,0.00120491,0.00120491,0.00120491 +16,9755.3,1.02284,1.37995,1.44405,0.55004,0.60567,0.61514,0.36493,1.27351,1.43737,1.77348,0.0011719,0.0011719,0.0011719 +17,10089.1,1.00785,1.35399,1.4292,0.59991,0.67743,0.65397,0.43301,1.17607,1.3119,1.70994,0.00113889,0.00113889,0.00113889 +18,10422.5,0.98409,1.30894,1.41828,0.65182,0.6652,0.67832,0.43105,1.26132,1.35665,1.80925,0.00110589,0.00110589,0.00110589 +19,10773.1,1.00001,1.33195,1.4379,0.63602,0.63197,0.67878,0.44716,1.14665,1.3097,1.66321,0.00107288,0.00107288,0.00107288 +20,11112.5,0.95826,1.26172,1.40447,0.56092,0.74948,0.70789,0.46479,1.19422,1.23249,1.71891,0.00103987,0.00103987,0.00103987 +21,11433,0.96205,1.29294,1.41126,0.57727,0.69702,0.65626,0.44309,1.13498,1.42401,1.6603,0.00100687,0.00100687,0.00100687 +22,11753.1,0.96719,1.24136,1.40659,0.58513,0.67489,0.65575,0.42374,1.17063,1.28523,1.69949,0.000973861,0.000973861,0.000973861 +23,12071.9,0.95915,1.25014,1.38995,0.62729,0.64748,0.6602,0.43424,1.19056,1.32771,1.72435,0.000940855,0.000940855,0.000940855 +24,12391.6,0.93786,1.19965,1.38352,0.63951,0.71254,0.71291,0.48149,1.15561,1.22148,1.67622,0.000907848,0.000907848,0.000907848 +25,12724.2,0.92026,1.19109,1.36434,0.60276,0.75315,0.72149,0.48636,1.13613,1.2109,1.6425,0.000874842,0.000874842,0.000874842 +26,13370.8,0.92342,1.18788,1.37134,0.62565,0.71348,0.7303,0.49178,1.0941,1.22129,1.58843,0.000841835,0.000841835,0.000841835 +27,13864.1,0.89164,1.14068,1.34795,0.65268,0.71655,0.73322,0.49702,1.11495,1.19188,1.62798,0.000808828,0.000808828,0.000808828 +28,14169.3,0.89838,1.12926,1.34876,0.67025,0.67006,0.71258,0.47775,1.15051,1.22629,1.67255,0.000775822,0.000775822,0.000775822 +29,14472.1,0.91111,1.12713,1.35471,0.66955,0.72649,0.75129,0.51756,1.11111,1.16753,1.62237,0.000742815,0.000742815,0.000742815 +30,14772.1,0.8838,1.0992,1.3363,0.716,0.65877,0.7562,0.52372,1.09396,1.11714,1.56875,0.000709809,0.000709809,0.000709809 +31,15085.6,0.89948,1.1343,1.3453,0.6888,0.71395,0.74962,0.51637,1.10692,1.09623,1.6198,0.000676802,0.000676802,0.000676802 +32,15402.9,0.89218,1.09933,1.34417,0.69764,0.69906,0.77061,0.53572,1.08602,1.12066,1.6037,0.000643795,0.000643795,0.000643795 +33,15703.6,0.88169,1.08801,1.34878,0.69787,0.74028,0.77807,0.54009,1.10059,1.08764,1.63802,0.000610789,0.000610789,0.000610789 +34,16004,0.85646,1.07275,1.32343,0.74755,0.75493,0.78349,0.54638,1.0897,1.03593,1.60778,0.000577782,0.000577782,0.000577782 +35,16304.6,0.85895,1.03842,1.32642,0.6987,0.7786,0.79596,0.564,1.08445,1.0055,1.60434,0.000544776,0.000544776,0.000544776 +36,16604.1,0.83874,1.03418,1.315,0.69209,0.80257,0.79108,0.55182,1.07589,1.01683,1.59286,0.000511769,0.000511769,0.000511769 +37,16907.5,0.83993,1.01878,1.30998,0.68888,0.80059,0.80213,0.5558,1.07426,1.01993,1.57895,0.000478762,0.000478762,0.000478762 +38,17226.2,0.84265,1.0085,1.30719,0.62673,0.79835,0.76517,0.53967,1.03841,1.10209,1.55209,0.000445756,0.000445756,0.000445756 +39,17557.6,0.81644,0.97265,1.2874,0.73486,0.76152,0.80056,0.57418,1.03889,1.004,1.55183,0.000412749,0.000412749,0.000412749 +40,17859.9,0.80413,0.96964,1.29032,0.77999,0.74498,0.82195,0.59972,1.02019,0.93793,1.53949,0.000379743,0.000379743,0.000379743 +41,18155.4,0.74572,0.80967,1.33548,0.78706,0.7443,0.81979,0.57891,1.03347,0.96507,1.53764,0.000346736,0.000346736,0.000346736 +42,18451.6,0.72677,0.74964,1.31189,0.79768,0.73495,0.82444,0.59117,0.98106,0.95091,1.50161,0.000313729,0.000313729,0.000313729 +43,18747.5,0.70991,0.72669,1.29491,0.77283,0.77746,0.83213,0.59566,1.00596,0.92655,1.53401,0.000280723,0.000280723,0.000280723 +44,19042.8,0.69549,0.68788,1.28546,0.79202,0.77755,0.83588,0.58698,1.04003,0.94353,1.56709,0.000247716,0.000247716,0.000247716 +45,19340.9,0.67062,0.66276,1.25696,0.80293,0.72773,0.81868,0.59892,0.99037,0.93398,1.50084,0.00021471,0.00021471,0.00021471 +46,19655.4,0.6626,0.65754,1.25074,0.79316,0.76095,0.83537,0.59663,1.01021,0.94092,1.52533,0.000181703,0.000181703,0.000181703 +47,19985.2,0.64621,0.63157,1.24392,0.78737,0.7649,0.84121,0.60202,1.01985,0.93051,1.53593,0.000148696,0.000148696,0.000148696 +48,20278.8,0.64487,0.62206,1.2275,0.7671,0.79969,0.83884,0.60252,1.00651,0.93488,1.52197,0.00011569,0.00011569,0.00011569 +49,20572.8,0.64059,0.60144,1.22924,0.80202,0.7736,0.84394,0.60744,0.99655,0.91834,1.51204,8.26832e-05,8.26832e-05,8.26832e-05 +50,20866.6,0.63115,0.59067,1.22535,0.79013,0.79242,0.8462,0.60795,1.00416,0.90373,1.52518,4.96766e-05,4.96766e-05,4.96766e-05 diff --git a/media/runs/detect/cheating_detection2/results.png b/media/runs/detect/cheating_detection2/results.png new file mode 100644 index 0000000000000000000000000000000000000000..df6a6620699be1a73bb254f90b2ec0b88a8b2abc Binary files /dev/null and b/media/runs/detect/cheating_detection2/results.png differ diff --git a/media/runs/detect/cheating_detection2/train_batch0.jpg b/media/runs/detect/cheating_detection2/train_batch0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..63897a3bfdc8f4345c509519f4e776bebbc110a9 Binary files /dev/null and b/media/runs/detect/cheating_detection2/train_batch0.jpg differ diff --git a/media/runs/detect/cheating_detection2/train_batch1.jpg b/media/runs/detect/cheating_detection2/train_batch1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..259e52718673fbf9c6ce10f20a4b8e41ed23f2a0 Binary files /dev/null and b/media/runs/detect/cheating_detection2/train_batch1.jpg differ diff --git a/media/runs/detect/cheating_detection2/train_batch2.jpg b/media/runs/detect/cheating_detection2/train_batch2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cb4d16e606f3096fef9242845cea839245bedc04 Binary files /dev/null and b/media/runs/detect/cheating_detection2/train_batch2.jpg differ diff --git a/media/runs/detect/cheating_detection2/train_batch4400.jpg b/media/runs/detect/cheating_detection2/train_batch4400.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1fa4347fdee37da226232444ec1fa19773df951a Binary files /dev/null and b/media/runs/detect/cheating_detection2/train_batch4400.jpg differ diff --git a/media/runs/detect/cheating_detection2/train_batch4401.jpg b/media/runs/detect/cheating_detection2/train_batch4401.jpg new file mode 100644 index 0000000000000000000000000000000000000000..364b6838f75cccf2b5f9b454cd37bd324b2279a8 Binary files /dev/null and b/media/runs/detect/cheating_detection2/train_batch4401.jpg differ diff --git a/media/runs/detect/cheating_detection2/train_batch4402.jpg b/media/runs/detect/cheating_detection2/train_batch4402.jpg new file mode 100644 index 0000000000000000000000000000000000000000..914687e6f42624fd8bbe0017bc27c2b3939ed318 Binary files /dev/null and b/media/runs/detect/cheating_detection2/train_batch4402.jpg differ diff --git a/media/runs/detect/cheating_detection2/val_batch0_labels.jpg b/media/runs/detect/cheating_detection2/val_batch0_labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2b747719c81a06dbfce34bc3d3ce7d715138d3ce Binary files /dev/null and b/media/runs/detect/cheating_detection2/val_batch0_labels.jpg differ diff --git a/media/runs/detect/cheating_detection2/val_batch0_pred.jpg b/media/runs/detect/cheating_detection2/val_batch0_pred.jpg new file mode 100644 index 0000000000000000000000000000000000000000..38b6a754db7e03d1d1f8f1bff842e11ffc4db1fa Binary files /dev/null and b/media/runs/detect/cheating_detection2/val_batch0_pred.jpg differ diff --git a/media/runs/detect/cheating_detection2/val_batch1_labels.jpg b/media/runs/detect/cheating_detection2/val_batch1_labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..360aecd006cddaaf47ab300fa879397056014037 Binary files /dev/null and b/media/runs/detect/cheating_detection2/val_batch1_labels.jpg differ diff --git a/media/runs/detect/cheating_detection2/val_batch1_pred.jpg b/media/runs/detect/cheating_detection2/val_batch1_pred.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5781429e0ac60297d476ef6dbb83978292a45e45 Binary files /dev/null and b/media/runs/detect/cheating_detection2/val_batch1_pred.jpg differ diff --git a/media/runs/detect/cheating_detection2/val_batch2_labels.jpg b/media/runs/detect/cheating_detection2/val_batch2_labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8840778e0a5bdc8b2dda547b3e98d1cf987dc9a9 Binary files /dev/null and b/media/runs/detect/cheating_detection2/val_batch2_labels.jpg differ diff --git a/media/runs/detect/cheating_detection2/val_batch2_pred.jpg b/media/runs/detect/cheating_detection2/val_batch2_pred.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1c616659eab163db17969d36449e44ebc7419178 Binary files /dev/null and b/media/runs/detect/cheating_detection2/val_batch2_pred.jpg differ diff --git a/media/runs/detect/cheating_detection2/weights/best.pt b/media/runs/detect/cheating_detection2/weights/best.pt new file mode 100644 index 0000000000000000000000000000000000000000..85678190e4129d8747718ab8b32cb9a07c6cdc67 Binary files /dev/null and b/media/runs/detect/cheating_detection2/weights/best.pt differ diff --git a/media/runs/detect/cheating_detection2/weights/last.pt b/media/runs/detect/cheating_detection2/weights/last.pt new file mode 100644 index 0000000000000000000000000000000000000000..2b4515a68e9a91fb6248a9a3549c438fbf54b714 Binary files /dev/null and b/media/runs/detect/cheating_detection2/weights/last.pt differ diff --git a/media/runs/detect/cheating_detection22/F1_curve.png b/media/runs/detect/cheating_detection22/F1_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..f56982d7197be729a3363f89b9916dde39f6873f Binary files /dev/null and b/media/runs/detect/cheating_detection22/F1_curve.png differ diff --git a/media/runs/detect/cheating_detection22/PR_curve.png b/media/runs/detect/cheating_detection22/PR_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..9c5d2d3738b671c31dbecfd0049ee6f05ef3cd95 Binary files /dev/null and b/media/runs/detect/cheating_detection22/PR_curve.png differ diff --git a/media/runs/detect/cheating_detection22/P_curve.png b/media/runs/detect/cheating_detection22/P_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..ef5508c15ae3daec5e0843cbee364dea4590d427 Binary files /dev/null and b/media/runs/detect/cheating_detection22/P_curve.png differ diff --git a/media/runs/detect/cheating_detection22/R_curve.png b/media/runs/detect/cheating_detection22/R_curve.png new file mode 100644 index 0000000000000000000000000000000000000000..c90ef6ad0660a5358a31e97f9eb98a04906bd193 Binary files /dev/null and b/media/runs/detect/cheating_detection22/R_curve.png differ diff --git a/media/runs/detect/cheating_detection22/confusion_matrix.png b/media/runs/detect/cheating_detection22/confusion_matrix.png new file mode 100644 index 0000000000000000000000000000000000000000..ad9c56c90975517d24c51218e8952a725833d09c Binary files /dev/null and b/media/runs/detect/cheating_detection22/confusion_matrix.png differ diff --git a/media/runs/detect/cheating_detection22/confusion_matrix_normalized.png b/media/runs/detect/cheating_detection22/confusion_matrix_normalized.png new file mode 100644 index 0000000000000000000000000000000000000000..85c3c7a73ba60f5450f6ff04790792e9d781cb43 Binary files /dev/null and b/media/runs/detect/cheating_detection22/confusion_matrix_normalized.png differ diff --git a/media/runs/detect/cheating_detection22/val_batch0_labels.jpg b/media/runs/detect/cheating_detection22/val_batch0_labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2b747719c81a06dbfce34bc3d3ce7d715138d3ce Binary files /dev/null and b/media/runs/detect/cheating_detection22/val_batch0_labels.jpg differ diff --git a/media/runs/detect/cheating_detection22/val_batch0_pred.jpg b/media/runs/detect/cheating_detection22/val_batch0_pred.jpg new file mode 100644 index 0000000000000000000000000000000000000000..38b6a754db7e03d1d1f8f1bff842e11ffc4db1fa Binary files /dev/null and b/media/runs/detect/cheating_detection22/val_batch0_pred.jpg differ diff --git a/media/runs/detect/cheating_detection22/val_batch1_labels.jpg b/media/runs/detect/cheating_detection22/val_batch1_labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f8602e5b298c53e9bb76003ee69f633b3b495574 Binary files /dev/null and b/media/runs/detect/cheating_detection22/val_batch1_labels.jpg differ diff --git a/media/runs/detect/cheating_detection22/val_batch1_pred.jpg b/media/runs/detect/cheating_detection22/val_batch1_pred.jpg new file mode 100644 index 0000000000000000000000000000000000000000..80dabdb79e5e2bf3c0c798fd4e6288db908c1c38 Binary files /dev/null and b/media/runs/detect/cheating_detection22/val_batch1_pred.jpg differ diff --git a/media/runs/detect/cheating_detection22/val_batch2_labels.jpg b/media/runs/detect/cheating_detection22/val_batch2_labels.jpg new file mode 100644 index 0000000000000000000000000000000000000000..360aecd006cddaaf47ab300fa879397056014037 Binary files /dev/null and b/media/runs/detect/cheating_detection22/val_batch2_labels.jpg differ diff --git a/media/runs/detect/cheating_detection22/val_batch2_pred.jpg b/media/runs/detect/cheating_detection22/val_batch2_pred.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5781429e0ac60297d476ef6dbb83978292a45e45 Binary files /dev/null and b/media/runs/detect/cheating_detection22/val_batch2_pred.jpg differ diff --git a/media/training.py b/media/training.py new file mode 100644 index 0000000000000000000000000000000000000000..3944928f42abf4022732242505d78062dc8337b0 --- /dev/null +++ b/media/training.py @@ -0,0 +1,27 @@ +from ultralytics import YOLO +import os +os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" + +# 数据集路径和配置文件 +yaml_path = r"D:\djangoProject\talktive\media\Exam Monitoring System v2.v2i.yolov8\Dataset\data.yaml" + +# 初始化模型 (预训练权重) +model = YOLO('yolov8n.pt') # 使用 YOLOv8n 的预训练权重 + +# 开始训练 +model.train( + data=yaml_path, # YAML 配置文件路径 + epochs=50, # 训练轮数 + imgsz=640, # 输入图像大小 + batch=16, # 每批训练数据量 + name='cheating_detection' # 模型保存名称 +) + +# 打印验证报告 +print("Validation Report:") +metrics = model.val() # 运行验证 +for key, value in metrics.items(): + print(f"{key}: {value}") + +# 如果需要导出训练好的模型 +model.export(format='onnx') # 导出为 ONNX 格式(可选) diff --git a/media/yolov8n.pt b/media/yolov8n.pt new file mode 100644 index 0000000000000000000000000000000000000000..0db4ca4b4d25d68a4497220353592645ca4f71bf Binary files /dev/null and b/media/yolov8n.pt differ