|
1 | 1 | use crate::{ |
2 | 2 | models::YOLOPredsFormat, Config, ResizeMode, Scale, Task, NAMES_COCO_80, |
3 | | - NAMES_COCO_KEYPOINTS_17, NAMES_DOTA_V1_15, NAMES_IMAGENET_1K, NAMES_YOLOE_4585, |
4 | | - NAMES_YOLO_DOCLAYOUT_10, |
| 3 | + NAMES_COCO_KEYPOINTS_17, NAMES_DOTA_V1_15, NAMES_IMAGENET_1K, NAMES_YOLO_DOCLAYOUT_10, |
5 | 4 | }; |
6 | 5 |
|
7 | 6 | impl Config { |
@@ -90,64 +89,6 @@ impl Config { |
90 | 89 | .with_model_file("doclayout-docstructbench.onnx") // TODO: batch_size > 1 |
91 | 90 | } |
92 | 91 |
|
93 | | - /// Creates a base YOLOE configuration with 4585 classes. |
94 | | - /// |
95 | | - /// Configures the model for instance segmentation with a large class vocabulary. |
96 | | - pub fn yoloe() -> Self { |
97 | | - Self::yolo() |
98 | | - .with_task(Task::InstanceSegmentation) |
99 | | - .with_class_names(&NAMES_YOLOE_4585) |
100 | | - } |
101 | | - /// Creates a configuration for YOLOE-v8s segmentation model. |
102 | | - /// Uses the small variant of YOLOv8 architecture. |
103 | | - pub fn yoloe_v8s_seg_pf() -> Self { |
104 | | - Self::yoloe() |
105 | | - .with_version(8.into()) |
106 | | - .with_scale(Scale::S) |
107 | | - .with_model_file("yoloe-v8s-seg-pf.onnx") |
108 | | - } |
109 | | - |
110 | | - /// Creates a configuration for YOLOE-v8m segmentation model. |
111 | | - /// Uses the medium variant of YOLOv8 architecture. |
112 | | - pub fn yoloe_v8m_seg_pf() -> Self { |
113 | | - Self::yoloe() |
114 | | - .with_version(8.into()) |
115 | | - .with_scale(Scale::M) |
116 | | - .with_model_file("yoloe-v8m-seg-pf.onnx") |
117 | | - } |
118 | | - |
119 | | - /// Creates a configuration for YOLOE-v8l segmentation model. |
120 | | - /// Uses the large variant of YOLOv8 architecture. |
121 | | - pub fn yoloe_v8l_seg_pf() -> Self { |
122 | | - Self::yoloe() |
123 | | - .with_version(8.into()) |
124 | | - .with_scale(Scale::L) |
125 | | - .with_model_file("yoloe-v8l-seg-pf.onnx") |
126 | | - } |
127 | | - |
128 | | - /// Creates a configuration for YOLOE-11s segmentation model. |
129 | | - /// Uses the small variant of YOLOv11 architecture. |
130 | | - pub fn yoloe_11s_seg_pf() -> Self { |
131 | | - Self::yoloe() |
132 | | - .with_version(11.into()) |
133 | | - .with_scale(Scale::S) |
134 | | - .with_model_file("yoloe-11s-seg-pf.onnx") |
135 | | - } |
136 | | - |
137 | | - pub fn yoloe_11m_seg_pf() -> Self { |
138 | | - Self::yoloe() |
139 | | - .with_version(11.into()) |
140 | | - .with_scale(Scale::M) |
141 | | - .with_model_file("yoloe-11m-seg-pf.onnx") |
142 | | - } |
143 | | - |
144 | | - pub fn yoloe_11l_seg_pf() -> Self { |
145 | | - Self::yoloe() |
146 | | - .with_version(11.into()) |
147 | | - .with_scale(Scale::L) |
148 | | - .with_model_file("yoloe-11l-seg-pf.onnx") |
149 | | - } |
150 | | - |
151 | 92 | pub fn fastsam_s() -> Self { |
152 | 93 | Self::yolo_segment() |
153 | 94 | .with_class_names(&["object"]) |
@@ -177,60 +118,4 @@ impl Config { |
177 | 118 | .with_scale(Scale::X) |
178 | 119 | .with_model_file("rtdetr-x.onnx") |
179 | 120 | } |
180 | | - |
181 | | - fn yoloe_seg_tp() -> Self { |
182 | | - Self::yolo() |
183 | | - .with_batch_size_all(1) |
184 | | - .with_nc(80) |
185 | | - .with_model_ixx(1, 1, (1, 80, 300).into()) // max_text_classes |
186 | | - .with_task(Task::InstanceSegmentation) |
187 | | - .with_textual_file("mobileclip/blt-textual.onnx") |
188 | | - .with_model_max_length(77) |
189 | | - .with_textual_ixx(0, 1, 77.into()) |
190 | | - .with_tokenizer_file("clip/tokenizer.json") |
191 | | - .with_tokenizer_config_file("clip/tokenizer_config.json") |
192 | | - .with_special_tokens_map_file("clip/special_tokens_map.json") |
193 | | - } |
194 | | - |
195 | | - pub fn yoloe_v8s_seg_tp() -> Self { |
196 | | - Self::yoloe_seg_tp() |
197 | | - .with_version(8.into()) |
198 | | - .with_scale(Scale::S) |
199 | | - .with_model_file("yoloe-v8s-seg-tp.onnx") |
200 | | - } |
201 | | - |
202 | | - pub fn yoloe_v8m_seg_tp() -> Self { |
203 | | - Self::yoloe_seg_tp() |
204 | | - .with_version(8.into()) |
205 | | - .with_scale(Scale::M) |
206 | | - .with_model_file("yoloe-v8m-seg-tp.onnx") |
207 | | - } |
208 | | - |
209 | | - pub fn yoloe_v8l_seg_tp() -> Self { |
210 | | - Self::yoloe_seg_tp() |
211 | | - .with_version(8.into()) |
212 | | - .with_scale(Scale::L) |
213 | | - .with_model_file("yoloe-v8l-seg-tp.onnx") |
214 | | - } |
215 | | - |
216 | | - pub fn yoloe_11s_seg_tp() -> Self { |
217 | | - Self::yoloe_seg_tp() |
218 | | - .with_version(11.into()) |
219 | | - .with_scale(Scale::S) |
220 | | - .with_model_file("yoloe-11s-seg-tp.onnx") |
221 | | - } |
222 | | - |
223 | | - pub fn yoloe_11m_seg_tp() -> Self { |
224 | | - Self::yoloe_seg_tp() |
225 | | - .with_version(11.into()) |
226 | | - .with_scale(Scale::M) |
227 | | - .with_model_file("yoloe-11m-seg-tp.onnx") |
228 | | - } |
229 | | - |
230 | | - pub fn yoloe_11l_seg_tp() -> Self { |
231 | | - Self::yoloe_seg_tp() |
232 | | - .with_version(11.into()) |
233 | | - .with_scale(Scale::L) |
234 | | - .with_model_file("yoloe-11l-seg-tp.onnx") |
235 | | - } |
236 | 121 | } |
0 commit comments