GithubHelp home page GithubHelp logo

lojzezust / slr Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 6.37 MB

Scaffolded Learning Regime for training maritime obstacle detection networks

Python 98.55% Shell 1.45%
maritime obstacle-detection pytorch semantic-segmentation weak-supervision

slr's People

Contributors

lojzezust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

aluckyi

slr's Issues

Code takes as masks dense ground truth labels on warm-up stage

Good afternoon, @lojzezust
May be, I misled smth but I created the dataset with weak annotations. I ran prepare_data.py script on the data and got the next dir tree:

├── all_list.txt
├── all_weak.yaml
├── all.yaml
├── dextr_masks.json
├── images
├── imus
├── masks_weak
├── objects
├── pa_similarity
├── prior_instance_masks
├── test_list.txt
├── train_list.txt
├── train.yaml
├── val_list.txt
├── val.yaml
└── weak_annotations.json

But when I run train_slr.sh on this data, I got an error that there are no masks directory. So, I returned back to your dataset, opened masks dir and noticed that it has dense GT labels. It seemed strange for me as SLR is the training algorithm which should use only weak annonation (masks_weak). But in your implementation it seems that SLR uses dense GT labels at warm-up stage. Could you please clarify it for me? Why they are used here? In validation?
masks are used in losses:

fl = focal_loss(out['out'], labels['segmentation'], target_scale=self.focal_loss_scale)

separation_loss = torch.tensor(0.0)
if self.separation_loss:
    separation_loss = water_obstacle_separation_loss(
        out['aux'], labels['segmentation'], include_sky=self.separation_loss_sky)

pa_loss = torch.tensor(0.0)
if self.pairwise_affinity_loss:
    ignore_mask = None
    if self.object_loss is not None:
        ignore_mask = labels['objects'].max(1).values
    pa_loss = pairwise_affinity_loss(out['out'], labels['segmentation'], labels['pa_similarity'],
                                     tau=self.pairwise_affinity_loss_tau, target_scale=self.focal_loss_scale, ignore_mask=ignore_mask)

separation_loss = self.separation_loss_lambda * separation_loss
pa_loss = self.pairwise_affinity_loss_lambda *

For now, I changed in yamls mask_dir to masks_weak and started learning. You just use GT to calculate metrics on valid step?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.