FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

matqr/python-urban-analytics-workshop: SEC Workshop about Python for Urban Analytics · GitHub

Repository navigation

About

SEC Workshop about Python for Urban Analytics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

python-urban-analytics-workshop

Workshop about Python for Urban Analytics as part of the Singapore-ETH Centre (SEC) activities for the National Coding Week 2024.

Takeaway

  • Have an initial understanding of Street-View imagery use cases and data manipulation
  • Overview of open source resources SEC and collaborators are producing

Content

The slides used for this workshop can be found in this repo in the file 20240916-python-workshop.pdf.

Requirements

Install Python 3.10.14 and run

pip install -r requirements.txt

You may need to double check for the geos package. On a mac, run

conda install -c conda-forge geos

Create a Mapillary account and get an API token.

Global Streetscapes

We will use the Global Streetscapes dataset! With more than 9 million images from 688 cities and 300+ features, it's the right place to start playing with SVIs.

Download the code

As mentioned in the Download Images wiki, we will use the code from code/download_imgs.

Go to this URL and paste the folder URL.

Unzip the folder within this repo and rename the folder to download_imgs/.

Download the dataset from huggingface

As mentioned in the Dataset card, please avoid using git clone to download the repo as Git stores the files twice and will double the disk space usage to 124+ GB.

Make sure you have at least 40GB of free space.

Run the file 1-download-huggingface.py to download the data/ folder as well as the additional files cities688.csv and info.csv.

Then, follow the notebook 2-data_download.ipynb to generate the final .csv with the desired images.

Finally, as mentioned in the Download Images wiki, go to download/imgs/download_jpegs.py and update the files paths:

in_csvPath = 'download_imgs/selected_points.csv' # input csv, the name of the saved file in 2-data_download.ipynb
out_mainFolder = './global-streetscapes/svis/'

In this file, and in download_imgs/download_jpegs_mapillary.py, update your Mapillary token. Finally, run:

python download_imgs/download_jpegs.py

Semantic Segmentation

The notebook for this is hosted on kaggle: https://www.kaggle.com/code/matiasqr/semantic-segmentation

Human Perception

The script 3_inference.py is the same codebase used in the Global Streetscapes.

Run python 3_inference.py

The notebook 4_perception-comparison.ipynb elaborates on the different city perceptions.

References

  • Hou, Y., Quintana, M., Khomiakov, M., Yap, W., Ouyang, J., Ito, K., Wang, Z., Zhao, T. & Biljecki, F. (2024). Global Streetscapes — A comprehensive dataset of 10 million street-level images across 688 cities for urban science and analytics. ISPRS Journal of Photogrammetry and Remote Sensing, 215, 216–238. https://doi.org/10.1016/j.isprsjprs.2024.06.023

About

SEC Workshop about Python for Urban Analytics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL