GithubHelp home page GithubHelp logo

vdurnov / xview2_1st_place_solution Goto Github PK

View Code? Open in Web Editor NEW
84.0 84.0 43.0 45 KB

1st place solution for "xView2: Assess Building Damage" challenge.

License: MIT License

Python 99.09% Dockerfile 0.28% Shell 0.64%

xview2_1st_place_solution's People

Contributors

vdurnov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xview2_1st_place_solution's Issues

Question about validate function of classification stage

Hi, I have a question about the validate function of classification stage.
The codes are in def validate(net,data_loader), train50_cls_cce.py.
`
for j in range(msks.shape[0]): # msks.shape[0] is batch size
tp[4] += np.logical_and(msks[j, 0] > 0, msk_pred[j] > 0).sum()
fn[4] += np.logical_and(msks[j, 0] < 1, msk_pred[j] > 0).sum()
fp[4] += np.logical_and(msks[j, 0] > 0, msk_pred[j] < 1).sum()

            targ = lbl_msk[j][msks[j, 0] > 0]
            pred = msk_damage_pred[j].argmax(axis=0)
            pred = pred * (msk_pred[j] > _thr)
            pred = pred[msks[j, 0] > 0]
            for c in range(4):
                tp[c] += np.logical_and(pred == c, targ == c).sum()
                fn[c] += np.logical_and(pred != c, targ == c).sum()
                fp[c] += np.logical_and(pred == c, targ != c).sum()

`
I was wondering why there is 'pred == c, targ == c' , when the values of c ranges from 0 to 3 while the values of targ ranges from 1 to 4?
Or did I get it wrong? Please explain to me. Thanks a million!

Submission folder has all black images

In the individual model output folders, I'm getting the correct outputs, i.e. there are buildings having different colors associated with their damage values.

But the submissions folder being created has all black images. I tried reading them using cv2 and all pixel values are indeed 0. Not sure how to proceed.

what if I only have one image to predict?

In the part of prediction, for example predict50cls.py, the script would find files with 'pre' and 'post' in their names. But when I only have one post disaster image, what should I do to use your model?

what the purpose of those code?

`

    msk[..., 1][msk[..., 2:].max(axis=2)] = False
    msk[..., 3][msk[..., 2]] = False
    msk[..., 4][msk[..., 2]] = False
    msk[..., 4][msk[..., 3]] = False
    msk[..., 0][msk[..., 1:].max(axis=2)] = False

`
I have a question, what does the above code do? The code is in ‘train50_cls_cce.py’ , about at 235 line. I've been trying to figure out what this means all day...

predict script clarification

In predict script such as pred92cls.py, there are two images generated saying part1 and part2. Are these image created to use cv2 which write 3 bands only and then there is overlapping of damage classes in both part?

Which model is the best one?

Thanks to your excellent work!
looks like you use several models separately (ResNet34, SeNet154...). May I ask which one has the best results? i.e., from which model does the 1st place score on xview2 leaderboard resulted from?

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.