The official repo for the Artificial Intelligence for Resilient Urban Planning workshop by the City Intelligence Lab. The workshop was conducted from the 28th of June to the 3rd of July and was streamed live to our YouTube channel. This repo contains all of the workshop slides and files.
Download and install Anaconda (https://www.anaconda.com/distribution/, python 3).
If you already have Python installed on your system, please double check that it is ≥3.6 and that you can set up either virtualenvs or pipenvs.
/mlgh-pix2pix
Open anaconda prompt and create a new environment named "pix2pix" using the following command (more info here: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html):
conda create --name pix2pix python=3.7
Activate that conda environment:
activate pix2pix
Install the required packages (copy/paste commands):
conda install -c pytorch pytorch torchvision cudatoolkit=10.0
conda install -c conda-forge altair vega_datasets notebook vega h5py hdf5 imageio matplotlib seaborn pandas numpy networkx graphviz category_encoders feather-format scikit-learn scikit-image dominate visdom moviepy jsonpatch
conda install scipy==1.1.0
conda install Pillow
pip install opencv-contrib-python
/mlgh-dqn
Open anaconda prompt and create a new environment named "dqn" and activate it:
conda create --name dqn python=3.6
activate dqn
Install the required package:
conda install tensorflow
Download the following plugins from Food4Rhino. If you already have them installed, make sure they are the latest version!
/colab-notebooks/streetview-images.ipynb
If you haven't already, sign up for a Mapillary account here.
Create a client ID to access the API by visiting the developers dashboard and clicking "Register Application" on the top right of the screen.
Fill in the "Register an Application" form making sure to switch the "private:read" toggle in the "Allow this application to" section. Note that the callback URL will act as the IP where you'll be making requests from.
Retrieve your token (used for making requests) by going to:
https://www.mapillary.com/connect?scope=private:read&client_id=<client_id>&redirect_uri=<callback_url>&state=return&response_type=token
replacing <client_id>
and <callback_url>
with these values found in the dashboard.
If successful, you should be redirected to your callback_url
, but with a different URL in the address bar. At the end of your callback_url
you should see ?token_type=bearer&access_token=
followed by a giant string. This is your access token. Copy everything between access_token=
and &expires_in=never&state=return
, and save it somewhere.