kadirnar commited on
Commit
c91b51c
·
1 Parent(s): ac57729

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +35 -3
  2. yolov7.pt +3 -0
README.md CHANGED
@@ -1,3 +1,35 @@
1
- ---
2
- license: gpl-3.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Installation
2
+ ```
3
+ pip install yolov7detect
4
+ ```
5
+
6
+ ### Yolov7 Inference
7
+ ```python
8
+ import yolov7
9
+
10
+ # load pretrained or custom model
11
+ model = yolov7.load('kadirnar/yolov7-v0.1')
12
+
13
+ # set model parameters
14
+ model.conf = 0.25 # NMS confidence threshold
15
+ model.iou = 0.45 # NMS IoU threshold
16
+ model.classes = None # (optional list) filter by class
17
+
18
+ # set image
19
+ imgs = 'inference/images'
20
+
21
+ # perform inference
22
+ results = model(imgs)
23
+
24
+ # inference with larger input size and test time augmentation
25
+ results = model(img, size=1280, augment=True)
26
+
27
+ # parse results
28
+ predictions = results.pred[0]
29
+ boxes = predictions[:, :4] # x1, y1, x2, y2
30
+ scores = predictions[:, 4]
31
+ categories = predictions[:, 5]
32
+
33
+ # show detection bounding boxes on image
34
+ results.show()
35
+ ```
yolov7.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1ac3c74eb96a3eec77949c0f37a06bc272756606ff011d9353f7abff4e0c71d
3
+ size 75587165