Instructions to use foduucom/table-detection-and-extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use foduucom/table-detection-and-extraction with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("foduucom/table-detection-and-extraction", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
When running render.show() ,I am getting an error
Error: no "view" rule for type "image/png" passed its test case
(for more information, add "--debug=1" on the command line)
/usr/bin/xdg-open: 882: www-browser: not found
/usr/bin/xdg-open: 882: links2: not found
/usr/bin/xdg-open: 882: elinks: not found
/usr/bin/xdg-open: 882: links: not found
/usr/bin/xdg-open: 882: lynx: not found
/usr/bin/xdg-open: 882: w3m: not found
xdg-open: no method available for opening '/tmp/tmpj0ui6bix.PNG'
I am getting this error please look into it.
Hello, can you share the code snippet to help me understand the issue better? because it seems like the issue is related to tmp path.
Thank you!
from ultralyticsplus import YOLO, render_result
load model
model = YOLO('foduucom/table-detection-and-extraction')
set model parameters
model.overrides['conf'] = 0.25 # NMS confidence threshold
model.overrides['iou'] = 0.45 # NMS IoU threshold
model.overrides['agnostic_nms'] = False # NMS class-agnostic
model.overrides['max_det'] = 1000 # maximum number of detections per image
set image
image = 'image1.png'
perform inference
results = model.predict(image)
observe results
print(results[0].boxes)
render = render_result(model=model, image=image, result=results[0])
render.show()