MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / make_transforms_for_mot17

Function make_transforms_for_mot17

tutorials/motr/joint.py:202–230  ·  view source on GitHub ↗
(image_set, args=None)

Source from the content-addressed store, hash-verified

200
201
202def make_transforms_for_mot17(image_set, args=None):
203
204 normalize = T.MotCompose([
205 T.MotToTensor(),
206 T.MotNormalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
207 ])
208 scales = [608, 640, 672, 704, 736, 768, 800, 832, 864, 896, 928, 960, 992]
209
210 if image_set == 'train':
211 return T.MotCompose([
212 T.MotRandomHorizontalFlip(),
213 T.MotRandomSelect(
214 T.MotRandomResize(scales, max_size=1536),
215 T.MotCompose([
216 T.MotRandomResize([400, 500, 600]),
217 T.FixedMotRandomCrop(384, 600),
218 T.MotRandomResize(scales, max_size=1536),
219 ])
220 ),
221 normalize,
222 ])
223
224 if image_set == 'val':
225 return T.MotCompose([
226 T.MotRandomResize([800], max_size=1333),
227 normalize,
228 ])
229
230 raise ValueError(f'unknown {image_set}')
231
232
233def make_transforms_for_crowdhuman(image_set, args=None):

Callers 1

build_dataset2transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected