@@ -361,7 +361,6 @@ def _create_convnext(variant, pretrained=False, **kwargs):
361361 return model
362362
363363
364-
365364def _cfg (url = '' , ** kwargs ):
366365 return {
367366 'url' : url ,
@@ -375,90 +374,130 @@ def _cfg(url='', **kwargs):
375374
376375default_cfgs = generate_default_cfgs ({
377376 # timm specific variants
378- 'convnext_atto.timm_in1k ' : _cfg (
377+ 'convnext_atto.d2_in1k ' : _cfg (
379378 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_atto_d2-01bb0f51.pth' ,
379+ hf_hub_id = 'timm/' ,
380380 test_input_size = (3 , 288 , 288 ), test_crop_pct = 0.95 ),
381- 'convnext_atto_ols.timm_in1k ' : _cfg (
381+ 'convnext_atto_ols.a2_in1k ' : _cfg (
382382 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_atto_ols_a2-78d1c8f3.pth' ,
383+ hf_hub_id = 'timm/' ,
383384 test_input_size = (3 , 288 , 288 ), test_crop_pct = 0.95 ),
384- 'convnext_femto.timm_in1k ' : _cfg (
385+ 'convnext_femto.d1_in1k ' : _cfg (
385386 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_femto_d1-d71d5b4c.pth' ,
387+ hf_hub_id = 'timm/' ,
386388 test_input_size = (3 , 288 , 288 ), test_crop_pct = 0.95 ),
387- 'convnext_femto_ols.timm_in1k ' : _cfg (
389+ 'convnext_femto_ols.d1_in1k ' : _cfg (
388390 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_femto_ols_d1-246bf2ed.pth' ,
391+ hf_hub_id = 'timm/' ,
389392 test_input_size = (3 , 288 , 288 ), test_crop_pct = 0.95 ),
390- 'convnext_pico.timm_in1k ' : _cfg (
393+ 'convnext_pico.d1_in1k ' : _cfg (
391394 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_pico_d1-10ad7f0d.pth' ,
395+ hf_hub_id = 'timm/' ,
392396 test_input_size = (3 , 288 , 288 ), test_crop_pct = 0.95 ),
393- 'convnext_pico_ols.timm_in1k ' : _cfg (
397+ 'convnext_pico_ols.d1_in1k ' : _cfg (
394398 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_pico_ols_d1-611f0ca7.pth' ,
399+ hf_hub_id = 'timm/' ,
400+ crop_pct = 0.95 , test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
401+ 'convnext_nano.in12k_ft_in1k' : _cfg (
402+ hf_hub_id = 'timm/' ,
395403 crop_pct = 0.95 , test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
396- 'convnext_nano.timm_in1k ' : _cfg (
404+ 'convnext_nano.d1h_in1k ' : _cfg (
397405 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_nano_d1h-7eb4bdea.pth' ,
406+ hf_hub_id = 'timm/' ,
398407 crop_pct = 0.95 , test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
399- 'convnext_nano_ols.timm_in1k ' : _cfg (
408+ 'convnext_nano_ols.d1h_in1k ' : _cfg (
400409 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_nano_ols_d1h-ae424a9a.pth' ,
410+ hf_hub_id = 'timm/' ,
401411 crop_pct = 0.95 , test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
402- 'convnext_tiny_hnf.timm_in1k ' : _cfg (
412+ 'convnext_tiny_hnf.a2h_in1k ' : _cfg (
403413 url = 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_tiny_hnf_a2h-ab7e9df2.pth' ,
414+ hf_hub_id = 'timm/' ,
404415 crop_pct = 0.95 , test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
405416
417+ 'convnext_nano.in12k' : _cfg (
418+ hf_hub_id = 'timm/' ,
419+ crop_pct = 0.95 , num_classes = 11821 ),
420+
406421 'convnext_tiny.fb_in1k' : _cfg (
407422 url = "https://dl.fbaipublicfiles.com/convnext/convnext_tiny_1k_224_ema.pth" ,
423+ hf_hub_id = 'timm/' ,
408424 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
409425 'convnext_small.fb_in1k' : _cfg (
410426 url = "https://dl.fbaipublicfiles.com/convnext/convnext_small_1k_224_ema.pth" ,
427+ hf_hub_id = 'timm/' ,
411428 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
412429 'convnext_base.fb_in1k' : _cfg (
413430 url = "https://dl.fbaipublicfiles.com/convnext/convnext_base_1k_224_ema.pth" ,
431+ hf_hub_id = 'timm/' ,
414432 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
415433 'convnext_large.fb_in1k' : _cfg (
416434 url = "https://dl.fbaipublicfiles.com/convnext/convnext_large_1k_224_ema.pth" ,
435+ hf_hub_id = 'timm/' ,
417436 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
418437 'convnext_xlarge.untrained' : _cfg (),
419438
420439 'convnext_tiny.fb_in22k_ft_in1k' : _cfg (
421440 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_tiny_22k_1k_224.pth' ,
441+ hf_hub_id = 'timm/' ,
422442 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
423443 'convnext_small.fb_in22k_ft_in1k' : _cfg (
424444 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_small_22k_1k_224.pth' ,
445+ hf_hub_id = 'timm/' ,
425446 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
426447 'convnext_base.fb_in22k_ft_in1k' : _cfg (
427448 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_1k_224.pth' ,
449+ hf_hub_id = 'timm/' ,
428450 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
429451 'convnext_large.fb_in22k_ft_in1k' : _cfg (
430452 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_1k_224.pth' ,
453+ hf_hub_id = 'timm/' ,
431454 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
432455 'convnext_xlarge.fb_in22k_ft_in1k' : _cfg (
433456 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_1k_224_ema.pth' ,
457+ hf_hub_id = 'timm/' ,
434458 test_input_size = (3 , 288 , 288 ), test_crop_pct = 1.0 ),
435459
436460 'convnext_tiny.fb_in22k_ft_in1k_384' : _cfg (
437461 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_tiny_22k_1k_384.pth' ,
462+ hf_hub_id = 'timm/' ,
438463 input_size = (3 , 384 , 384 ), pool_size = (12 , 12 ), crop_pct = 1.0 , crop_mode = 'squash' ),
439- 'convnext_small.. fb_in22k_ft_in1k_384' : _cfg (
464+ 'convnext_small.fb_in22k_ft_in1k_384' : _cfg (
440465 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_small_22k_1k_384.pth' ,
466+ hf_hub_id = 'timm/' ,
441467 input_size = (3 , 384 , 384 ), pool_size = (12 , 12 ), crop_pct = 1.0 , crop_mode = 'squash' ),
442468 'convnext_base.fb_in22k_ft_in1k_384' : _cfg (
443469 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_1k_384.pth' ,
470+ hf_hub_id = 'timm/' ,
444471 input_size = (3 , 384 , 384 ), pool_size = (12 , 12 ), crop_pct = 1.0 , crop_mode = 'squash' ),
445472 'convnext_large.fb_in22k_ft_in1k_384' : _cfg (
446473 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_1k_384.pth' ,
474+ hf_hub_id = 'timm/' ,
447475 input_size = (3 , 384 , 384 ), pool_size = (12 , 12 ), crop_pct = 1.0 , crop_mode = 'squash' ),
448476 'convnext_xlarge.fb_in22k_ft_in1k_384' : _cfg (
449477 url = 'https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_1k_384_ema.pth' ,
478+ hf_hub_id = 'timm/' ,
450479 input_size = (3 , 384 , 384 ), pool_size = (12 , 12 ), crop_pct = 1.0 , crop_mode = 'squash' ),
451480
452- 'convnext_tiny_in22k.fb_in22k' : _cfg (
453- url = "https://dl.fbaipublicfiles.com/convnext/convnext_tiny_22k_224.pth" , num_classes = 21841 ),
454- 'convnext_small_in22k.fb_in22k' : _cfg (
455- url = "https://dl.fbaipublicfiles.com/convnext/convnext_small_22k_224.pth" , num_classes = 21841 ),
456- 'convnext_base_in22k.fb_in22k' : _cfg (
457- url = "https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_224.pth" , num_classes = 21841 ),
458- 'convnext_large_in22k.fb_in22k' : _cfg (
459- url = "https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_224.pth" , num_classes = 21841 ),
460- 'convnext_xlarge_in22k.fb_in22k' : _cfg (
461- url = "https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_224.pth" , num_classes = 21841 ),
481+ 'convnext_tiny.fb_in22k' : _cfg (
482+ url = "https://dl.fbaipublicfiles.com/convnext/convnext_tiny_22k_224.pth" ,
483+ hf_hub_id = 'timm/' ,
484+ num_classes = 21841 ),
485+ 'convnext_small.fb_in22k' : _cfg (
486+ url = "https://dl.fbaipublicfiles.com/convnext/convnext_small_22k_224.pth" ,
487+ hf_hub_id = 'timm/' ,
488+ num_classes = 21841 ),
489+ 'convnext_base.fb_in22k' : _cfg (
490+ url = "https://dl.fbaipublicfiles.com/convnext/convnext_base_22k_224.pth" ,
491+ hf_hub_id = 'timm/' ,
492+ num_classes = 21841 ),
493+ 'convnext_large.fb_in22k' : _cfg (
494+ url = "https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_224.pth" ,
495+ hf_hub_id = 'timm/' ,
496+ num_classes = 21841 ),
497+ 'convnext_xlarge.fb_in22k' : _cfg (
498+ url = "https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_224.pth" ,
499+ hf_hub_id = 'timm/' ,
500+ num_classes = 21841 ),
462501})
463502
464503
0 commit comments