mapbox / mapbox/robosat

Warmup epochs with frozen pre-trained encoder weights to initialize decoder

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.1k
Forks
385
PR merge metrics
No merged PRs in 30d

Description

At the moment we are using a pre-trained ResNet as an encoder in our encoder-decoder architecture:

https://github.com/mapbox/robosat/blob/8b7566e3b5de3583eb64fbb641ff18b9ff01f901/robosat/unet.py#L94-L100

https://github.com/mapbox/robosat/blob/8b7566e3b5de3583eb64fbb641ff18b9ff01f901/robosat/unet.py#L123-L134

We are currently training the model as is with all layers unfrozen.

We should investigate if freezing the ResNet encoder and running a few warmup epochs to initialize the decoder layers (then unfreezing parts or all of the ResNet) helps.

Here is how we can freeze the encoder - unfreezing works similarly:

```python3
def freeze(self):
for layer in (self.enc0, self.enc1, self.enc2, self.enc3, self.enc4):
for param in layer.parameters():
param.requires_grad = False
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in robosat/unet.py at lines 94-100 and 123-134, then review the encoder layers named enc0 through enc4 and the proposed freeze method. Compare training with frozen-encoder warmup epochs against later unfreezing; done means determining whether this improves decoder initialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.