--- datasets: lh9171338/F-Wireframe pretty_name: F-Wireframe Dataset license: mit tags: - computer-vision - line-segment-detection - wireframe-parsing - fisheye image size_categories: n<1K --- # F-Wireframe Dataset
✏️ Github   |   📑 Paper    |   🖼️ Viewer
This is the F-Wireframe dataset, designed for fisheye image line segment detection. ## Summary The F-Wireframe dataset is derived from the [Wireframe](https://huggingface.co/datasets/lh9171338/Wireframe) dataset by distorting images with the fisheye distortion model, where the fisheye distortion coefficient of each image is randomly generated. Number of samples: - Train: 5,000 - Test: 462 ## Download - Download with huggingface-hub ```shell python3 -m pip install huggingface-hub huggingface-cli download --repo-type dataset lh9171338/F-Wireframe --local-dir ./ ``` - Download with Git ```shell git lfs install git clone https://huggingface.co/datasets/lh9171338/F-Wireframe ``` ## Usage - Load the dataset from Hugging Face Hub ```python from datasets import load_dataset ds = load_dataset("lh9171338/F-Wireframe") # or load from `refs/convert/parquet` for acceleration # from datasets import load_dataset, Features, Image, Sequence, Value # features = Features({ # "image": Image(), # "image_file": Value("string"), # "image_size": Sequence(Value("int32")), # "camera_type": Value("string"), # "camera_coeff": { # "K": Sequence(Sequence(Value("float32"))), # "D": Sequence(Value("float32")), # }, # "lines": Sequence(Sequence(Sequence(Value("float32")))), # }) # ds = load_dataset("lh9171338/F-Wireframe", features=features, revision="refs/convert/parquet") print(ds) # DatasetDict({ # train: Dataset({ # features: ['image', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines'], # num_rows: 5000 # }) # test: Dataset({ # features: ['image', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines'], # num_rows: 462 # }) # }) print(ds["test"][0].keys()) # dict_keys(['file_name', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines']) ``` - Load the dataset from local ```python from datasets import load_dataset ds = load_dataset("imagefolder", data_dir=".") print(ds) # DatasetDict({ # train: Dataset({ # features: ['image', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines'], # num_rows: 5000 # }) # test: Dataset({ # features: ['image', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines'], # num_rows: 462 # }) # }) print(ds["test"][0].keys()) # dict_keys(['file_name', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines']) ``` - Load the dataset with jsonl files ```python import jsonlines with jsonlines.open("test/metadata.jsonl") as reader: infos = list(reader) print(infos[0].keys()) # dict_keys(['file_name', 'image_file', 'image_size', 'camera_type', 'camera_coeff', 'lines']) ``` ## Citation ``` @article{LI2021187, title = {ULSD: Unified line segment detection across pinhole, fisheye, and spherical cameras}, author = {Hao Li and Huai Yu and Jinwang Wang and Wen Yang and Lei Yu and Sebastian Scherer}, journal = {ISPRS Journal of Photogrammetry and Remote Sensing}, volume = {178}, pages = {187-202}, year = {2021}, } ```