Zengyf-CVer commited on
Commit
58a11df
1 Parent(s): 6daa32c

model loading update

Browse files
Files changed (3) hide show
  1. .vscode/settings.json +3 -0
  2. app.py +10 -7
  3. requirements.txt +35 -0
.vscode/settings.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "python.formatting.provider": "black"
3
+ }
app.py CHANGED
@@ -78,13 +78,16 @@ def parse_args(known=False):
78
  def model_loading(model_name, device):
79
 
80
  # 加载本地模型
81
- model = torch.hub.load(
82
- local_model_path,
83
- "custom",
84
- path=f"{local_model_path}/{model_name}",
85
- source="local",
86
- device=device,
87
- )
 
 
 
88
 
89
  return model
90
 
 
78
  def model_loading(model_name, device):
79
 
80
  # 加载本地模型
81
+ # model = torch.hub.load('ultralytics/yolov5', 'yolov5s', device=device)
82
+ model = torch.hub.load("ultralytics/yolov5", model_name, device=device)
83
+
84
+ # model = torch.hub.load(
85
+ # local_model_path,
86
+ # "custom",
87
+ # path=f"{local_model_path}/{model_name}",
88
+ # source="local",
89
+ # device=device,
90
+ # )
91
 
92
  return model
93
 
requirements.txt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base ----------------------------------------
2
+ matplotlib>=3.2.2
3
+ numpy>=1.18.5
4
+ opencv-python>=4.1.2
5
+ Pillow>=7.1.2
6
+ PyYAML>=5.3.1
7
+ requests>=2.23.0
8
+ scipy>=1.4.1
9
+ torch>=1.7.0
10
+ torchvision>=0.8.1
11
+ tqdm>=4.41.0
12
+
13
+ # Logging -------------------------------------
14
+ tensorboard>=2.4.1
15
+ # wandb
16
+
17
+ # Plotting ------------------------------------
18
+ pandas>=1.1.4
19
+ seaborn>=0.11.0
20
+
21
+ # Export --------------------------------------
22
+ # coremltools>=4.1 # CoreML export
23
+ # onnx>=1.9.0 # ONNX export
24
+ # onnx-simplifier>=0.3.6 # ONNX simplifier
25
+ # scikit-learn==0.19.2 # CoreML quantization
26
+ # tensorflow>=2.4.1 # TFLite export
27
+ # tensorflowjs>=3.9.0 # TF.js export
28
+ # openvino-dev # OpenVINO export
29
+
30
+ # Extras --------------------------------------
31
+ # albumentations>=1.0.3
32
+ # Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172
33
+ # pycocotools>=2.0 # COCO mAP
34
+ # roboflow
35
+ thop # FLOPs computation