Object Detection
Transformers
Safetensors
rt_detr_v2
document-layout-analysis
finance
rtdetr-v2
cuda
tf32
ax-pdf
Instructions to use AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForObjectDetection tokenizer = AutoTokenizer.from_pretrained("AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32") model = AutoModelForObjectDetection.from_pretrained("AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32: direct link, hf CLI and curl.
- Browser
- Download file 3.26 kB
-
https://huggingface.co/AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32/resolve/main/config.json
- Command line
-
hf download hf://AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32/config.json
-
curl -L -o config.json https://huggingface.co/AutomatosX/AXDocLayout-M-v1.4-CUDA-TF32/resolve/main/config.json
3.26 kB
| { | |
| "activation_dropout": 0.0, | |
| "activation_function": "silu", | |
| "anchor_image_size": null, | |
| "architectures": [ | |
| "RTDetrV2ForObjectDetection" | |
| ], | |
| "attention_dropout": 0.0, | |
| "auxiliary_loss": true, | |
| "backbone": null, | |
| "backbone_config": { | |
| "depths": [ | |
| 3, | |
| 4, | |
| 6, | |
| 3 | |
| ], | |
| "downsample_in_bottleneck": false, | |
| "downsample_in_first_stage": false, | |
| "embedding_size": 64, | |
| "hidden_act": "relu", | |
| "hidden_sizes": [ | |
| 256, | |
| 512, | |
| 1024, | |
| 2048 | |
| ], | |
| "layer_type": "bottleneck", | |
| "model_type": "rt_detr_resnet", | |
| "num_channels": 3, | |
| "out_features": [ | |
| "stage2", | |
| "stage3", | |
| "stage4" | |
| ], | |
| "out_indices": [ | |
| 2, | |
| 3, | |
| 4 | |
| ], | |
| "stage_names": [ | |
| "stem", | |
| "stage1", | |
| "stage2", | |
| "stage3", | |
| "stage4" | |
| ] | |
| }, | |
| "backbone_kwargs": null, | |
| "batch_norm_eps": 1e-05, | |
| "box_noise_scale": 1.0, | |
| "d_model": 256, | |
| "decoder_activation_function": "relu", | |
| "decoder_attention_heads": 8, | |
| "decoder_ffn_dim": 1024, | |
| "decoder_in_channels": [ | |
| 256, | |
| 256, | |
| 256 | |
| ], | |
| "decoder_layers": 6, | |
| "decoder_method": "default", | |
| "decoder_n_levels": 3, | |
| "decoder_n_points": 4, | |
| "decoder_offset_scale": 0.5, | |
| "dropout": 0.0, | |
| "encode_proj_layers": [ | |
| 2 | |
| ], | |
| "encoder_activation_function": "gelu", | |
| "encoder_attention_heads": 8, | |
| "encoder_ffn_dim": 1024, | |
| "encoder_hidden_dim": 256, | |
| "encoder_in_channels": [ | |
| 512, | |
| 1024, | |
| 2048 | |
| ], | |
| "encoder_layers": 1, | |
| "eos_coefficient": 0.0001, | |
| "eval_size": null, | |
| "feat_strides": [ | |
| 8, | |
| 16, | |
| 32 | |
| ], | |
| "focal_loss_alpha": 0.75, | |
| "focal_loss_gamma": 2.0, | |
| "freeze_backbone_batch_norms": true, | |
| "hidden_expansion": 1.0, | |
| "id2label": { | |
| "0": "caption", | |
| "1": "footnote", | |
| "2": "formula", | |
| "3": "list_item", | |
| "4": "page_footer", | |
| "5": "page_header", | |
| "6": "picture", | |
| "7": "section_header", | |
| "8": "table", | |
| "9": "text", | |
| "10": "title", | |
| "11": "document_index", | |
| "12": "code", | |
| "13": "checkbox_selected", | |
| "14": "checkbox_unselected", | |
| "15": "form", | |
| "16": "key_value_region" | |
| }, | |
| "initializer_bias_prior_prob": null, | |
| "initializer_range": 0.01, | |
| "is_encoder_decoder": true, | |
| "label2id": { | |
| "caption": 0, | |
| "checkbox_selected": 13, | |
| "checkbox_unselected": 14, | |
| "code": 12, | |
| "document_index": 11, | |
| "footnote": 1, | |
| "form": 15, | |
| "formula": 2, | |
| "key_value_region": 16, | |
| "list_item": 3, | |
| "page_footer": 4, | |
| "page_header": 5, | |
| "picture": 6, | |
| "section_header": 7, | |
| "table": 8, | |
| "text": 9, | |
| "title": 10 | |
| }, | |
| "label_noise_ratio": 0.5, | |
| "layer_norm_eps": 1e-05, | |
| "learn_initial_query": false, | |
| "matcher_alpha": 0.25, | |
| "matcher_bbox_cost": 5.0, | |
| "matcher_class_cost": 2.0, | |
| "matcher_gamma": 2.0, | |
| "matcher_giou_cost": 2.0, | |
| "model_type": "rt_detr_v2", | |
| "normalize_before": false, | |
| "num_denoising": 100, | |
| "num_feature_levels": 3, | |
| "num_queries": 300, | |
| "positional_encoding_temperature": 10000, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.53.3", | |
| "use_focal_loss": true, | |
| "use_pretrained_backbone": false, | |
| "use_timm_backbone": false, | |
| "weight_loss_bbox": 5.0, | |
| "weight_loss_giou": 2.0, | |
| "weight_loss_vfl": 1.0, | |
| "with_box_refine": true | |
| } | |