Autoplotter With Road Estimator Crack (Official)

| Component | Core Function | Typical Input | Typical Output | |-----------|---------------|---------------|----------------| | Autoplotter | High‑throughput raster → vector conversion, geometric cleaning, and map‑ready rendering. | Orthophotos, LiDAR‐derived DEMs, satellite imagery (GeoTIFF, Cloud‑Optimized GeoTIFF). | GeoJSON / Shapefile road network, lane centrelines, shoulder polygons, attribute tables. | | Road‑Estimator | Machine‑learning based road‑surface condition estimator (roughness, texture, and especially crack detection). | Aligned road‑centerline vectors + high‑resolution surface imagery (e.g., 0.05 m/pixel UAV orthophotos). | Per‑segment crack probability, crack geometry (polylines), severity scores, confidence intervals. | | Integration Layer | Orchestrates data flow, spatial joins, and quality‑control (QC) reporting. | Outputs from the two modules above. | Final “crack‑map” product ready for GIS, asset‑management, or autonomous‑vehicle (AV) simulation. |

Bottom line: By feeding the clean, topology‑aware road vectors from Autoplotter into a Road‑Estimator model, you get pixel‑accurate crack geometries that are automatically linked to the underlying road network. The result is a single, up‑to‑date geospatial dataset that can feed maintenance planning, budgeting, and AI‑driven driving‑simulation pipelines. autoplotter with road estimator crack


  • Output: Generation of a geo-referenced database highlighting distress locations, types, and severities, ready for maintenance planning.

  • +-------------------+   1. Acquire imagery (UAV/airborne)   +--------------------+
    |   Raw COG Tiles   |------------------------------------->|   Autoplotter      |
    +-------------------+                                    +--------------------+
              |                                                    |
              | 2. Clean road vectors (GeoPackage)                |
              v                                                    v
    +-------------------+   3. Buffer & clip per road segment   +--------------------+
    |   Road Vectors    |<------------------------------------|   Clip & Align     |
    +-------------------+                                    +--------------------+
              |                                                    |
              | 4. Run Road‑Estimator on each chip                |
              v                                                    v
    +-------------------+   5. Crack polygons & severity       +--------------------+
    |   Crack GeoJSON   |------------------------------------->|   QC Dashboard     |
    +-------------------+                                    +--------------------+
              |
              | 6. Merge (spatial join) → Final product
              v
    +-------------------+   7. Publish to GIS/Asset DB (PostGIS, ArcGIS)   +--------------------+
    |  Final Crack Map  |---------------------------------------------------->|   Decision‑Support |
    +-------------------+                                                    +--------------------+
    
    from cracknet import DeepCrack
    model = DeepCrack("weights/deepcrack_resnet.pth")
    model.eval()
    def infer_crack(chip):
        prob = model.predict(chip)          # (H, W) probability map
        binary = prob > 0.5                 # threshold
        # Morphological clean‑up
        cleaned = binary_opening(binary, disk(2))
        # Vectorize cracks (thin → skeleton → polygonize)
        cracks = rasterio.features.shapes(cleaned.astype('uint8'), transform=transform)
        # Convert to GeoDataFrame
        gdf = gpd.GeoDataFrame([
            "road_id": rid, "geometry": shape, "prob": prob.mean()
            for shape, value in cracks if value == 1
        ], crs="EPSG:3857")
        return gdf
    

    Key post‑processing steps

    | Step | Reason | |------|--------| | Morphological opening/closing | Removes spurious speckles, bridges tiny gaps (< 0.1 m). | | Skeletonization + line‑simplification | Produces clean polylines suitable for GIS. | | Confidence‑weighted filtering | Keeps only segments where prob > 0.7 or where the model’s uncertainty (Monte‑Carlo dropout) is low. | | Spatial join to road vector | Ensures each crack inherits road_id, lane_count, surface_type. | | Component | Core Function | Typical Input