diff --git a/demo.py b/demo.py deleted file mode 100644 index f01c4f1..0000000 --- a/demo.py +++ /dev/null @@ -1,53 +0,0 @@ -from ultralytics import YOLO -# from ultralytics.yolo.utils.benchmarks import benchmark 。 -import cv2 - -# Load a model -# model = YOLO("yolov8n.yaml") # build a new model from scratch -model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training) - -# Use the model -# model.train(data="coco128.yaml", epochs=3,workers=0) # train the model,workers=0 if windows -# metrics = model.val() # evaluate model performance on the validation set -''' -results = model("bus.jpg") # predict on an image -print(results) -# ''' -img_path = "./image/" -# results = model.predict(img_path, save=True,conf=0.5) # device=0 by default, conf:置信度阈值 -# results = model.predict(img_path,save=True,classes=[0,2],conf=0.5) # i.e. classes=0,classes=[0,3,4] - -# save detection results * -# results = model.predict(img_path,save=True,save_txt=True,classes=0,conf=0.4) - - - -# predict video -video_path = "./video/1.mp4" -cap = cv2.VideoCapture(0) - -# Loop through the video frames -while cap.isOpened(): - # Read a frame from the video - success, frame = cap.read() - - if success: - # Run YOLOv8 inference on the frame - results = model(frame) - - # Visualize the results on the frame - annotated_frame = results[0].plot() - - # Display the annotated frame - cv2.imshow("YOLOv8 Inference", annotated_frame) - - # Break the loop if 'q' is pressed - if cv2.waitKey(1) & 0xFF == ord("q"): - break - else: - # Break the loop if the end of the video is reached - break - -# Release the video capture object and close the display window -cap.release() -cv2.destroyAllWindows() diff --git a/detect_image.py b/detect_image.py new file mode 100644 index 0000000..e69de29 diff --git a/detect_video.py b/detect_video.py new file mode 100644 index 0000000..e69de29 diff --git a/image/182786930_7ea28fa4e5_b.jpg b/image/182786930_7ea28fa4e5_b.jpg new file mode 100644 index 0000000..04ec654 Binary files /dev/null and b/image/182786930_7ea28fa4e5_b.jpg differ diff --git a/image/19749927709_0fc8e147f4_c.jpg b/image/19749927709_0fc8e147f4_c.jpg new file mode 100644 index 0000000..6ede502 Binary files /dev/null and b/image/19749927709_0fc8e147f4_c.jpg differ diff --git a/image/1_3B491ZMKZXn_8wNZzzmLjw.png b/image/1_3B491ZMKZXn_8wNZzzmLjw.png new file mode 100644 index 0000000..88dcf81 Binary files /dev/null and b/image/1_3B491ZMKZXn_8wNZzzmLjw.png differ diff --git a/image/2216426419_5ecce6a9b7_b.jpg b/image/2216426419_5ecce6a9b7_b.jpg new file mode 100644 index 0000000..c4491ac Binary files /dev/null and b/image/2216426419_5ecce6a9b7_b.jpg differ diff --git a/image/2216427485_4ab4a0ab15_b.jpg b/image/2216427485_4ab4a0ab15_b.jpg new file mode 100644 index 0000000..683ad81 Binary files /dev/null and b/image/2216427485_4ab4a0ab15_b.jpg differ diff --git a/image/26042575973_bec0ee4ed3_c.jpg b/image/26042575973_bec0ee4ed3_c.jpg new file mode 100644 index 0000000..24f84de Binary files /dev/null and b/image/26042575973_bec0ee4ed3_c.jpg differ diff --git a/image/262351090_cce46a3aaf_b.jpg b/image/262351090_cce46a3aaf_b.jpg new file mode 100644 index 0000000..610729f Binary files /dev/null and b/image/262351090_cce46a3aaf_b.jpg differ diff --git a/image/262351090_cce46a3aaf_c.jpg b/image/262351090_cce46a3aaf_c.jpg new file mode 100644 index 0000000..d2e0fda Binary files /dev/null and b/image/262351090_cce46a3aaf_c.jpg differ diff --git a/image/2637982077_a3eae26779.jpg b/image/2637982077_a3eae26779.jpg new file mode 100644 index 0000000..0dfb4ee Binary files /dev/null and b/image/2637982077_a3eae26779.jpg differ diff --git a/image/26580716151_231617fa62_c.jpg b/image/26580716151_231617fa62_c.jpg new file mode 100644 index 0000000..daab5e7 Binary files /dev/null and b/image/26580716151_231617fa62_c.jpg differ diff --git a/image/3141147409_a21cf55a3f_b.jpg b/image/3141147409_a21cf55a3f_b.jpg new file mode 100644 index 0000000..6109c1e Binary files /dev/null and b/image/3141147409_a21cf55a3f_b.jpg differ diff --git a/image/3141148575_fa707caa51_b.jpg b/image/3141148575_fa707caa51_b.jpg new file mode 100644 index 0000000..4911681 Binary files /dev/null and b/image/3141148575_fa707caa51_b.jpg differ diff --git a/image/3192850778_a357a8c4eb_b.jpg b/image/3192850778_a357a8c4eb_b.jpg new file mode 100644 index 0000000..c866ccd Binary files /dev/null and b/image/3192850778_a357a8c4eb_b.jpg differ diff --git a/image/3248900478_6c4a6820f7_c.jpg b/image/3248900478_6c4a6820f7_c.jpg new file mode 100644 index 0000000..929b056 Binary files /dev/null and b/image/3248900478_6c4a6820f7_c.jpg differ diff --git a/image/345056969_e9cdec3f5b_b.jpg b/image/345056969_e9cdec3f5b_b.jpg new file mode 100644 index 0000000..c0345c6 Binary files /dev/null and b/image/345056969_e9cdec3f5b_b.jpg differ diff --git a/image/3790917644_1439edce15_b.jpg b/image/3790917644_1439edce15_b.jpg new file mode 100644 index 0000000..c2696f4 Binary files /dev/null and b/image/3790917644_1439edce15_b.jpg differ diff --git a/image/3790917644_1439edce15_c.jpg b/image/3790917644_1439edce15_c.jpg new file mode 100644 index 0000000..02e1fed Binary files /dev/null and b/image/3790917644_1439edce15_c.jpg differ diff --git a/image/391652196_caa374fa66_c.jpg b/image/391652196_caa374fa66_c.jpg new file mode 100644 index 0000000..320cfe5 Binary files /dev/null and b/image/391652196_caa374fa66_c.jpg differ diff --git a/image/4032144165_ae06416f49_b.jpg b/image/4032144165_ae06416f49_b.jpg new file mode 100644 index 0000000..f50ca5f Binary files /dev/null and b/image/4032144165_ae06416f49_b.jpg differ diff --git a/image/4032144629_74fccbaa55_b.jpg b/image/4032144629_74fccbaa55_b.jpg new file mode 100644 index 0000000..79ff2ec Binary files /dev/null and b/image/4032144629_74fccbaa55_b.jpg differ diff --git a/image/443608310_c7a2c5c461_b.jpg b/image/443608310_c7a2c5c461_b.jpg new file mode 100644 index 0000000..5113050 Binary files /dev/null and b/image/443608310_c7a2c5c461_b.jpg differ diff --git a/image/443608310_c7a2c5c461_c.jpg b/image/443608310_c7a2c5c461_c.jpg new file mode 100644 index 0000000..7b6030c Binary files /dev/null and b/image/443608310_c7a2c5c461_c.jpg differ diff --git a/image/4438771159_d7534ae13e_b.jpg b/image/4438771159_d7534ae13e_b.jpg new file mode 100644 index 0000000..b3da470 Binary files /dev/null and b/image/4438771159_d7534ae13e_b.jpg differ diff --git a/image/45417730904_0ca22a249b_c.jpg b/image/45417730904_0ca22a249b_c.jpg new file mode 100644 index 0000000..344d278 Binary files /dev/null and b/image/45417730904_0ca22a249b_c.jpg differ diff --git a/image/4576880057_1da8f15531_c.jpg b/image/4576880057_1da8f15531_c.jpg new file mode 100644 index 0000000..08a11f3 Binary files /dev/null and b/image/4576880057_1da8f15531_c.jpg differ diff --git a/image/4590208246_9fe6b3ba4e_b.jpg b/image/4590208246_9fe6b3ba4e_b.jpg new file mode 100644 index 0000000..be4dcc7 Binary files /dev/null and b/image/4590208246_9fe6b3ba4e_b.jpg differ diff --git a/image/5080604905_a3fa44daa2_c.jpg b/image/5080604905_a3fa44daa2_c.jpg new file mode 100644 index 0000000..37a2ca3 Binary files /dev/null and b/image/5080604905_a3fa44daa2_c.jpg differ diff --git a/image/517635286_226efba7b5_z.jpg b/image/517635286_226efba7b5_z.jpg new file mode 100644 index 0000000..8c1b2f9 Binary files /dev/null and b/image/517635286_226efba7b5_z.jpg differ diff --git a/image/52919232835_7efa5ba569_c.jpg b/image/52919232835_7efa5ba569_c.jpg new file mode 100644 index 0000000..e9d5c02 Binary files /dev/null and b/image/52919232835_7efa5ba569_c.jpg differ diff --git a/image/5345628611_c298fc968b_c.jpg b/image/5345628611_c298fc968b_c.jpg new file mode 100644 index 0000000..ee101b8 Binary files /dev/null and b/image/5345628611_c298fc968b_c.jpg differ diff --git a/image/5348993466_40cde6a06d_c.jpg b/image/5348993466_40cde6a06d_c.jpg new file mode 100644 index 0000000..dce9575 Binary files /dev/null and b/image/5348993466_40cde6a06d_c.jpg differ diff --git a/image/5751900082_3b019aa0f3_c.jpg b/image/5751900082_3b019aa0f3_c.jpg new file mode 100644 index 0000000..ef5c665 Binary files /dev/null and b/image/5751900082_3b019aa0f3_c.jpg differ diff --git a/image/6324133464_9605f83c27_c.jpg b/image/6324133464_9605f83c27_c.jpg new file mode 100644 index 0000000..349bb86 Binary files /dev/null and b/image/6324133464_9605f83c27_c.jpg differ diff --git a/image/6364195427_0dca317ef3_c.jpg b/image/6364195427_0dca317ef3_c.jpg new file mode 100644 index 0000000..8156dc1 Binary files /dev/null and b/image/6364195427_0dca317ef3_c.jpg differ diff --git a/image/7454489180_bf2aeb87de_c.jpg b/image/7454489180_bf2aeb87de_c.jpg new file mode 100644 index 0000000..660a2f5 Binary files /dev/null and b/image/7454489180_bf2aeb87de_c.jpg differ diff --git a/image/FIKXSKACURH2DK7M6K6QTPZN5U.jpg b/image/FIKXSKACURH2DK7M6K6QTPZN5U.jpg new file mode 100644 index 0000000..3df46b6 Binary files /dev/null and b/image/FIKXSKACURH2DK7M6K6QTPZN5U.jpg differ diff --git a/image/maxresdefault.jpg b/image/maxresdefault.jpg new file mode 100644 index 0000000..1814bc0 Binary files /dev/null and b/image/maxresdefault.jpg differ diff --git a/image/rubikscube-2048px-08408.jpg b/image/rubikscube-2048px-08408.jpg new file mode 100644 index 0000000..45a9d37 Binary files /dev/null and b/image/rubikscube-2048px-08408.jpg differ diff --git a/train.py b/train.py new file mode 100644 index 0000000..e69de29 diff --git a/yolov8n.pt b/yolov8n.pt new file mode 100644 index 0000000..d61ef50 Binary files /dev/null and b/yolov8n.pt differ