Realfencer commited on
Commit
312ee65
·
verified ·
1 Parent(s): 4584093

Upload 2 files

Browse files
Files changed (2) hide show
  1. miner.py +17 -1
  2. weights.onnx +2 -2
miner.py CHANGED
@@ -30,7 +30,7 @@ class Miner:
30
  model_class_names = ["bottle", "can", "cup"]
31
  _model_to_competition_cls = np.array([1, 2, 0], dtype=np.int32)
32
  input_size = 1280
33
- iou_thres = 0.4
34
  cross_iou_thresh = 0.7
35
  min_side = 8.0
36
  min_box_area = 100.0
@@ -526,3 +526,19 @@ class Miner:
526
  )
527
  )
528
  return results
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  model_class_names = ["bottle", "can", "cup"]
31
  _model_to_competition_cls = np.array([1, 2, 0], dtype=np.int32)
32
  input_size = 1280
33
+ iou_thres = 0.3
34
  cross_iou_thresh = 0.7
35
  min_side = 8.0
36
  min_box_area = 100.0
 
526
  )
527
  )
528
  return results
529
+
530
+ # if __name__ == "__main__":
531
+
532
+ # # predict batch with local images for testing
533
+ # import json
534
+ # from time import time
535
+
536
+ # test_images = [
537
+ # cv2.imread(str(p)) for p in sorted(Path("test_images").glob("*.jpg"))
538
+ # ]
539
+ # miner = Miner(Path("hf_repo"))
540
+ # start_time = time()
541
+ # results = miner.predict_batch(test_images, offset=0, n_keypoints=0)
542
+ # end_time = time()
543
+ # print(f"Predicted {len(test_images)} images in {end_time - start_time:.2f} seconds")
544
+ # print(json.dumps([r.dict() for r in results], indent=2))
weights.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a43473993494103558080b2f69741a91068b91c807f57d32120dee5c1201bd7c
3
- size 19358729
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e34c250d8bd2c1a4f05bdb58d1153ff5a3713d30c094ff10be682740ec85c8b1
3
+ size 19358782