ctu-geoforall-lab / i.ann.maskrcnn

Mask R-CNN in GRASS GIS
GNU General Public License v2.0
40 stars 22 forks source link

launch problem #3

Open tzehuey85 opened 3 years ago

tzehuey85 commented 3 years ago

Hi, I have successfully installed i.ann.maskrcnn in GRASS but when I want to launch this addon, no window pop out. why?

pesekon2 commented 3 years ago

Hi, thanks for asking.

How do you try to launch it? And what GRASS GIS version do you use?

tzehuey85 commented 3 years ago

Hi, thanks for reply. Yes. I did try to launch it but show nothing. I'm using GRASS 7.8.3 version

pesekon2 commented 3 years ago

Hm, GRASS GIS 7.8.3 should be sufficient.

It doesn't show any error message?

How do you try to launch it? From the terminal? And which module?

Normally, the terminal way is to type i.ann.maskrcnn.train for the training module and i.ann.maskrcnn.train for the detection module. Then depending on the way you started GRASS (gui or terminal way) would result in the effect (module gui, module help, accordingly). What does happen, if you type i.ann.maskrcnn.train --help?

tzehuey85 commented 3 years ago

Finally, the i.ann.maskcrnn.train window is pop up but when I try to launch i.ann.maskcrnn.detect in terminal, show error as below:

'i.ann.maskrcnn.detect' is not recognized as an internal or external command, operable program or batch file.

pesekon2 commented 3 years ago

I remember that someone had an error like this when he tried to use a module that was not installed. How did you install the modules? Through g.extension i.ann.maskrcnn? If so, could you try to run it again to reinstall it?

Also, could you check your addons directory to check if it is installed? The path should be something like ~/.grass7/addons/scripts/. In my case, the output of ls ~/.grass7/addons/scripts/ looks like this:

> ls ~/.grass7/addons/scripts/
i.ann.maskrcnn.detect  i.ann.maskrcnn.train
tzehuey85 commented 3 years ago

still cannot launch i.ann.maskrcnn.detect even thought I installed through g.extension i.ann.maskrcnn

pesekon2 commented 3 years ago

And the contain of your addons directory? ~/.grass7/addons/scripts/ or something like that? That's important to know whether the problem happened already during the installation (one of the modules didn't get installed), or somewhere else.

tzehuey85 commented 3 years ago

Yes, both files, i.ann.maskrcnn.detect.py and i.ann.maskrcnn.train.py are found in the specific directory

pesekon2 commented 3 years ago

That's really weird. I do not see a reason why GRASS should find one module, and another one from the same directory not.

Does the module work if you try to call it directly, specifying explicitly its path, i.e. ~/.grass7/addons/scripts/i.ann.maskrcnn.detect? What is the output from, for example, ~/.grass7/addons/scripts/i.ann.maskrcnn.detect --help?

tzehuey85 commented 3 years ago

the output is the same as below:

'i.ann.maskrcnn.detect' is not recognized as an internal or external command, operable program or batch file.

pesekon2 commented 3 years ago

Sadly, I have to say that I do not know where the problem could be now. I do not even know why it should output 'i.ann.maskrcnn.detect' is not recognized as an internal or external command, operable program or batch file. as I would expect a message like '~/.grass7/addons/scripts/i.ann.maskrcnn.detect' is not recognized as an internal or external command, operable program or batch file.

Maybe someone else has also faced an issue like this. @landam: Haven't you ever experienced something like this before? Or don't you have better understanding of what is wrong?

landam commented 3 years ago

Quick test on Linux machine seems to successful:

g.extension extension=i.ann.maskrcnn
i.ann.maskrcnn.detect --help
Detect features in images using a Mask R-CNN model

Usage:
 i.ann.maskrcnn.detect [-e] [band1=string] [band2=string]
   [band3=string] [images_directory=name] [images_format=string]
   model=string classes=string[,string,...] [output_type=string] [--help]
   [--verbose] [--quiet] [--ui]

Flags:
  -e   External georeferencing in the images folder (when using images_directory)

Parameters:
             band1   Name of raster maps to use for detection as the first band (divided by ",")
             band2   Name of raster maps to use for detection as the second band (divided by ",")
             band3   Name of raster maps to use for detection as the third band (divided by ",")
  images_directory   Path to a directory with external images to detect
     images_format   Format suffix of images
             model   Path to the .h5 file containing the model
           classes   Names of classes separated with ","
       output_type   Type of output
                     options: area, point
                     default: area

@tzehuey85 Which operating system and GRASS version are you using?

landam commented 3 years ago

Yes, both files, i.ann.maskrcnn.detect.py and i.ann.maskrcnn.train.py are found in the specific directory

There should be files without py extension.

ls ~/.grass7/addons/scripts/ 
i.ann.maskrcnn.detect  i.ann.maskrcnn.train

@tzehuey85 How did you installed the extension? By g.extension command? From official GRASS Addons repository or directly from GitHub?

landam commented 3 years ago

Yes, both files, i.ann.maskrcnn.detect.py and i.ann.maskrcnn.train.py are found in the specific directory

There should be files without py extension.

And more importantly @tzehuey85 which operating system are you using?

tzehuey85 commented 3 years ago

@landam

I had tried all the methods, however, all methods were failed to launch i.ann.maskrcnn.detect.

I also tried to install both Windows 7 and 10, still cannot launch i.ann.maskrcnn.detect.

FYI, I'm uisng Python 3.6 version.

tzehuey85 commented 3 years ago

@landam @pesekon2

hi, I'm trying install i.ann.maskrcnn in ubuntu environment. however, one error pop out as below:

No such file or directory: 'svn'

how to solve this issue?

pesekon2 commented 3 years ago

It means that svn (subversion) is not installed. This package is used behind g.extension to install GRASS addons. You can install it using command apt install subversion.