KAHRAMAN42 commited on
Commit
bbd8089
1 Parent(s): 7f488d2

Upload 5 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ cow-video-cows-mooing-and-grazing-in-a-field.mp4 filter=lfs diff=lfs merge=lfs -text
Ikinci_Yol.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ from ultralytics import YOLO
3
+ import numpy as np
4
+ model=YOLO("/home/kahraman/Masaüstü/HuggingFace_Models_and_Spaces/yolov8_model_on_custom_data/best.pt")
5
+
6
+ source="/home/kahraman/Masaüstü/HuggingFace_Models_and_Spaces/yolov8_model_on_custom_data/cow-video-cows-mooing-and-grazing-in-a-field.mp4"
7
+
8
+ cap = cv2.VideoCapture(source)
9
+
10
+ while True:
11
+ ret, frame = cap.read()
12
+
13
+ if not ret:
14
+ break
15
+
16
+ results = model(frame)
17
+ for result in results:
18
+ box=result.boxes
19
+
20
+ x1, y1, x2, y2 = map(int, box.xyxy[0])
21
+ print(x1, y1, x2, y2)
22
+ cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 255, 0), 2)
23
+
24
+ cv2.imshow("img", frame)
25
+
26
+ if cv2.waitKey(1) & 0xFF == ord("q"):
27
+ break
28
+
29
+ cap.release()
30
+ cv2.destroyAllWindows()
best.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0cdb2ceca8517a36c92d6d509f9ef29c5e211d2fd8cf5d72f95e5b2fc192ad3
3
+ size 6247961
cow-video-cows-mooing-and-grazing-in-a-field.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c518e6861fd746ab17df4506940295f1e8ea40c2b990338ae3f5e34da119cae8
3
+ size 67100420
requirements.txt ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ certifi==2023.11.17
2
+ charset-normalizer==3.3.2
3
+ contourpy==1.2.0
4
+ cycler==0.12.1
5
+ filelock==3.13.1
6
+ fonttools==4.47.2
7
+ fsspec==2023.12.2
8
+ idna==3.6
9
+ Jinja2==3.1.3
10
+ kiwisolver==1.4.5
11
+ MarkupSafe==2.1.4
12
+ matplotlib==3.8.2
13
+ mpmath==1.3.0
14
+ networkx==3.2.1
15
+ numpy==1.26.3
16
+ nvidia-cublas-cu12==12.1.3.1
17
+ nvidia-cuda-cupti-cu12==12.1.105
18
+ nvidia-cuda-nvrtc-cu12==12.1.105
19
+ nvidia-cuda-runtime-cu12==12.1.105
20
+ nvidia-cudnn-cu12==8.9.2.26
21
+ nvidia-cufft-cu12==11.0.2.54
22
+ nvidia-curand-cu12==10.3.2.106
23
+ nvidia-cusolver-cu12==11.4.5.107
24
+ nvidia-cusparse-cu12==12.1.0.106
25
+ nvidia-nccl-cu12==2.18.1
26
+ nvidia-nvjitlink-cu12==12.3.101
27
+ nvidia-nvtx-cu12==12.1.105
28
+ opencv-python==4.9.0.80
29
+ packaging==23.2
30
+ pandas==2.2.0
31
+ pillow==10.2.0
32
+ psutil==5.9.8
33
+ py-cpuinfo==9.0.0
34
+ pyparsing==3.1.1
35
+ python-dateutil==2.8.2
36
+ pytz==2023.4
37
+ PyYAML==6.0.1
38
+ requests==2.31.0
39
+ scipy==1.12.0
40
+ seaborn==0.13.2
41
+ six==1.16.0
42
+ sympy==1.12
43
+ thop==0.1.1.post2209072238
44
+ torch==2.1.2
45
+ torchvision==0.16.2
46
+ tqdm==4.66.1
47
+ triton==2.1.0
48
+ typing_extensions==4.9.0
49
+ tzdata==2023.4
50
+ ultralytics==8.1.8
51
+ urllib3==2.1.0
yolov8.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ from ultralytics import YOLO
3
+
4
+ model=YOLO("/home/kahraman/Masaüstü/HuggingFace_Models_and_Spaces/yolov8_model_on_custom_data/best.pt")
5
+
6
+ source="/home/kahraman/Masaüstü/HuggingFace_Models_and_Spaces/yolov8_model_on_custom_data/cow-video-cows-mooing-and-grazing-in-a-field.mp4"
7
+
8
+ cap=cv2.VideoCapture(source)
9
+
10
+ while cap:
11
+ ret, frame= cap.read()
12
+
13
+ if not ret:
14
+ break
15
+
16
+ results = model(frame)
17
+ cv2.imshow("img", results[0].plot())
18
+
19
+
20
+ if cv2.waitKey(1) & 0xFF == ord("q"):
21
+ break
22
+
23
+ cap.release()
24
+ cv2.destroyAllWindows()