nakamura196 commited on
Commit
c485cb0
β€’
1 Parent(s): 70f3d19

feat: add config

Browse files
Files changed (4) hide show
  1. .gitignore +3 -0
  2. 01_predict.ipynb +73 -0
  3. config.json +8 -0
  4. requirements.txt +2 -0
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ .DS_Store
2
+ .venv
3
+ yolov8n.pt
01_predict.ipynb ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 4,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "from ultralyticsplus import YOLO, render_result\n",
10
+ "import cv2"
11
+ ]
12
+ },
13
+ {
14
+ "cell_type": "code",
15
+ "execution_count": 10,
16
+ "metadata": {},
17
+ "outputs": [
18
+ {
19
+ "name": "stdout",
20
+ "output_type": "stream",
21
+ "text": [
22
+ "Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to 'yolov8n.pt'...\n"
23
+ ]
24
+ },
25
+ {
26
+ "name": "stderr",
27
+ "output_type": "stream",
28
+ "text": [
29
+ "100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 6.23M/6.23M [00:00<00:00, 40.2MB/s]\n"
30
+ ]
31
+ }
32
+ ],
33
+ "source": [
34
+ "# load model\n",
35
+ "model = YOLO('nakamura196/yolov8s-layout-detection')\n",
36
+ "\n",
37
+ "# set model parameters\n",
38
+ "model.overrides['conf'] = 0.25 # NMS confidence threshold\n",
39
+ "model.overrides['iou'] = 0.45 # NMS IoU threshold\n",
40
+ "model.overrides['agnostic_nms'] = False # NMS class-agnostic\n",
41
+ "model.overrides['max_det'] = 1000 # maximum number of detections per image"
42
+ ]
43
+ },
44
+ {
45
+ "cell_type": "code",
46
+ "execution_count": null,
47
+ "metadata": {},
48
+ "outputs": [],
49
+ "source": []
50
+ }
51
+ ],
52
+ "metadata": {
53
+ "kernelspec": {
54
+ "display_name": ".venv",
55
+ "language": "python",
56
+ "name": "python3"
57
+ },
58
+ "language_info": {
59
+ "codemirror_mode": {
60
+ "name": "ipython",
61
+ "version": 3
62
+ },
63
+ "file_extension": ".py",
64
+ "mimetype": "text/x-python",
65
+ "name": "python",
66
+ "nbconvert_exporter": "python",
67
+ "pygments_lexer": "ipython3",
68
+ "version": "3.9.11"
69
+ }
70
+ },
71
+ "nbformat": 4,
72
+ "nbformat_minor": 2
73
+ }
config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "input_size": 640,
3
+ "task": "object-detection",
4
+ "ultralyticsplus_version": "0.0.24",
5
+ "ultralytics_version": "8.0.23",
6
+ "model_type": "v8",
7
+ "score_map50": 0.20933
8
+ }
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ ultralyticsplus
2
+ ultralytics