Instructions to use dl1wjd2/Logistics_AX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use dl1wjd2/Logistics_AX 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("dl1wjd2/Logistics_AX", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
File size: 1,020 Bytes
bbae060 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import os
from datetime import datetime, timezone
from typing import List, Optional, Text, Union
def file_exists(path: Union[bytes, str, "os.PathLike[Text]"]) -> bool:
"""Validates file path as existing local file"""
return os.path.isfile(path)
def get_file_modtime(path: Union[bytes, str, "os.PathLike[Text]"]) -> Text:
"""Returns ISO formatted file modification time in local system timezone"""
return (
datetime.fromtimestamp(os.stat(path).st_mtime, timezone.utc)
.astimezone()
.isoformat()
)
def get_tables_argument_list(table_list: Optional[List[Text]]) -> Optional[List[Text]]:
"""Converts a list of OpenType table string into a Python list or
return None if the table_list was not defined (i.e., it was not included
in an option on the command line). Tables that are composed of three
characters must be right padded with a space."""
if table_list is None:
return None
else:
return [table.ljust(4) for table in table_list]
|