Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wallacelkw committed Sep 27, 2023
0 parents commit 38761c8
Show file tree
Hide file tree
Showing 6 changed files with 957 additions and 0 deletions.
205 changes: 205 additions & 0 deletions number.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
340
341
342
343
344
376
424
425
426
427
428
429
430
431
432
433
434
435
436
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
502
503
504
505
506
507
508
509
510
555
556
557
558
559
810
811
812
813
814
815
816
817
818
819
820
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
61 changes: 61 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
asttokens==2.4.0
backcall==0.2.0
blinker==1.6.2
certifi==2023.7.22
charset-normalizer==3.2.0
click==8.1.7
colorama==0.4.6
contourpy==1.1.1
cycler==0.11.0
decorator==5.1.1
exceptiongroup==1.1.3
executing==1.2.0
filelock==3.12.4
fonttools==4.42.1
idna==3.4
importlib-metadata==6.8.0
importlib-resources==6.1.0
ipython==8.15.0
itsdangerous==2.1.2
jedi==0.19.0
Jinja2==3.1.2
kiwisolver==1.4.5
MarkupSafe==2.1.3
matplotlib==3.8.0
matplotlib-inline==0.1.6
mpmath==1.3.0
networkx==3.1
numpy==1.26.0
opencv-python==4.8.0.76
packaging==23.1
pandas==2.1.1
parso==0.8.3
pickleshare==0.7.5
Pillow==10.0.1
prompt-toolkit==3.0.39
psutil==5.9.5
pure-eval==0.2.2
py-cpuinfo==9.0.0
Pygments==2.16.1
pyparsing==3.1.1
python-dateutil==2.8.2
pytz==2023.3.post1
PyYAML==6.0.1
requests==2.31.0
scipy==1.11.2
seaborn==0.12.2
six==1.16.0
stack-data==0.6.2
sympy==1.12
torch==2.0.1+cu117
torchaudio==2.0.2+cu117
torchvision==0.15.2+cu117
tqdm==4.66.1
traitlets==5.10.0
typing_extensions==4.8.0
tzdata==2023.3
ultralytics==8.0.183
urllib3==2.0.5
wcwidth==0.2.6
Werkzeug==2.3.7
zipp==3.17.0
21 changes: 21 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from ultralytics import YOLO
import argparse
from ultralytics.utils.plotting import Annotator

if __name__ == '__main__':
parser = argparse.ArgumentParser()
# parser.add_argument('-l', '--loc', required=True)
# parser.add_argument('-m', '--model', required=True)
args = parser.parse_args()
model = YOLO('best_xl_latest.pt')

results = model(['t4.png', 't6.png'], stream=True, save_conf=True,
save=True, conf=0.4, save_txt=True, imgsz=640)

# Process results generator
for result in results:
# detection
print(result.boxes.xyxy) # box with xyxy format, (N, 4)
print(result.boxes.xywh) # box with xywh format, (N, 4)
# classification
print(result.probs) # cls prob, (num_class, )
8 changes: 8 additions & 0 deletions train.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from ultralytics import YOLO


if __name__ == '__main__':
model = YOLO("yolov8x.pt")

model.train(data="data_custom.yaml", batch=2, imgsz=640,
epochs=100, workers=1)
Loading

0 comments on commit 38761c8

Please sign in to comment.