Giter Site home page Giter Site logo

pytorch-unsupervised-segmentation's People

Contributors

chrisbellew avatar kanezaki 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytorch-unsupervised-segmentation's Issues

Need scikit-image as dependency

Hi,
The README file only states opencv2 and PyTorch as dependencies. However, this program also needs scikit-image to work. Perhaps consider to add it to the README file?

Error when executing the demo command

Hi,
I tried to execute the demo command on README and get the below errors:

python demo.py --input images/101027.jpg
Traceback (most recent call last):
  File "demo.py", line 118, in <module>
    print (batch_idx, '/', args.maxIter, ':', nLabels, loss.data[0])
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

I'm not familiar with tensor though. Could you please suggest how to modify the code to solve this problem?
My system is Windows 10. Python version 3.7.3. PyTorch==1.2+cpu, opencv-python==4.1.1.26, scikit-image==0.15.0.

How can we specify the segmentation class number?

Dear @kanezaki ,

Thanks for sharing the great work.

It seems the number of classes is determined by SLIC.

u_labels = np.unique(labels)
l_inds = []
for i in range(len(u_labels)):
l_inds.append( np.where( labels == u_labels[ i ] )[ 0 ] )

How can we manually specify the segmentation class number?
e.g., I only want the method segments the input image into 3 classes.

Best regards,
Jun

Training & Saving Model

Hi,
Thanks for the paper & open sourcing the code.
I was planning to use this approach to label a dataset and save the model. In future use the same model with same classes for new images.

How would you suggest to proceed with it , saving the model & classes ?

a problem about about FCN

Hello,
Thanks for the paper & open sourcing the code very much.
I noticed that in the paper you mentioned "...Note that these components for feature extraction are able to be replaced by alternatives such as fully convolutional networks (FCN) .. ", so I imported the fcn-8s-atonce model structure code, and tried to run it with pretrained parameters and with the default pytorch parameters. But both of the results are bad:

For the former, fcn-8s-atonce model with pretrained parameters, the output segmented graphs are like these:
the original image:
yuantu

iteration 1:
seg_0s

iteration2:
seg_1s

iteration3:
seg_2s

And the following iterations result are just like iteration3, by the way, I deleted the limitation of the number of the output classes. It seems that overfit happens.

And For the latter one, fcn-8s-atonce model with default pytorch parameters, the output segmented graphs are like these:
the original image:
yuantu

iteration 1:
seg_0s

iteration2:
seg_1s

iteration3:
seg_2s

iteration 4...14:
seg_3s
seg_4s
seg_5s
seg_6s
seg_7s
seg_8s
seg_9s
seg_10s
seg_11s
seg_12s
seg_13s

I think something wrong happened, and it seems that the backward propagation do not update the parameters effectively.
So I wanna ask that if you have tried with fcn before, and can you give me some advice about it?
Thank you very much !!!

Inappropriate results

I tried running the code as it is but the result generated was quite bad. Any help would be appreciated
test

This result was generated with demo image 101027.jpg provided in repo

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.