Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mpelchat04 committed Sep 25, 2023
2 parents e1264f1 + 1ac0667 commit c1f4e54
Show file tree
Hide file tree
Showing 14 changed files with 895 additions and 24 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ RUN apt-get update \
&& sudo mv cuda-ubuntu2004-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpg \
&& rm -f cuda-keyring_1.0-1_all.deb && rm -f /etc/apt/sources.list.d/cuda.list

# Install miniconda
# Install Mamba directly
ENV PATH $CONDA_DIR/bin:$PATH
RUN wget https://repo.continuum.io/miniconda/Miniconda$CONDA_PYTHON_VERSION-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
/bin/bash /tmp/miniconda.sh -b -p $CONDA_DIR && \
RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O /tmp/mamba.sh && \
/bin/bash /tmp/mamba.sh -b -p $CONDA_DIR && \
rm -rf /tmp/* && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -32,13 +32,13 @@ RUN useradd --create-home -s /bin/bash --no-user-group -u $USERID $USERNAME && \
chown $USERNAME $CONDA_DIR -R && \
adduser $USERNAME sudo && \
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER $USERNAME
WORKDIR /home/$USERNAME/

RUN cd /home/$USERNAME && git clone --depth 1 "https://github.com/NRCan/geo-deep-learning.git" --branch $GIT_TAG
RUN conda config --set ssl_verify no
RUN conda install libarchive mamba -c conda-forge
RUN mamba env create -f /home/$USERNAME/geo-deep-learning/environment.yml

ENV PATH $CONDA_DIR/envs/geo_deep_env/bin:$PATH
RUN echo "source activate geo_deep_env" > ~/.bashrc
RUN echo "source activate geo_deep_env" > ~/.bashrc
4 changes: 4 additions & 0 deletions config/model/gdl_hrnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @package _global_
model:
_target_: models.hrnet.hrnet_ocr.HRNet
pretrained: True
4 changes: 4 additions & 0 deletions config/model/gdl_segformer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @package _global_
model:
_target_: models.segformer.SegFormer
encoder: "mit_b2"
17 changes: 17 additions & 0 deletions docs/source/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,20 @@ folder to the complete list on different combinaisons.

Also from the same library, another version of *DeepLabV3*, named *DeepLabV3+* of the
*Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation* paper.

Segformer
================================================

*Segformer* model implementation is based on the `SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers <https://arxiv.org/abs/2105.15203>`_ paper.
The encoder is called from `SMP <https://github.com/qubvel/segmentation_models.pytorch>`_. For more code implementation details check this `repo <https://github.com/NVlabs/SegFormer>`_.

.. autoclass:: models.segformer.SegFormer


HRNet + OCR
================================================

*HRNet + OCR* model implementation is based on the `HRNet paper <https://ieeexplore.ieee.org/document/9052469>`_ and `OCR paper <https://arxiv.org/pdf/1909.11065.pdf>`_.
For more code implementation details check this `repo <https://github.com/NVIDIA/semantic-segmentation>`_.

.. autoclass:: models.hrnet.hrnet_ocr.HRNet
Empty file added models/hrnet/__init__.py
Empty file.
Loading

0 comments on commit c1f4e54

Please sign in to comment.