| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Workshop about Python for Urban Analytics as part of the Singapore-ETH Centre (SEC) activities for the National Coding Week 2024.
The slides used for this workshop can be found in this repo in the file 20240916-python-workshop.pdf.
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.
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.
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/.
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.pyThe notebook for this is hosted on kaggle: https://www.kaggle.com/code/matiasqr/semantic-segmentation
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.
| Back | FazBrowse Home | New Git URL |