You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`2024-10-09 14:21:04.828 | INFO | magic_pdf.libs.pdf_check:detect_invalid_chars:57 - cid_count: 0, text_len: 12719, cid_chars_radio: 0.0
Creating new Ultralytics Settings v0.0.6 file ✅
View Ultralytics Settings with 'yolo settings' or at '/root/.config/Ultralytics/settings.json'
Update Settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. For help see https://docs.ultralytics.com/quickstart/#ultralytics-settings.
2024-10-09 14:21:23.155 | INFO | magic_pdf.model.pdf_extract_kit:init:180 - DocAnalysis init, this may take some times. apply_layout: True, apply_formula: True, apply_ocr: False, apply_table: True
2024-10-09 14:21:23.155 | INFO | magic_pdf.model.pdf_extract_kit:init:188 - using device: cuda
2024-10-09 14:21:23.155 | INFO | magic_pdf.model.pdf_extract_kit:init:190 - using models_dir: /root/upayukti-model/opendatalab/PDF-Extract-Kit/models
CustomVisionEncoderDecoderModel init
CustomMBartForCausalLM init
CustomMBartDecoder init
[10/09 14:21:40 detectron2]: Rank of current process: 0. World size: 1
[10/09 14:21:41 detectron2]: Environment info:
sys.platform linux
Python 3.10.13 (main, Aug 26 2023, 07:12:19) [Clang 16.0.3 ]
numpy 1.26.4
detectron2 0.6 @/usr/local/lib/python3.10/site-packages/detectron2
Compiler GCC 11.4
CUDA compiler not available
DETECTRON2_ENV_MODULE
PyTorch 2.3.1+cu121 @/usr/local/lib/python3.10/site-packages/torch
PyTorch debug build False
torch._C._GLIBCXX_USE_CXX11_ABI False
GPU available Yes
GPU 0 NVIDIA H100 80GB HBM3 (arch=9.0)
Driver version 550.54.15
CUDA_HOME /usr/local/cuda
Pillow 10.4.0
torchvision 0.18.1+cu121 @/usr/local/lib/python3.10/site-packages/torchvision
torchvision arch flags 5.0, 6.0, 7.0, 7.5, 8.0, 8.6, 9.0
fvcore 0.1.5.post20221221
iopath 0.1.9
cv2 4.6.0
PyTorch built with:
GCC 9.3
C++ Version: 201703
Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
Description of the bug | 错误描述
`2024-10-09 14:21:04.828 | INFO | magic_pdf.libs.pdf_check:detect_invalid_chars:57 - cid_count: 0, text_len: 12719, cid_chars_radio: 0.0
Creating new Ultralytics Settings v0.0.6 file ✅
View Ultralytics Settings with 'yolo settings' or at '/root/.config/Ultralytics/settings.json'
Update Settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. For help see https://docs.ultralytics.com/quickstart/#ultralytics-settings.
2024-10-09 14:21:23.155 | INFO | magic_pdf.model.pdf_extract_kit:init:180 - DocAnalysis init, this may take some times. apply_layout: True, apply_formula: True, apply_ocr: False, apply_table: True
2024-10-09 14:21:23.155 | INFO | magic_pdf.model.pdf_extract_kit:init:188 - using device: cuda
2024-10-09 14:21:23.155 | INFO | magic_pdf.model.pdf_extract_kit:init:190 - using models_dir: /root/upayukti-model/opendatalab/PDF-Extract-Kit/models
CustomVisionEncoderDecoderModel init
CustomMBartForCausalLM init
CustomMBartDecoder init
[10/09 14:21:40 detectron2]: Rank of current process: 0. World size: 1
[10/09 14:21:41 detectron2]: Environment info:
sys.platform linux
Python 3.10.13 (main, Aug 26 2023, 07:12:19) [Clang 16.0.3 ]
numpy 1.26.4
detectron2 0.6 @/usr/local/lib/python3.10/site-packages/detectron2
Compiler GCC 11.4
CUDA compiler not available
DETECTRON2_ENV_MODULE
PyTorch 2.3.1+cu121 @/usr/local/lib/python3.10/site-packages/torch
PyTorch debug build False
torch._C._GLIBCXX_USE_CXX11_ABI False
GPU available Yes
GPU 0 NVIDIA H100 80GB HBM3 (arch=9.0)
Driver version 550.54.15
CUDA_HOME /usr/local/cuda
Pillow 10.4.0
torchvision 0.18.1+cu121 @/usr/local/lib/python3.10/site-packages/torchvision
torchvision arch flags 5.0, 6.0, 7.0, 7.5, 8.0, 8.6, 9.0
fvcore 0.1.5.post20221221
iopath 0.1.9
cv2 4.6.0
PyTorch built with:
[10/09 14:21:41 detectron2]: Command line arguments: {'config_file': '/usr/local/lib/python3.10/site-packages/magic_pdf/resources/model_config/layoutlmv3/layoutlmv3_base_inference.yaml', 'resume': False, 'eval_only': False, 'num_gpus': 1, 'num_machines': 1, 'machine_rank': 0, 'dist_url': 'tcp://127.0.0.1:57823', 'opts': ['MODEL.WEIGHTS', '/root/upayukti-model/opendatalab/PDF-Extract-Kit/models/Layout/model_final.pth']}
[10/09 14:21:41 detectron2]: Contents of args.config_file=/usr/local/lib/python3.10/site-packages/magic_pdf/resources/model_config/layoutlmv3/layoutlmv3_base_inference.yaml:
AUG:
DETR: true
CACHE_DIR: ~/cache/huggingface
CUDNN_BENCHMARK: false
DATALOADER:
ASPECT_RATIO_GROUPING: true
FILTER_EMPTY_ANNOTATIONS: false
NUM_WORKERS: 4
REPEAT_THRESHOLD: 0.0
SAMPLER_TRAIN: TrainingSampler
DATASETS:
PRECOMPUTED_PROPOSAL_TOPK_TEST: 1000
PRECOMPUTED_PROPOSAL_TOPK_TRAIN: 2000
PROPOSAL_FILES_TEST: []
PROPOSAL_FILES_TRAIN: []
TEST:
TRAIN:
GLOBAL:
HACK: 1.0
ICDAR_DATA_DIR_TEST: ''
ICDAR_DATA_DIR_TRAIN: ''
INPUT:
CROP:
ENABLED: true
SIZE:
TYPE: absolute_range
FORMAT: RGB
MASK_FORMAT: polygon
MAX_SIZE_TEST: 1333
MAX_SIZE_TRAIN: 1333
MIN_SIZE_TEST: 800
MIN_SIZE_TRAIN:
MIN_SIZE_TRAIN_SAMPLING: choice
RANDOM_FLIP: horizontal
MODEL:
ANCHOR_GENERATOR:
ANGLES:
ASPECT_RATIOS:
NAME: DefaultAnchorGenerator
OFFSET: 0.0
SIZES:
BACKBONE:
FREEZE_AT: 2
NAME: build_vit_fpn_backbone
CONFIG_PATH: ''
DEVICE: cuda
FPN:
FUSE_TYPE: sum
IN_FEATURES:
NORM: ''
OUT_CHANNELS: 256
IMAGE_ONLY: true
KEYPOINT_ON: false
LOAD_PROPOSALS: false
MASK_ON: true
META_ARCHITECTURE: VLGeneralizedRCNN
PANOPTIC_FPN:
COMBINE:
ENABLED: true
INSTANCES_CONFIDENCE_THRESH: 0.5
OVERLAP_THRESH: 0.5
STUFF_AREA_LIMIT: 4096
INSTANCE_LOSS_WEIGHT: 1.0
PIXEL_MEAN:
PIXEL_STD:
PROPOSAL_GENERATOR:
MIN_SIZE: 0
NAME: RPN
RESNETS:
DEFORM_MODULATED: false
DEFORM_NUM_GROUPS: 1
DEFORM_ON_PER_STAGE:
DEPTH: 50
NORM: FrozenBN
NUM_GROUPS: 1
OUT_FEATURES:
RES2_OUT_CHANNELS: 256
RES5_DILATION: 1
STEM_OUT_CHANNELS: 64
STRIDE_IN_1X1: true
WIDTH_PER_GROUP: 64
RETINANET:
BBOX_REG_LOSS_TYPE: smooth_l1
BBOX_REG_WEIGHTS:
FOCAL_LOSS_ALPHA: 0.25
FOCAL_LOSS_GAMMA: 2.0
IN_FEATURES:
IOU_LABELS:
IOU_THRESHOLDS:
NMS_THRESH_TEST: 0.5
NORM: ''
NUM_CLASSES: 10
NUM_CONVS: 4
PRIOR_PROB: 0.01
SCORE_THRESH_TEST: 0.05
SMOOTH_L1_LOSS_BETA: 0.1
TOPK_CANDIDATES_TEST: 1000
ROI_BOX_CASCADE_HEAD:
BBOX_REG_WEIGHTS:
IOUS:
ROI_BOX_HEAD:
BBOX_REG_LOSS_TYPE: smooth_l1
BBOX_REG_LOSS_WEIGHT: 1.0
BBOX_REG_WEIGHTS:
CLS_AGNOSTIC_BBOX_REG: true
CONV_DIM: 256
FC_DIM: 1024
NAME: FastRCNNConvFCHead
NORM: ''
NUM_CONV: 0
NUM_FC: 2
POOLER_RESOLUTION: 7
POOLER_SAMPLING_RATIO: 0
POOLER_TYPE: ROIAlignV2
SMOOTH_L1_BETA: 0.0
TRAIN_ON_PRED_BOXES: false
ROI_HEADS:
BATCH_SIZE_PER_IMAGE: 512
IN_FEATURES:
IOU_LABELS:
IOU_THRESHOLDS:
NAME: CascadeROIHeads
NMS_THRESH_TEST: 0.5
NUM_CLASSES: 10
POSITIVE_FRACTION: 0.25
PROPOSAL_APPEND_GT: true
SCORE_THRESH_TEST: 0.05
ROI_KEYPOINT_HEAD:
CONV_DIMS:
LOSS_WEIGHT: 1.0
MIN_KEYPOINTS_PER_IMAGE: 1
NAME: KRCNNConvDeconvUpsampleHead
NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS: true
NUM_KEYPOINTS: 17
POOLER_RESOLUTION: 14
POOLER_SAMPLING_RATIO: 0
POOLER_TYPE: ROIAlignV2
ROI_MASK_HEAD:
CLS_AGNOSTIC_MASK: false
CONV_DIM: 256
NAME: MaskRCNNConvUpsampleHead
NORM: ''
NUM_CONV: 4
POOLER_RESOLUTION: 14
POOLER_SAMPLING_RATIO: 0
POOLER_TYPE: ROIAlignV2
RPN:
BATCH_SIZE_PER_IMAGE: 256
BBOX_REG_LOSS_TYPE: smooth_l1
BBOX_REG_LOSS_WEIGHT: 1.0
BBOX_REG_WEIGHTS:
BOUNDARY_THRESH: -1
CONV_DIMS:
HEAD_NAME: StandardRPNHead
IN_FEATURES:
IOU_LABELS:
IOU_THRESHOLDS:
LOSS_WEIGHT: 1.0
NMS_THRESH: 0.7
POSITIVE_FRACTION: 0.5
POST_NMS_TOPK_TEST: 1000
POST_NMS_TOPK_TRAIN: 2000
PRE_NMS_TOPK_TEST: 1000
PRE_NMS_TOPK_TRAIN: 2000
SMOOTH_L1_BETA: 0.0
SEM_SEG_HEAD:
COMMON_STRIDE: 4
CONVS_DIM: 128
IGNORE_VALUE: 255
IN_FEATURES:
LOSS_WEIGHT: 1.0
NAME: SemSegFPNHead
NORM: GN
NUM_CLASSES: 10
VIT:
DROP_PATH: 0.1
IMG_SIZE:
NAME: layoutlmv3_base
OUT_FEATURES:
POS_TYPE: abs
WEIGHTS:
OUTPUT_DIR:
SCIHUB_DATA_DIR_TRAIN: ~/publaynet/layout_scihub/train
SEED: 42
SOLVER:
AMP:
ENABLED: true
BACKBONE_MULTIPLIER: 1.0
BASE_LR: 0.0002
BIAS_LR_FACTOR: 1.0
CHECKPOINT_PERIOD: 2000
CLIP_GRADIENTS:
CLIP_TYPE: full_model
CLIP_VALUE: 1.0
ENABLED: true
NORM_TYPE: 2.0
GAMMA: 0.1
GRADIENT_ACCUMULATION_STEPS: 1
IMS_PER_BATCH: 32
LR_SCHEDULER_NAME: WarmupCosineLR
MAX_ITER: 20000
MOMENTUM: 0.9
NESTEROV: false
OPTIMIZER: ADAMW
REFERENCE_WORLD_SIZE: 0
STEPS:
WARMUP_FACTOR: 0.01
WARMUP_ITERS: 333
WARMUP_METHOD: linear
WEIGHT_DECAY: 0.05
WEIGHT_DECAY_BIAS: null
WEIGHT_DECAY_NORM: 0.0
TEST:
AUG:
ENABLED: false
FLIP: true
MAX_SIZE: 4000
MIN_SIZES:
DETECTIONS_PER_IMAGE: 100
EVAL_PERIOD: 1000
EXPECTED_RESULTS: []
KEYPOINT_OKS_SIGMAS: []
PRECISE_BN:
ENABLED: false
NUM_ITER: 200
VERSION: 2
VIS_PERIOD: 0
[10/09 14:21:42 d2.checkpoint.detection_checkpoint]: [DetectionCheckpointer] Loading from /root/upayukti-model/opendatalab/PDF-Extract-Kit/models/Layout/model_final.pth ...
[10/09 14:21:42 fvcore.common.checkpoint]: [Checkpointer] Loading from /root/upayukti-model/opendatalab/PDF-Extract-Kit/models/Layout/model_final.pth ...
2024-10-09 14:21:56.670 | INFO | magic_pdf.model.pdf_extract_kit:init:248 - DocAnalysis init done!
2024-10-09 14:21:56.670 | INFO | magic_pdf.model.doc_analyze_by_custom_model:custom_model_init:98 - model init cost: 51.84079194068909
2024-10-09 14:21:59.100 | INFO | magic_pdf.model.pdf_extract_kit:call:259 - layout detection cost: 2.26
0: 1888x1344 (no detections), 83.8ms
Speed: 37.5ms preprocess, 83.8ms inference, 0.6ms postprocess per image at shape (1, 3, 1888, 1344)
2024-10-09 14:21:59.662 | INFO | magic_pdf.model.pdf_extract_kit:call:289 - formula nums: 0, mfr time: 0.0
2024-10-09 14:21:59.671 | INFO | magic_pdf.model.pdf_extract_kit:call:380 - ------------------table recognition processing begins-----------------
2024-10-09 14:22:00.056 | ERROR | magic_pdf.tools.cli:parse_doc:96 - axis 2 is out of bounds for array of dimension 1
Traceback (most recent call last):
File "/usr/local/bin/magic-pdf", line 8, in
sys.exit(cli())
│ │ └
│ └
└ <module 'sys' (built-in)>
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function BaseCommand.main at 0x7feffeb44d30>
└
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x7feffeed4910>
│ └ <function Command.invoke at 0x7feffeb457e0>
└
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'path': '/root/upayukti-model/form-16-sample-gpu-h100-1-try-2.pdf', 'output_dir': '/root/upayukti-model', 'method': 'auto', ...
│ │ │ │ └ <click.core.Context object at 0x7feffeed4910>
│ │ │ └ <function cli at 0x7fefdf5fbb50>
│ │ └
│ └ <function Context.invoke at 0x7feffeb44550>
└ <click.core.Context object at 0x7feffeed4910>
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
│ └ {'path': '/root/upayukti-model/form-16-sample-gpu-h100-1-try-2.pdf', 'output_dir': '/root/upayukti-model', 'method': 'auto', ...
└ ()
File "/usr/local/lib/python3.10/site-packages/magic_pdf/tools/cli.py", line 102, in cli
parse_doc(path)
│ └ '/root/upayukti-model/form-16-sample-gpu-h100-1-try-2.pdf'
└ <function cli..parse_doc at 0x7feffed328c0>
numpy.exceptions.AxisError: axis 2 is out of bounds for array of dimension 1`
How to reproduce the bug | 如何复现
Operating system | 操作系统
Linux
Python version | Python 版本
3.10
Software version | 软件版本 (magic-pdf --version)
0.8.x
Device mode | 设备模式
cuda
The text was updated successfully, but these errors were encountered: