Alex Strick van Linschoten commited on
Commit
6b5a34f
1 Parent(s): 63bbf7c

add latest model

Browse files
Files changed (2) hide show
  1. allsynthetic-imgsize768.pth +3 -0
  2. app.py +2 -2
allsynthetic-imgsize768.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65362ca715c08973334b0488fb0cada234bff39a20cfa6a6d79eb111e744864e
3
+ size 131183383
app.py CHANGED
@@ -14,7 +14,7 @@ from icevision.models.checkpoint import *
14
  from PIL import Image as PILImage
15
 
16
  # checkpoint_path = "./2022-01-15-vfnet-post-self-train.pth"
17
- checkpoint_path = "./best_model.pth"
18
  checkpoint_and_model = model_from_checkpoint(checkpoint_path)
19
  model = checkpoint_and_model["model"]
20
  model_type = checkpoint_and_model["model_type"]
@@ -102,7 +102,7 @@ def predict(pdf, confidence, generate_file):
102
  valid_tfms,
103
  model,
104
  class_map=class_map,
105
- detection_threshold=0.7,
106
  display_label=True,
107
  display_bbox=True,
108
  return_img=True,
 
14
  from PIL import Image as PILImage
15
 
16
  # checkpoint_path = "./2022-01-15-vfnet-post-self-train.pth"
17
+ checkpoint_path = "./allsynthetic-imgsize768.pth"
18
  checkpoint_and_model = model_from_checkpoint(checkpoint_path)
19
  model = checkpoint_and_model["model"]
20
  model_type = checkpoint_and_model["model_type"]
 
102
  valid_tfms,
103
  model,
104
  class_map=class_map,
105
+ detection_threshold=confidence / 100,
106
  display_label=True,
107
  display_bbox=True,
108
  return_img=True,