Skip to content

Commit

Permalink
images
Browse files Browse the repository at this point in the history
  • Loading branch information
QianC95 committed Oct 21, 2024
1 parent 0087f9c commit 6266d17
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion source/3D Location Encoder/NeRF.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The `NERFSpatialRelationLocationEncoder` is designed to compute spatial embeddin
### Features
<p align="center">
<img src="../figs/NeRF.png" alt="NeRF-transformation" title="NeRF-transformation" width="60%" />
<img src="../images/NeRF.png" alt="NeRF-transformation" title="NeRF-transformation" width="60%" />
</p>

### Configuration Parameters
Expand Down
2 changes: 1 addition & 1 deletion source/3D Location Encoder/Sphere2Vec-dfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The `DFTSpatialRelationLocationEncoder` is designed to process spatial relations
### Overview
This position encoder leverages Discrete Fourier Transform (DFT) techniques to encode spatial coordinates into the frequency domain, enabling the model to recognize patterns and relationships that are not immediately apparent in the spatial domain.
<p align="center">
<img src="../figs/dfs.png" alt="dfs-transformation" title="dfs-transformation" width="80%" />
<img src="../images/dfs.png" alt="dfs-transformation" title="dfs-transformation" width="80%" />
</p>
### Features
- **Frequency Domain Conversion**: Transforms spatial data into a frequency-based representation, capturing inherent spatial frequencies and patterns effectively.
Expand Down
2 changes: 1 addition & 1 deletion source/3D Location Encoder/Sphere2Vec-sphereC+.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The `SphereGridSpatialRelationLocationEncoder` is engineered for encoding spatia
- **Sinusoidal Encoding**: Applies sinusoidal functions to encode spatial differences, enhancing the model's ability to learn from these features.
- **Configurable Parameters**: Supports customization of encoding parameters such as space dimensionality and computation device.
<p align="center">
<img src="../figs/sphereC+.png" alt="sphereC-plus-transformation" title="sphereC-plus-transformation" width="80%" />
<img src="../images/sphereC+.png" alt="sphereC-plus-transformation" title="sphereC-plus-transformation" width="80%" />
</p>
### Configuration Parameters
- **coord_dim**: Dimensionality of the space being encoded (e.g., 2D, 3D).
Expand Down
2 changes: 1 addition & 1 deletion source/3D Location Encoder/Sphere2Vec-sphereC.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The `SphereSpatialRelationLocationEncoder` is designed for encoding spatial rela
### Overview
<p align="center">
<img src="../figs/Sphere2Vec-sphereC.png" alt="Sphere2Vec-sphereC-transformation" title="Sphere2Vec-sphereC-transformation" width="60%" />
<img src="../images/Sphere2Vec-sphereC.png" alt="Sphere2Vec-sphereC-transformation" title="Sphere2Vec-sphereC-transformation" width="60%" />
</p>
#### Spherical Coordinate Transformation

Expand Down
2 changes: 1 addition & 1 deletion source/3D Location Encoder/Sphere2Vec-sphereM+.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Processes input coordinates through the location encoder to produce detailed spa
### Overview
This position encoder transforms spatial coordinates using a sophisticated sinusoidal encoding method, featuring multiple scales to capture a wide range of spatial details.
<p align="center">
<img src="../figs/sphereM+.png" alt="sphereM-plus-transformation" title="sphereM-plus-transformation" width="60%" />
<img src="../images/sphereM+.png" alt="sphereM-plus-transformation" title="sphereM-plus-transformation" width="60%" />
</p>

### Features
Expand Down
2 changes: 1 addition & 1 deletion source/3D Location Encoder/xyz.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Processes a batch of coordinates and converts them into spatial relation embeddi
- Convert latitude `lat` and longitude `lon` coordinates into radians.
- Calculate `x, y, z` coordinates using the following equations:
<p align="center">
<img src="../figs/xyz.png" alt="xyz-transformation" title="xyz-transformation" width="80%" />
<img src="../images/xyz.png" alt="xyz-transformation" title="xyz-transformation" width="80%" />
</p>
- Concatenate `x, y, z` coordinates to form the high-dimensional vector representation.

Expand Down
16 changes: 8 additions & 8 deletions source/Basic Concepts/Single point location encoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ output:
pdf_document: default
---

# 1. Single point location encoder
# Single point location encoder
<p align="center">
<img src="../images/single_location_encoder_structure.png" alt="Location Encoder Structure" title="General Structure of Single Location Encoder" width="30%" />
</p>


## 1.1 EncoderMultiLayerFeedForwardNN()
## EncoderMultiLayerFeedForwardNN()
`NN(⋅) : ℝ^W -> ℝ^d` is a learnable neural network component which maps the input position embedding `PE(x) ∈ ℝ^W` into the location embedding `Enc(x) ∈ ℝ^d`. A common practice is to define `NN(⋅)` as a multi-layer perceptron, while Mac Aodha et al. (2019) adopted a more complex `NN(⋅)` which includes an initial fully connected layer, followed by a series of residual blocks. The purpose of `NN(⋅)` is to provide a learnable component for the location encoder, which captures the complex interaction between input locations and target labels.

### 1.1.1 Properties
### Properties

- `input_dim` (int): Dimensionality of the input embeddings.
- `output_dim` (int): Dimensionality of the output of the network.
Expand All @@ -25,7 +25,7 @@ output:
- `skip_connection` (bool): If set to True, enables skip connections between layers.
- `context_str` (str, optional): An optional string providing context for this instance, such as indicating its role within a larger model.

### 1.1.3 Methods
### Methods

#### `__init__(input_dim, output_dim, num_hidden_layers=0, dropout_rate=None, hidden_dim=-1, activation="sigmoid", use_layernormalize=False, skip_connection=False, context_str=None)`
Constructor for the `EncoderMultiLayerFeedForwardNN` class.
Expand Down Expand Up @@ -53,10 +53,10 @@ Defines the forward pass of the network.



## 1.2 PositionEncoder()
## PositionEncoder()
`PE(⋅)` is the most important component which distinguishes different `Enc(x)`. Usually, `PE(⋅)` is a *deterministic* function which transforms location x into a W-dimension vector, so-called position embedding. The purpose of `PE(⋅)` is to do location feature normalization (Chu et al. 2019, Mac Aodha et al. 2019, Rao et al. 2020) and/or feature decomposition (Mai et al. 2020b, Zhong et al. 2020) so that the output `PE(x)` is more learning-friendly for `NN(⋅)`. In Table 1 we further classify different `Enc(x)` into four sub-categories based on their `PE(⋅)`: discretization-based, direct, sinusoidal, and sinusoidal multi-scale location encoder. Each of them will be discussed in detail below.

### 1.2.1 Properties
### Properties
- `spa_embed_dim` (int): The dimension of the output spatial relation embedding.
- `coord_dim` (int): The dimensionality of space (e.g., 2 for 2D, 3 for 3D).
- `frequency_num` (int): The number of different frequencies/wavelengths for the sinusoidal functions.
Expand All @@ -67,7 +67,7 @@ Defines the forward pass of the network.
- `device` (str): The device to which tensors will be moved ('cuda' or 'cpu').


### 1.2.2 Methods
### Methods
### `get_activation_function(activation, context_str)`
- **Parameters**:
- `activation`: A string that specifies the type of activation function to retrieve.
Expand Down Expand Up @@ -222,6 +222,6 @@ Computes the embedding for a path between nodes.
<div style="display:none">
# 2. Aggregation location encoder
<p align="center">
<img src="./figs/aggregation_location_encoder_structure.png" alt="Structure of Aggregation Location Encoder Structure" title="General Structure of Location Encoder" width="40%" />
<img src="./images/aggregation_location_encoder_structure.png" alt="Structure of Aggregation Location Encoder Structure" title="General Structure of Location Encoder" width="40%" />
</p>
</div>
3 changes: 0 additions & 3 deletions source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
myst-parser
renku-sphinx-theme
sphinx_pdj_theme
groundwork-sphinx-theme
sphinx-press-theme

0 comments on commit 6266d17

Please sign in to comment.