Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script is not working #1

Open
andreqwert opened this issue Jun 23, 2018 · 1 comment
Open

Script is not working #1

andreqwert opened this issue Jun 23, 2018 · 1 comment

Comments

@andreqwert
Copy link

andreqwert commented Jun 23, 2018

Hi!
I tried to launch your script according to example that cmd arguments suggest:
python2 main_bonus.py astronaut.png astronaut_marking.png ./
but nothing happens and cmd arguments are suggested again with example:

Usage: [Input_Image] [Input_Marking] [Output_Directory]
[Input_Image]
Path to the input image
[Input_Marking]
Path to the input marking
[Output_Directory]
Output directory
Example usages:
main_bonus.py astronaut.png astronaut_marking.png ./

What should I do to launch script?
Thanks!

@cardboardcode
Copy link

@andreqwert
There are issues with the script as well as missing instructions. But it's an easy fix.

Changes needed to the script:
Change the statement on line 216 in main_bonus.py
from: len(sys.argv) != 2
to: len(sys.argv) != 4

Run the following command again and it should work as per normal.
$ python main_bonus.py astronaut.png astronaut_marking.png ./

Changes to instructions:

  1. Once the program is running, toggle between the red and blue line by pressing 'm'.
  2. This script runs on python2 and have the following dependencies:
numpy
matplotlib
scikit-image
PyMaxflow
scipy
opencv-python

@nishagandhi Thank you for sharing this script. It is helpful in understanding graph cut maxflow/mincut techniques.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants