CSAILVision / LabelMeAnnotationTool

Source code for the LabelMe annotation tool.
MIT License
1.38k stars 436 forks source link

Next image fails #16

Open jrasi opened 9 years ago

jrasi commented 9 years ago

I'm using ubuntu 14.04, apache 2.4. I can load one image using url query string parameter 'image' and 'folder', however when i click on the next button, white page appear. It happens with the new images or with the images in the example_folder.

Secondly, i would like to ask how one generate Mask from annotations available in the form of xml. The labelme loads them but when i press process/done, it says i need to scribble first. Is it possible to convert xml annotations to colored masks (i.e. colored label images)?

Thanks

xavierpuigf commented 9 years ago

Thank you for your comments.

Have you run the makefile inside LabelMeAnnotationTool? This should allow you to navigate through the images and create masks.

You can download the Masks for the existing objects by clicking in the header button called 'ALL'. This will download a zip file with the existing masks and the xml. Process and Done buttons are used to create new masks, which is why you need to scribble first over the image.

jrasi commented 9 years ago

Thank you for the response. Ofcourse i have compiled the code. The download zip has empty mask folder. I have two sets of images, some with annotations whose xml i have put in annotation folder and for which i would like to get the mask images. And for the rest i would like to annotate but using the same set of classes/labels that are present in the annotated xmls. I've set the directory execute/read/write permissions for all images and folders but it still do not pick up the next file in the folder. The folder structure is as follows:

Images/x/ximages/indoor/fsdf234.jpg Annotations/x/ximages/indoor/fsdf234.xml

And xml contains folder tag which reads as 'x/ximages/indoor'

so, it is really confusing why labelme don't pick up the files?

xavierpuigf commented 9 years ago

Yes, your configuration seems fine. Which mode do you have set in the url? If it is the 'i' mode, could you check the contents of LabelMeAnnotationTool/annotationCache/DirLists/ ?

I am not sure I understand your problem with the mask images. Could you try downloading the zip from example_folder/img1.jpg and see if the masks folder is empty? That one should contain a mask referring to the license plate.

If you want to create new masks, you need to use the 'Mask Tool' panel. You can not get a mask from an annotated polygon.

sirotenko commented 8 years ago

Actually I spent many hours trying to fix the problem with Next Image. After digging deeper and deeper I ended up with the the following error message in console: TypeError: im_req.responseXML.getElementsByTagName(...)[0] is undefined If I output the im_req.responseText it contains the contents of fetch_image.cgi file. I'm not an expert in Apache, but it seems that at some point fetch_image.cgi does not interpreted as something executable by Apache.

Also when reading the installation docs in UBUNTU.md the feeling that it is written for some older version of Apache.

sirotenko commented 8 years ago

Ok. I solved the problem.

  1. Do sudo a2enmod cgi
  2. LabelMe doesn't work with .jpeg, only .jpg
brussell123 commented 8 years ago

Sorry for not being in the loop with this and thanks for finding the fix. I've added your line to UBUNTU.md.

Are you still having trouble downloading the scribble masks?

Regarding the file extension, at the moment LabelMe only supports "*.jpg". I'm a bit swamped now to look into this, but I'd be happy to incorporate code that extends this.

soupault commented 8 years ago

I'm getting Fatal: there are problems with fetch_image.cgi popup on web-page opening (only one) and on each of Next image clicks (2 identical popups in a row).

Any updates or ideas how to fix that?

soupault commented 8 years ago

Fixed this error by installing perl-cgi.

nmingazov commented 7 years ago

Fixed this error by installing perl-cgi as well (ubuntu 14.04). To clarify: the exact error in error.log sounds like "AH01215: Can't locate CGI.pm in @INC (you may need to install the CGI module)".

Therefore, you just need to type:

cpan
install CGI

and then restart apache via service apache2 restart.

karhohs commented 7 years ago

I was also running into the Fatal: there are problems with fetch_image.cgi error. I found the same error as @nmingazov in the error.log. For whatever reason, using cpan to install CGI did not work for me. However, this command did resolve the error on Ubuntu 16.04:

sudo apt-get install libcgi-session-perl