遇见数据集

Sai150/roof-top-dataset

收藏
Hugging Face2026-04-06 更新2026-04-12 收录
官方服务:

资源简介:

--- license: mit task_categories: - image-segmentation - object-detection tags: - roof - satellite-imagery - building - segmentation - autocad - dxf pretty_name: Roof Top Segmentation Dataset size_categories: - n<1K --- # 🏠 Roof Top Segmentation Dataset A dataset for roof segmentation and edge detection from satellite imagery, with annotations derived from AutoCAD DXF drawings. ## Dataset Columns Each row is one roof sample: | Column | Type | Description | |--------|------|-------------| | `sample_id` | string | Unique ID (e.g. `roof_001`) | | `image` | Image | Satellite roof photograph | | `mask` | Image | Binary segmentation mask (white=roof) | | `overlay` | Image | Verification overlay with edge lines | | `outer_polygon` | string (JSON) | Roof boundary polygon in DXF coordinates | | `edges` | string (JSON) | Ridge/hip/valley edge lines in DXF coordinates | AutoCAD DXF source files are available in the `cad/` folder. ## Annotation Format ### Outer Polygon (`outer_polygon` column) ```json { "sample_id": "roof_001", "image_file": "roof_001.png", "image_width": 905, "image_height": 795, "class_name": "roof", "class_id": 0, "points_xy": [[x1, y1], [x2, y2], ...] } ``` ### Edges (`edges` column) ```json { "sample_id": "roof_001", "image_file": "roof_001.png", "image_width": 905, "image_height": 795, "edges": [ {"type": "line", "points": [[x1, y1], [x2, y2]]} ] } ``` **Note:** Coordinates are in AutoCAD DXF world units. Use the DXF IMAGE entity's insertion point and U/V pixel vectors to convert to pixel coordinates. ## DXF Coordinate → Pixel Conversion ```python import numpy as np, ezdxf doc = ezdxf.readfile("cad/roof_001.dxf") for entity in doc.modelspace(): if entity.dxftype() == "IMAGE": ins = entity.dxf.insert u = entity.dxf.u_pixel v = entity.dxf.v_pixel h = int(entity.dxf.image_size.y) M_inv = np.linalg.inv([[u.x, v.x], [u.y, v.y]]) # col, row = M_inv @ [x - ins.x, y - ins.y] # pixel_y = (h - 1) - row ``` ## Usage ```python from datasets import load_dataset ds = load_dataset("YOUR_USERNAME/roof-top-dataset") sample = ds["train"][0] sample["image"].show() # satellite image sample["mask"].show() # binary mask sample["overlay"].show() # overlay visualization import json polygon = json.loads(sample["outer_polygon"]) edges = json.loads(sample["edges"]) ``` ## License MIT

提供机构:
Sai150
二维码
社区交流群
二维码
科研交流群
商业服务