Giter Club home page Giter Club logo

roadnetworkcreator's Introduction

RoadNetworkCreator_by_View

操作手册

  • 街景数据获取及预测更新

    # src/panos_traverse.py
    crawel_panos_in_district_area('盐田区')
    
    # Docker(lstr): /Data/LaneDetection_PCL/LSTR/predict.py
    predict_batch('/Data/minio_server/panos', overwrite=False)
    
    # db/db_process.py: update lane num in panos and roads
    update_lane_num_in_DB()

路网生成

通过API获取深圳市osm路网

脚本简介

  • src/baidu_map.py 和百度地图相关的脚本,用于获取道路线性的信息

    • get_road_shp_by_search_API get road shape by Baidu searching API using the road name
    • roads_from_baidu_search_API 借助fishnet,从百度地图中获取路网
    • fishenet create fishnet based on the polygon
  • src/pano_base.py 本脚本主要用于采集pano基础信息,实现的方法是通过bfs遍历道路, 其中也涉及get_unvisited_point获取没有覆盖的点

    • get_proxy 获取代理资源
    • get_road_buffer Obtain the buffer of a special road by name. The shape is queried by the Baidu searching API.
    • query_pano 通过(x,y)或者pid获取pano的信息
    • traverse_panos_by_road_name Traverse Baidu panos through the road name. This Function would query the geometry by searching API. Then matching algh is prepared to matched the panos to the geometry.
  • src/pano_img.py 通过DB中的线数据获取pano照片

  • src/panos_traverse.py 本脚本

    • traverse_panos_by_rid obtain the panos in road[rid], 若没有数据则调用pano_API 异步获取数据
    • count_panos_num_by_area Count panos number in several area.
    • crawel_panos_in_district_area 用于查询图片是否已抓取,若没有则调用panoAPI开启异步模式 获取某一行政区内所有的街景图片
  • src/predict_lanes.py 主要用于某个路段车道线预测可视化的情况,以及是否添加方位角、地图、线形等元素。

    • pred_osm_road_by_rid 基于osm中rid的道路匹配panos,然后调用模型预测车道线情况,将预测结果绘制在街景上。其中调用子函数lane_shape_predict_for_rid_segment(预测某一个路段所有的街景,并生成预测动画或图片), 然后将所有rid的照片合并成一张图片
    • plot_pano_and_its_view, add_location_view_to_img Plot helper
    • update_unpredict_panos 预测尚未有数据的街景照片
  • src/road_matching.py 主要

    • get_panos_of_road_by_id 通过frenchet距离匹配某条道路的百度街景pano轨迹,并返回匹配的pano
    • . ..
  • src/road_network.py 主要

    • . ..
    • . ..

API

视网膜系统

启动

# physical machine
cd /home/pcl/server/pcl/pano_data
nohup python3 pano.py > pano.log &

API情况

批量更新处理, 预测并更新街景车道线数量

  • Use the latest model to predict the lane number of each pano and update the attribute. The result is stored in /Data/minio_server/input/lane_shape_predict_memo.h5

    # docker lstr 
    cd /Data/LaneDetection_PCL/LSTR
    conda activate lstr
    python predict.py
    

数据

常用脚本

File Memo
src/db/db_process.py update_lane_num_in_DB: 用于更新DB中的车道线情况
src/db/test_dataset_other_cities_panos.py 用于获取其他城市的街景用于构建测试集
src/db/features_API.py 用于按区域提取pano点数据线数据
src/db/minio_helper.py 上传文件至minio服务器
src/labels/label_json_parser 将labelme的数据转换成lstr模型的输入
src/model/lstr.py 访问lstr api获取街景的车道线信息
src/panos/panoAPI.py 基于celery构建的分布式爬虫接口

分布式街景爬虫

借助celery实现分布式爬虫, git repo: https://git.pcl.ac.cn/huangwk/pano_distributed_crawler

# physical machine
cd /home/pcl/traffic/pano_distributed_crawler
cd ./src; nohup sh start_panos.sh &

IP资源池

简易高效的代理池

# phisical mechine 
cd /home/pcl/traffic/ProxyPool
docker-compose up

roadnetworkcreator's People

Contributors

wenke727 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.