Giter VIP home page Giter VIP logo

Comments (18)

23pointsNorth avatar 23pointsNorth commented on July 27, 2024 2

Another addition would be

from chainercv.

yuyu2172 avatar yuyu2172 commented on July 27, 2024

Thumbs up on this issue. 👍

I would prefer a model which we can compare performance to the reported ones.

from chainercv.

zori avatar zori commented on July 27, 2024

@23pointsNorth Just to mention Mask R-CNN is for instance segmentation and cannot produce a semantic segmentation. Otherwise, certainly a good to have one!

from chainercv.

souravsingh avatar souravsingh commented on July 27, 2024

I am interested in working on the issue

from chainercv.

yuyu2172 avatar yuyu2172 commented on July 27, 2024

Cool! Which model are you interested in?

from chainercv.

souravsingh avatar souravsingh commented on July 27, 2024

@yuyu2172 I am interested in adding U-Net and FC DenseNet.

from chainercv.

yuyu2172 avatar yuyu2172 commented on July 27, 2024

Nice. I would love to have those added.
It would be nice if the PR has the similar structure as this one #757

from chainercv.

kumasento avatar kumasento commented on July 27, 2024

Hi @mitmul , sorry for bothering you, but I'm really curious about how to reproduce the result you've got for SegNet on CamVid. I tried the script with its default setting, but the best evaluation mIoU I can get is just 0.3368. Maybe you ran it for longer time than 16k iterations? Thanks!

from chainercv.

mitmul avatar mitmul commented on July 27, 2024

@kumasento I haven’t confirmed the reproduction with newer version of ChainerCV code by myself for a long while, so let me check the result using the latest version again. I’ll run this example:
https://github.com/chainer/chainercv/tree/master/examples/segnet

from chainercv.

kumasento avatar kumasento commented on July 27, 2024

@mitmul Thank you very much! That's the exact script I've run before.

from chainercv.

mitmul avatar mitmul commented on July 27, 2024

@kumasento I ran the script and got the following result (I removed log lines containing only training error information):

$ python calc_weight.py
$ MPLBACKEND=Agg python train.py --gpu 0
epoch       iteration   elapsed_time  lr          main/loss   validation/main/miou  validation/main/mean_class_accuracy  validation/main/pixel_accuracy
65          2000        1117.47       0.1         0.187626    0.569284              0.772247                             0.855193
130         4000        2229.86       0.1         0.105407    0.543893              0.701374                             0.855025
196         6000        3340          0.1         0.110691    0.361815              0.59967                              0.650387
261         8000        4448.21       0.1         0.10473     0.500844              0.703283                             0.821186
326         10000       5555.72       0.1         0.341374    0.27762               0.541763                             0.551853
392         12000       6666.44       0.1         0.0865148   0.501126              0.657423                             0.830836
457         14000       7776.4        0.1         0.114381    0.534688              0.750539                             0.835903
523         16000       8884.18       0.1         0.101966    0.588422              0.763433                             0.879876

So, the final mIoU reached to 0.588422 that is somehow better than the results reported in the README of this example code. What versions of Python, Chainer, ChainerCV and CuPy did you use? My environment was:

$ python -V
Python 3.7.4
$ python -c 'import chainer; print(chainer.print_runtime_info())'
Platform: Linux-4.15.0-58-generic-x86_64-with-debian-buster-sid
Chainer: 7.0.0
ChainerX: Not Available
NumPy: 1.17.4
CuPy:
  CuPy Version          : 7.0.0
  CUDA Root             : /usr/local/cuda
  CUDA Build Version    : 10010
  CUDA Driver Version   : 10010
  CUDA Runtime Version  : 10010
  cuBLAS Version        : 10201
  cuFFT Version         : 10101
  cuRAND Version        : 10101
  cuSOLVER Version      : (10, 2, 0)
  cuSPARSE Version      : 10300
  NVRTC Version         : (10, 1)
  cuDNN Build Version   : 7605
  cuDNN Version         : 7605
  NCCL Build Version    : 2402
  NCCL Runtime Version  : 2402
iDeep: Not Available

Could you also give me the log?

from chainercv.

kumasento avatar kumasento commented on July 27, 2024

from chainercv.

mitmul avatar mitmul commented on July 27, 2024

@kumasento OK, thanks for the guide. I'll run the evaluation on the test dataset. Please give me some more time.

from chainercv.

mitmul avatar mitmul commented on July 27, 2024

@kumasento I ran the evaluation on the test dataset of CamVid with this script:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import json

from chainer import iterators
from chainer.dataset import concat_examples
from chainer.serializers import load_npz
from chainercv.datasets import CamVidDataset, camvid_label_names
from chainercv.evaluations import eval_semantic_segmentation
from chainercv.links import SegNetBasic
from chainercv.utils import apply_to_iterator

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('--snapshot', type=str,
                        default='result/snapshot_model.npz')
    parser.add_argument('--batchsize', type=int, default=12)
    parser.add_argument('--gpu', type=int, default=0)
    args = parser.parse_args()

    test = CamVidDataset(split='test')
    test_iter = iterators.SerialIterator(
        test, args.batchsize, shuffle=False, repeat=False)

    model = SegNetBasic(n_class=len(camvid_label_names))
    load_npz(args.snapshot, model)
    model = model.to_gpu(args.gpu)

    in_values, out_values, rest_values = apply_to_iterator(
        model.predict, test_iter)

    del in_values

    pred_labels, = out_values
    gt_labels, = rest_values

    result = eval_semantic_segmentation(pred_labels, gt_labels)

    print(f"miou: {result['miou']}")

and got miou: 0.4834565081914471 that is actually worse than the reported value in the README (49.4 %) but better than the original value of 46.3 %.
I used this snapshot:
snapshot_model.npz.zip

So, from my experiments, it seems not to succeed to reproduce your result with miou: 0.3368.
Could you also let me know the information about your environment?

from chainercv.

kumasento avatar kumasento commented on July 27, 2024

@mitmul Thanks! I can achieve the same accuracy a you did with the same snapshot. I will rerun the training and see whether I can get the same level of accuracy.

from chainercv.

kumasento avatar kumasento commented on July 27, 2024

BTW my environment:

$ python -V
Python 3.7.3
$ python -c 'import chainer; print(chainer.print_runtime_info())'
Platform: Linux-4.4.0-142-generic-x86_64-with-debian-stretch-sid
Chainer: 6.3.0
NumPy: 1.16.4
CuPy:
  CuPy Version          : 6.3.0
  CUDA Root             : /usr/local/cuda-10.1
  CUDA Build Version    : 10010
  CUDA Driver Version   : 10010
  CUDA Runtime Version  : 10010
  cuDNN Build Version   : 7602
  cuDNN Version         : 7602
  NCCL Build Version    : 2402
  NCCL Runtime Version  : 2402
iDeep: Not Available
None

from chainercv.

kumasento avatar kumasento commented on July 27, 2024

@mitmul After running again and using the snapshot that has the highest validation accuracy, I can now get a good test accuracy :) Thanks

from chainercv.

mitmul avatar mitmul commented on July 27, 2024

@kumasento Good!

from chainercv.

Related Issues (20)

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.