{
  "id": 16328,
  "title": "Python alternative to labelling tool",
  "url": "/competitions/noaa-right-whale-recognition/discussion/16328",
  "author_name": "",
  "post_date": "2015-09-04T19:17:46.603Z",
  "votes": 8,
  "comment_count": 34,
  "views": 8472,
  "content": "<p>For those who are not MATLAB users (or not qualified to get the free software), I've found the tool &quot;sloth&quot; described <a href=\"https://cvhci.anthropomatik.kit.edu/~baeuml/projects/a-universal-labeling-tool-for-computer-vision-sloth/\">here</a> to be a great Python alternative.</p>",
  "messages": [
    {
      "id": "91608",
      "postDate": "09/04/2015 19:17:46",
      "content": "<p>For those who are not MATLAB users (or not qualified to get the free software), I've found the tool &quot;sloth&quot; described <a href=\"https://cvhci.anthropomatik.kit.edu/~baeuml/projects/a-universal-labeling-tool-for-computer-vision-sloth/\">here</a> to be a great Python alternative.</p>",
      "rawMarkdown": "For those who are not MATLAB users (or not qualified to get the free software), I've found the tool \"sloth\" described [here][1] to be a great Python alternative.\r\n\r\n  [1]: https://cvhci.anthropomatik.kit.edu/~baeuml/projects/a-universal-labeling-tool-for-computer-vision-sloth/",
      "votes": null
    },
    {
      "id": "91625",
      "postDate": "09/04/2015 23:28:37",
      "content": "<p>Re:  (or not qualified to get the free software)</p>\n\n<p>Just to clarify that all participants of this competition, without exceptions, are eligible for a complementary copy of MATLAB. Please navigate to the following link to request your copy:\n<a href=\"http://www.mathworks.com/academia/student-competitions/kaggle/\">http://www.mathworks.com/academia/student-competitions/kaggle/</a></p>",
      "rawMarkdown": "Re:  (or not qualified to get the free software)\r\n\r\nJust to clarify that all participants of this competition, without exceptions, are eligible for a complementary copy of MATLAB. Please navigate to the following link to request your copy:\r\nhttp://www.mathworks.com/academia/student-competitions/kaggle/",
      "votes": null
    },
    {
      "id": "91627",
      "postDate": "09/05/2015 00:00:45",
      "content": "<p>@Senecaur, thanks so much for mentioning this! I searched briefly yesterday, didn't find anything, so naively started reinventing the wheel with the idea of posting the code. Not all a loss at least - I remembered how much I hate DOM + JS ;)</p>\n\n<p>I was also going to propose we create an open dataset for these annotations. The competition won't be won or lost by who has the best &quot;whale face&quot; training data, only slowed down because it's annoying.</p>",
      "rawMarkdown": "Senecaur, thanks so much for mentioning this! I searched briefly yesterday, didn't find anything, so naively started reinventing the wheel with the idea of posting the code. Not all a loss at least - I remembered how much I hate DOM + JS ;)\r\n\r\nI was also going to propose we create an open dataset for these annotations. The competition won't be won or lost by who has the best \"whale face\" training data, only slowed down because it's annoying.",
      "votes": null
    },
    {
      "id": "91690",
      "postDate": "09/06/2015 08:56:21",
      "content": "<p>^Great idea, the organizers should've released only the whale face training data, instead of wasting competitors' time with the annotations. </p>",
      "rawMarkdown": "^Great idea, the organizers should've released only the whale face training data, instead of wasting competitors' time with the annotations.",
      "votes": null
    },
    {
      "id": "91713",
      "postDate": "09/06/2015 16:31:55",
      "content": "<p>I don't think that the annotations are a waste of time; if the algorithm needs to be able to focus on a whale's head to work, they also need the algorithm that identifies that subregion to make it useful.</p>\n\n<p>Edit: I guess we would still need to have developed this with training set annotations; that said, the appropriate annotation may be an important decision.</p>",
      "rawMarkdown": "I don't think that the annotations are a waste of time; if the algorithm needs to be able to focus on a whale's head to work, they also need the algorithm that identifies that subregion to make it useful.\r\n\r\nEdit: I guess we would still need to have developed this with training set annotations; that said, the appropriate annotation may be an important decision.",
      "votes": null
    },
    {
      "id": "91820",
      "postDate": "09/08/2015 02:43:25",
      "content": "<p>I would think that 'whale detection' would be an important part of this competition. It's kind of trivial to identify images that have already been cropped. </p>\n\n<p>Can the admins chime in? Are they looking for a winning algorithm that requires hand labeling the whale's head for every image, or would they rather have something that would just take raw images and identify whales?</p>",
      "rawMarkdown": "I would think that 'whale detection' would be an important part of this competition. It's kind of trivial to identify images that have already been cropped. \r\n\r\nCan the admins chime in? Are they looking for a winning algorithm that requires hand labeling the whale's head for every image, or would they rather have something that would just take raw images and identify whales?",
      "votes": null
    },
    {
      "id": "91959",
      "postDate": "09/09/2015 19:26:48",
      "content": "<p>Thanks a lot. I have got the complimentary version of Matlab, but I think an open-source language is always a good alternative.</p>",
      "rawMarkdown": "Thanks a lot. I have got the complimentary version of Matlab, but I think an open-source language is always a good alternative.",
      "votes": null
    },
    {
      "id": "92693",
      "postDate": "09/15/2015 16:33:15",
      "content": "<p>I've never used sloth before but really want to get it up and going.  I'm having errors when I try to open the app, it just crashes with a stack trace.  Any thoughts on what I may be doing incorrectly?  I've attached the errors I am seeing.</p>",
      "rawMarkdown": "I've never used sloth before but really want to get it up and going.  I'm having errors when I try to open the app, it just crashes with a stack trace.  Any thoughts on what I may be doing incorrectly?  I've attached the errors I am seeing.",
      "votes": null
    },
    {
      "id": "92694",
      "postDate": "09/15/2015 16:41:19",
      "content": "<pre><code>argument 1 has unexpected type 'NoneType'\n</code></pre>\n\n<p>It looks like you're not providing any command line arguments to the sloth application and it expects them.  The first argument is a json file that your labels will be recorded in.  You can also pass in custom configurations for the type of object you want to label and how you want to select those objects, e.g. rectangle, circle, polygon.</p>\n\n<p>Instructions can be found <a href=\"http://sloth.readthedocs.org/en/latest/index.html\">here</a></p>",
      "rawMarkdown": "argument 1 has unexpected type 'NoneType'\r\n\r\nIt looks like you're not providing any command line arguments to the sloth application and it expects them.  The first argument is a json file that your labels will be recorded in.  You can also pass in custom configurations for the type of object you want to label and how you want to select those objects, e.g. rectangle, circle, polygon.\r\n\r\nInstructions can be found [here][1]\r\n\r\n\r\n  [1]: http://sloth.readthedocs.org/en/latest/index.html",
      "votes": null
    },
    {
      "id": "92706",
      "postDate": "09/15/2015 20:43:15",
      "content": "<p>As @Senecaur said, it's likely the command line arguments aren't set properly (i.e. <code>sloth --config slothwhales.py whale_faces_smerity.json</code>).</p>\n\n<p>I have instructions and an example JSON configuration that adds the custom labels &quot;Head&quot; and &quot;Body&quot; at the <a href=\"https://github.com/Smerity/right_whale_hunt\">Right Whale Hunt</a> repository - hopefully they're of use.</p>",
      "rawMarkdown": "As @Senecaur said, it's likely the command line arguments aren't set properly (i.e. `sloth --config slothwhales.py whale_faces_smerity.json`).\r\n\r\nI have instructions and an example JSON configuration that adds the custom labels \"Head\" and \"Body\" at the [Right Whale Hunt](https://github.com/Smerity/right_whale_hunt) repository - hopefully they're of use.",
      "votes": null
    },
    {
      "id": "92716",
      "postDate": "09/15/2015 22:21:09",
      "content": "<p>Thanks all for the feedback. I did end up getting it to work. In the end, there was an issue with the environment. I went to the code where it was blowing up and it had to do with the saved window state. I commented it out and it ran like a champ. I then close it, uncommented the offending line, and it started right up. Kind of weird but it's going now. </p>\n\n<p>Thanks a bunch Kagglers!</p>",
      "rawMarkdown": "Thanks all for the feedback. I did end up getting it to work. In the end, there was an issue with the environment. I went to the code where it was blowing up and it had to do with the saved window state. I commented it out and it ran like a champ. I then close it, uncommented the offending line, and it started right up. Kind of weird but it's going now. \r\n\r\nThanks a bunch Kagglers!",
      "votes": null
    },
    {
      "id": "92731",
      "postDate": "09/16/2015 03:20:49",
      "content": "<p>@Senecaur is there a way to load multiple images, at a time, into sloth?</p>",
      "rawMarkdown": "Senecaur is there a way to load multiple images, at a time, into sloth?",
      "votes": null
    },
    {
      "id": "92737",
      "postDate": "09/16/2015 04:22:12",
      "content": "<p>@Jay Karimi, there's an example on the Sloth site of <a href=\"http://sloth.readthedocs.org/en/latest/examples.html#adding-every-nth-image-to-label-file\">adding every nth image to a label file</a>. This is extended to our dataset in my <a href=\"https://github.com/Smerity/right_whale_hunt#contributing-to-annotations\">Right Whale Hunt</a> repo.</p>",
      "rawMarkdown": "Jay Karimi, there's an example on the Sloth site of [adding every nth image to a label file](http://sloth.readthedocs.org/en/latest/examples.html#adding-every-nth-image-to-label-file). This is extended to our dataset in my [Right Whale Hunt](https://github.com/Smerity/right_whale_hunt#contributing-to-annotations) repo.",
      "votes": null
    },
    {
      "id": "92920",
      "postDate": "09/18/2015 18:55:14",
      "content": "<p>@Smerity, I created a custom label in the sloth default config file but it does not appear in the GUI; what am I missing?</p>\n\n<p><strong>UPDATE:</strong> I realized I had to rerun</p>\n\n<pre><code>sudo python setup.py install \n</code></pre>",
      "rawMarkdown": "Smerity, I created a custom label in the sloth default config file but it does not appear in the GUI; what am I missing?\r\n\r\n\r\n**UPDATE:** I realized I had to rerun\r\n\r\n    sudo python setup.py install",
      "votes": null
    },
    {
      "id": "92996",
      "postDate": "09/19/2015 18:09:03",
      "content": "<p>@Smerity &amp; @Senecaur, did you use the annotations generated by sloth to train the cascade classifier using MATLAB or an alternative like OpenCV? I have had no luck with OpenCV.</p>",
      "rawMarkdown": "Smerity & @Senecaur, did you use the annotations generated by sloth to train the cascade classifier using MATLAB or an alternative like OpenCV? I have had no luck with OpenCV.",
      "votes": null
    },
    {
      "id": "93004",
      "postDate": "09/19/2015 22:23:45",
      "content": "<p>@Jay Karimi, a friend of mine has tried to use the <a href=\"https://github.com/Smerity/right_whale_hunt/\">Sloth annotations</a> to train OpenCV but she has had mixed success. It turns out OpenCV has a number of limitations such as only working on grayscale and being very sensitive to parameters for training. We also look at dlib's <a href=\"http://blog.dlib.net/2014/02/dlib-186-released-make-your-own-object.html\">facial classification system</a>, meant to be far faster and higher precision than OpenCV, but it requires the bounding boxes to be the same general ratio.</p>\n\n<p>Converting the JSON file to an XML file should be relatively straightforward and I'd be very interested to know how MATLAB's cascade classifier handles it! Unfortunately MATLAB is very far from my lingua franca so it's not something I'll be doing.</p>",
      "rawMarkdown": "Jay Karimi, a friend of mine has tried to use the [Sloth annotations](https://github.com/Smerity/right_whale_hunt/) to train OpenCV but she has had mixed success. It turns out OpenCV has a number of limitations such as only working on grayscale and being very sensitive to parameters for training. We also look at dlib's [facial classification system](http://blog.dlib.net/2014/02/dlib-186-released-make-your-own-object.html), meant to be far faster and higher precision than OpenCV, but it requires the bounding boxes to be the same general ratio.\r\n\r\nConverting the JSON file to an XML file should be relatively straightforward and I'd be very interested to know how MATLAB's cascade classifier handles it! Unfortunately MATLAB is very far from my lingua franca so it's not something I'll be doing.",
      "votes": null
    },
    {
      "id": "93005",
      "postDate": "09/19/2015 22:30:37",
      "content": "<p>@Jay Karimi   I trained an OpenCV cascade classifier (haar features) based on the sloth output.  I just wrote  a Python script (~15 lines of code) to parse the sloth json output and crop out the training images using OpenCV.  </p>\n\n<p>I didn't actually realize that OpenCV only uses grayscale images, but that certainly seems to be the case.  I'm finding performance is good enough for my needs anyway.</p>",
      "rawMarkdown": "Jay Karimi   I trained an OpenCV cascade classifier (haar features) based on the sloth output.  I just wrote  a Python script (~15 lines of code) to parse the sloth json output and crop out the training images using OpenCV.  \r\n\r\nI didn't actually realize that OpenCV only uses grayscale images, but that certainly seems to be the case.  I'm finding performance is good enough for my needs anyway.",
      "votes": null
    },
    {
      "id": "93006",
      "postDate": "09/19/2015 22:41:55",
      "content": "<p>@Senecaur I have taken a similar approach of converting the sloth json output for use with OpenCV. However, I am having issues running opencv_train cascade (as noted by my <a href=\"http://stackoverflow.com/questions/32671459/opencv-training-a-cascade-classifier\">stackoverflow post</a>). In the meantime, I have tried installing OpenCV 3 from source, instead of using</p>\n\n<p><code>conda install opencv</code> </p>\n\n<p>but I have been having problems getting it going as well.</p>\n\n<p>Do you have any guides or suggestions; what was you opencv installation process?</p>",
      "rawMarkdown": "Senecaur I have taken a similar approach of converting the sloth json output for use with OpenCV. However, I am having issues running opencv_train cascade (as noted by my [stackoverflow post][1]). In the meantime, I have tried installing OpenCV 3 from source, instead of using\r\n \r\n`conda install opencv` \r\n\r\nbut I have been having problems getting it going as well.\r\n\r\nDo you have any guides or suggestions; what was you opencv installation process?\r\n\r\n\r\n  [1]: http://stackoverflow.com/questions/32671459/opencv-training-a-cascade-classifier",
      "votes": null
    },
    {
      "id": "93007",
      "postDate": "09/19/2015 22:48:17",
      "content": "<p>@Jay Karimi  I'm using OpenCV 3.0.0 built from source on OS X 10.10.5</p>\n\n<p>I do almost exactly the same thing as you describe in your stack overflow post.  A critical difference is that I use haar features whereas you are using LBP.  When I try using LBP nothing happens either, just like you are describing; when I use haar it starts training almost instantly.  As I understand it you are likely to get better detection performance using haar features in any case, detection just runs slightly slower.</p>",
      "rawMarkdown": "Jay Karimi  I'm using OpenCV 3.0.0 built from source on OS X 10.10.5\r\n\r\nI do almost exactly the same thing as you describe in your stack overflow post.  A critical difference is that I use haar features whereas you are using LBP.  When I try using LBP nothing happens either, just like you are describing; when I use haar it starts training almost instantly.  As I understand it you are likely to get better detection performance using haar features in any case, detection just runs slightly slower.",
      "votes": null
    },
    {
      "id": "93008",
      "postDate": "09/19/2015 23:13:38",
      "content": "<p>@Senecaur that's interesting. I am currently trying to install opencv 3 using my anaconda setup with the <a href=\"https://blog.kevin-brown.com/programming/2014/09/27/building-and-installing-opencv-3.html\">following tutorial</a> but</p>\n\n<p><code>sudo make install</code></p>\n\n<p>keeps failing saying with error </p>\n\n<p><code>'Python.h' file not found</code> </p>\n\n<p>I do not know what is causing that, any ideas? In the meantime, I will try to <code>conda install</code> opencv 2.4.8 and see if using haar features, instead of LBP, will bypass the bug.</p>",
      "rawMarkdown": "Senecaur that's interesting. I am currently trying to install opencv 3 using my anaconda setup with the [following tutorial][1] but\r\n\r\n`sudo make install`\r\n\r\n keeps failing saying with error \r\n\r\n`'Python.h' file not found` \r\n\r\nI do not know what is causing that, any ideas? In the meantime, I will try to `conda install` opencv 2.4.8 and see if using haar features, instead of LBP, will bypass the bug.\r\n\r\n\r\n  [1]: https://blog.kevin-brown.com/programming/2014/09/27/building-and-installing-opencv-3.html",
      "votes": null
    },
    {
      "id": "93033",
      "postDate": "09/20/2015 17:49:19",
      "content": "<p>@Senecaur, I was able to train the cascade with haar features; there must be some bug with the LBP approach? But, I have not been able to use <code>opencv_performance</code>, I receive an <code>invalid xml</code> error. Is this occurring for you as well?</p>",
      "rawMarkdown": "Senecaur, I was able to train the cascade with haar features; there must be some bug with the LBP approach? But, I have not been able to use `opencv_performance`, I receive an `invalid xml` error. Is this occurring for you as well?",
      "votes": null
    },
    {
      "id": "93036",
      "postDate": "09/20/2015 18:35:57",
      "content": "<p>@Jay Karimi I haven't spent much time looking at it, but I did get the LBP model to train on a server with 48 cores and 128GB RAM.  So not sure if the Macbook is the limiting factor or there is indeed a bug.  I just switched to haar features as they did what I need.</p>\n\n<p>I've never used opencv_performance.  I know that opencv changed it's cascade classifier xml format at one point, so that might be the issue.  That change caused me problems when I wanted to use the GPU to accelerate the classifier - you can't with the new xml format.</p>",
      "rawMarkdown": "Jay Karimi I haven't spent much time looking at it, but I did get the LBP model to train on a server with 48 cores and 128GB RAM.  So not sure if the Macbook is the limiting factor or there is indeed a bug.  I just switched to haar features as they did what I need.\r\n\r\nI've never used opencv_performance.  I know that opencv changed it's cascade classifier xml format at one point, so that might be the issue.  That change caused me problems when I wanted to use the GPU to accelerate the classifier - you can't with the new xml format.",
      "votes": null
    },
    {
      "id": "93318",
      "postDate": "09/23/2015 20:14:31",
      "content": "<p>Hi everyone, \nDoes anyone run sloth under the Windows 7 command line?\nAfter installation I run in command line sloth examples/example1_labels.json I receive error:\n<em>'sloth' is not recognized as an internal or external command</em></p>",
      "rawMarkdown": "Hi everyone, \r\nDoes anyone run sloth under the Windows 7 command line?\r\nAfter installation I run in command line sloth examples/example1_labels.json I receive error:\r\n*'sloth' is not recognized as an internal or external command*",
      "votes": null
    },
    {
      "id": "93379",
      "postDate": "09/24/2015 18:06:01",
      "content": "<p>I ran into that briefly. You need to look where the sloth application is located and add it to your path. Basically, what it is telling you is it isn't in the current directory or anywhere on your path. You could also give the fully qualified path to the sloth application. </p>",
      "rawMarkdown": "I ran into that briefly. You need to look where the sloth application is located and add it to your path. Basically, what it is telling you is it isn't in the current directory or anywhere on your path. You could also give the fully qualified path to the sloth application.",
      "votes": null
    },
    {
      "id": "93459",
      "postDate": "09/26/2015 05:14:28",
      "content": "<p>@Senecaur I was able to get a haar cascade trained but when I try to detect a face in an image, it seems to run indefinitely for a single image...I have been waiting 50 minutes and still no result...any ideas?</p>",
      "rawMarkdown": "Senecaur I was able to get a haar cascade trained but when I try to detect a face in an image, it seems to run indefinitely for a single image...I have been waiting 50 minutes and still no result...any ideas?",
      "votes": null
    },
    {
      "id": "93478",
      "postDate": "09/26/2015 12:30:40",
      "content": "<p>@Jay Karimi Performing detection on a new image should 10s-100s of milliseconds. What code are you using for detection?</p>",
      "rawMarkdown": "Jay Karimi Performing detection on a new image should 10s-100s of milliseconds. What code are you using for detection?",
      "votes": null
    },
    {
      "id": "93490",
      "postDate": "09/26/2015 15:56:02",
      "content": "<p>@Senecaur</p>\n\n<p>Python:</p>\n\n<pre><code>import cv2\nface_cascade = cv2.CascadeClassifier('trained_cascade.xml')\nimg = cv2.imread('whale_img.jpg')\ngray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\nfaces = face_cascade.detectMultiScale(gray)\n</code></pre>\n\n<p>it will hang on the last line.</p>\n\n<p><a href=\"http://docs.opencv.org/master/d7/d8b/tutorial_py_face_detection.html#gsc.tab=0\">Source</a></p>",
      "rawMarkdown": "Senecaur\r\n\r\n Python:\r\n\r\n    import cv2\r\n    face_cascade = cv2.CascadeClassifier('trained_cascade.xml')\r\n    img = cv2.imread('whale_img.jpg')\r\n    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\r\n    faces = face_cascade.detectMultiScale(gray)\r\n\r\nit will hang on the last line.\r\n\r\n[Source][1]\r\n\r\n\r\n  [1]: http://docs.opencv.org/master/d7/d8b/tutorial_py_face_detection.html#gsc.tab=0",
      "votes": null
    },
    {
      "id": "93493",
      "postDate": "09/26/2015 16:30:12",
      "content": "<p>@Jay Karimi I just tested that code and it works fine with my cascade.xml and a test image.  Takes about 1 second.  </p>\n\n<p>You could try using python -m trace --trace YOURSCRIPT.py to see some verbose output and find out what it's hanging on</p>",
      "rawMarkdown": "Jay Karimi I just tested that code and it works fine with my cascade.xml and a test image.  Takes about 1 second.  \r\n\r\nYou could try using python -m trace --trace YOURSCRIPT.py to see some verbose output and find out what it's hanging on",
      "votes": null
    },
    {
      "id": "93495",
      "postDate": "09/26/2015 17:11:37",
      "content": "<p>@Senecaur </p>\n\n<pre><code>re.py(234):     if not bypass_cache:\nre.py(235):         cachekey = (type(key[0]),) + key\nre.py(236):         try:\nre.py(237):             p, loc = _cache[cachekey]\nre.py(238):             if loc is None or loc == _locale.setlocale(_locale.LC_CTYPE):\nre.py(239):                 return p\nwarnings.py(73):     if append:\nwarnings.py(76):         filters.insert(0, item)\nface.py(2): face_cascade = cv2.CascadeClassifier('data/data/cascade.xml')\nface.py(3): img = cv2.imread('../w_821.jpg')\nface.py(4): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\nface.py(5): faces = face_cascade.detectMultiScale(gray)\n</code></pre>\n\n<p>no luck, once it gets to that line even the verbose output hangs/disappears</p>",
      "rawMarkdown": "Senecaur \r\n\r\n    re.py(234):     if not bypass_cache:\r\n    re.py(235):         cachekey = (type(key[0]),) + key\r\n    re.py(236):         try:\r\n    re.py(237):             p, loc = _cache[cachekey]\r\n    re.py(238):             if loc is None or loc == _locale.setlocale(_locale.LC_CTYPE):\r\n    re.py(239):                 return p\r\n    warnings.py(73):     if append:\r\n    warnings.py(76):         filters.insert(0, item)\r\n    face.py(2): face_cascade = cv2.CascadeClassifier('data/data/cascade.xml')\r\n    face.py(3): img = cv2.imread('../w_821.jpg')\r\n    face.py(4): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\r\n    face.py(5): faces = face_cascade.detectMultiScale(gray)\r\n\r\nno luck, once it gets to that line even the verbose output hangs/disappears",
      "votes": null
    },
    {
      "id": "93497",
      "postDate": "09/26/2015 17:38:44",
      "content": "<p>@Jay Karimi Just a thought - is your Python cv2 definitely using the same opencv as you used to train the classifier?  I know you mentioned using conda install opencv and building opencv 3 from source.  If it's any help, I am using opencv 3 on OS X.</p>",
      "rawMarkdown": "Jay Karimi Just a thought - is your Python cv2 definitely using the same opencv as you used to train the classifier?  I know you mentioned using conda install opencv and building opencv 3 from source.  If it's any help, I am using opencv 3 on OS X.",
      "votes": null
    },
    {
      "id": "93502",
      "postDate": "09/26/2015 18:43:04",
      "content": "<p>Hi @Jay Karimi,</p>\n\n<p>I had a similar problem - my classifier took a long time to run, even for a single image. I suspect it means that I have trained a bad classifier and need a new one. However, I was able to get it to work faster by increasing the minimum window size and/or increasing the required number of neighbors. </p>\n\n<p>kb</p>",
      "rawMarkdown": "Hi @Jay Karimi,\r\n\r\nI had a similar problem - my classifier took a long time to run, even for a single image. I suspect it means that I have trained a bad classifier and need a new one. However, I was able to get it to work faster by increasing the minimum window size and/or increasing the required number of neighbors. \r\n\r\nkb",
      "votes": null
    },
    {
      "id": "93506",
      "postDate": "09/26/2015 19:40:56",
      "content": "<p>@ Senecaur I trained my classifier on a linux machine running opencv 2.4.10 and I used it for detection on my mac running 2.4.8. I tried running the detection on the linux machine to see if the discrepancy in versions was the source of the issue, no luck; I have the same problem.</p>\n\n<p>@Kevin Burnham I tried increasing those values but no luck  yet. I probably just have a poor classifier but my opencv_performance function has not been working. Since detection isn't worker either, I have no way of verifying the performance.</p>",
      "rawMarkdown": "Senecaur I trained my classifier on a linux machine running opencv 2.4.10 and I used it for detection on my mac running 2.4.8. I tried running the detection on the linux machine to see if the discrepancy in versions was the source of the issue, no luck; I have the same problem.\r\n\r\n@Kevin Burnham I tried increasing those values but no luck  yet. I probably just have a poor classifier but my opencv_performance function has not been working. Since detection isn't worker either, I have no way of verifying the performance.",
      "votes": null
    },
    {
      "id": "93833",
      "postDate": "10/01/2015 23:12:00",
      "content": "<p>I'm still struggling with false positives with OpenCV 3.0.0 but the speed with which I identified those false positives was enormously increased when I installed the program on an AWS g2.2xlarge AMI with a GPU.</p>",
      "rawMarkdown": "I'm still struggling with false positives with OpenCV 3.0.0 but the speed with which I identified those false positives was enormously increased when I installed the program on an AWS g2.2xlarge AMI with a GPU.",
      "votes": null
    },
    {
      "id": "193867",
      "postDate": "06/18/2017 14:27:55",
      "content": "<p>If you are using Mac OS X, you can use RectLabel. </p>\n\n<p>An image annotation tool to label images for bounding box object detection and segmentation.</p>\n\n<p><a href=\"https://rectlabel.com/\">https://rectlabel.com</a></p>\n\n<p>Key features:</p>\n\n<ul>\n<li><p>Drawing bounding box, polygon, and cubic bezier</p></li>\n<li><p>Export index color mask image and separated mask images</p></li>\n<li><p>1-click buttons make your labeling work faster</p></li>\n<li><p>Customize the label dialog to combine with attributes</p></li>\n<li><p>Settings for objects, attributes, hotkeys, and labeling fast</p></li>\n<li><p>Layer order for overlapped boxes</p></li>\n<li><p>Quick zoom to existing boxes</p></li>\n<li><p>Support the PASCAL VOC format</p></li>\n</ul>",
      "rawMarkdown": "If you are using Mac OS X, you can use RectLabel. \n\nAn image annotation tool to label images for bounding box object detection and segmentation.\n\nhttps://rectlabel.com\n\nKey features:\n\n- Drawing bounding box, polygon, and cubic bezier\n\n- Export index color mask image and separated mask images\n\n- 1-click buttons make your labeling work faster\n\n- Customize the label dialog to combine with attributes\n\n- Settings for objects, attributes, hotkeys, and labeling fast\n\n- Layer order for overlapped boxes\n\n- Quick zoom to existing boxes\n\n- Support the PASCAL VOC format",
      "votes": null
    },
    {
      "id": "318153",
      "postDate": "04/23/2018 09:03:52",
      "content": "<p>This is a web based alternative, collaborative, slick UI, clean interface, and lots of open datasets</p>\n\n<p><a href=\"https://dataturks.com/\">https://dataturks.com/</a>\n<a href=\"https://dataturks.com/projects/Dataturks/Demo%20Image%20Bounding%20Box%20Project\">https://dataturks.com/projects/Dataturks/Demo%20Image%20Bounding%20Box%20Project</a></p>",
      "rawMarkdown": "This is a web based alternative, collaborative, slick UI, clean interface, and lots of open datasets\n\nhttps://dataturks.com/\nhttps://dataturks.com/projects/Dataturks/Demo%20Image%20Bounding%20Box%20Project",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 91625,
      "author_name": "shashankprasanna",
      "author_url": "",
      "post_date": "09/04/2015 23:28:37",
      "content": "<p>Re:  (or not qualified to get the free software)</p>\n\n<p>Just to clarify that all participants of this competition, without exceptions, are eligible for a complementary copy of MATLAB. Please navigate to the following link to request your copy:\n<a href=\"http://www.mathworks.com/academia/student-competitions/kaggle/\">http://www.mathworks.com/academia/student-competitions/kaggle/</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 91627,
      "author_name": "smerity",
      "author_url": "",
      "post_date": "09/05/2015 00:00:45",
      "content": "<p>@Senecaur, thanks so much for mentioning this! I searched briefly yesterday, didn't find anything, so naively started reinventing the wheel with the idea of posting the code. Not all a loss at least - I remembered how much I hate DOM + JS ;)</p>\n\n<p>I was also going to propose we create an open dataset for these annotations. The competition won't be won or lost by who has the best &quot;whale face&quot; training data, only slowed down because it's annoying.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 91690,
      "author_name": "dopelearner",
      "author_url": "",
      "post_date": "09/06/2015 08:56:21",
      "content": "<p>^Great idea, the organizers should've released only the whale face training data, instead of wasting competitors' time with the annotations. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 91713,
      "author_name": "telser",
      "author_url": "",
      "post_date": "09/06/2015 16:31:55",
      "content": "<p>I don't think that the annotations are a waste of time; if the algorithm needs to be able to focus on a whale's head to work, they also need the algorithm that identifies that subregion to make it useful.</p>\n\n<p>Edit: I guess we would still need to have developed this with training set annotations; that said, the appropriate annotation may be an important decision.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 91820,
      "author_name": "",
      "author_url": "",
      "post_date": "09/08/2015 02:43:25",
      "content": "<p>I would think that 'whale detection' would be an important part of this competition. It's kind of trivial to identify images that have already been cropped. </p>\n\n<p>Can the admins chime in? Are they looking for a winning algorithm that requires hand labeling the whale's head for every image, or would they rather have something that would just take raw images and identify whales?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 91959,
      "author_name": "runshengsong",
      "author_url": "",
      "post_date": "09/09/2015 19:26:48",
      "content": "<p>Thanks a lot. I have got the complimentary version of Matlab, but I think an open-source language is always a good alternative.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92693,
      "author_name": "jeffrichley",
      "author_url": "",
      "post_date": "09/15/2015 16:33:15",
      "content": "<p>I've never used sloth before but really want to get it up and going.  I'm having errors when I try to open the app, it just crashes with a stack trace.  Any thoughts on what I may be doing incorrectly?  I've attached the errors I am seeing.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92694,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/15/2015 16:41:19",
      "content": "<pre><code>argument 1 has unexpected type 'NoneType'\n</code></pre>\n\n<p>It looks like you're not providing any command line arguments to the sloth application and it expects them.  The first argument is a json file that your labels will be recorded in.  You can also pass in custom configurations for the type of object you want to label and how you want to select those objects, e.g. rectangle, circle, polygon.</p>\n\n<p>Instructions can be found <a href=\"http://sloth.readthedocs.org/en/latest/index.html\">here</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92706,
      "author_name": "smerity",
      "author_url": "",
      "post_date": "09/15/2015 20:43:15",
      "content": "<p>As @Senecaur said, it's likely the command line arguments aren't set properly (i.e. <code>sloth --config slothwhales.py whale_faces_smerity.json</code>).</p>\n\n<p>I have instructions and an example JSON configuration that adds the custom labels &quot;Head&quot; and &quot;Body&quot; at the <a href=\"https://github.com/Smerity/right_whale_hunt\">Right Whale Hunt</a> repository - hopefully they're of use.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92716,
      "author_name": "jeffrichley",
      "author_url": "",
      "post_date": "09/15/2015 22:21:09",
      "content": "<p>Thanks all for the feedback. I did end up getting it to work. In the end, there was an issue with the environment. I went to the code where it was blowing up and it had to do with the saved window state. I commented it out and it ran like a champ. I then close it, uncommented the offending line, and it started right up. Kind of weird but it's going now. </p>\n\n<p>Thanks a bunch Kagglers!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92731,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/16/2015 03:20:49",
      "content": "<p>@Senecaur is there a way to load multiple images, at a time, into sloth?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92737,
      "author_name": "smerity",
      "author_url": "",
      "post_date": "09/16/2015 04:22:12",
      "content": "<p>@Jay Karimi, there's an example on the Sloth site of <a href=\"http://sloth.readthedocs.org/en/latest/examples.html#adding-every-nth-image-to-label-file\">adding every nth image to a label file</a>. This is extended to our dataset in my <a href=\"https://github.com/Smerity/right_whale_hunt#contributing-to-annotations\">Right Whale Hunt</a> repo.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92920,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/18/2015 18:55:14",
      "content": "<p>@Smerity, I created a custom label in the sloth default config file but it does not appear in the GUI; what am I missing?</p>\n\n<p><strong>UPDATE:</strong> I realized I had to rerun</p>\n\n<pre><code>sudo python setup.py install \n</code></pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 92996,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/19/2015 18:09:03",
      "content": "<p>@Smerity &amp; @Senecaur, did you use the annotations generated by sloth to train the cascade classifier using MATLAB or an alternative like OpenCV? I have had no luck with OpenCV.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93004,
      "author_name": "smerity",
      "author_url": "",
      "post_date": "09/19/2015 22:23:45",
      "content": "<p>@Jay Karimi, a friend of mine has tried to use the <a href=\"https://github.com/Smerity/right_whale_hunt/\">Sloth annotations</a> to train OpenCV but she has had mixed success. It turns out OpenCV has a number of limitations such as only working on grayscale and being very sensitive to parameters for training. We also look at dlib's <a href=\"http://blog.dlib.net/2014/02/dlib-186-released-make-your-own-object.html\">facial classification system</a>, meant to be far faster and higher precision than OpenCV, but it requires the bounding boxes to be the same general ratio.</p>\n\n<p>Converting the JSON file to an XML file should be relatively straightforward and I'd be very interested to know how MATLAB's cascade classifier handles it! Unfortunately MATLAB is very far from my lingua franca so it's not something I'll be doing.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93005,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/19/2015 22:30:37",
      "content": "<p>@Jay Karimi   I trained an OpenCV cascade classifier (haar features) based on the sloth output.  I just wrote  a Python script (~15 lines of code) to parse the sloth json output and crop out the training images using OpenCV.  </p>\n\n<p>I didn't actually realize that OpenCV only uses grayscale images, but that certainly seems to be the case.  I'm finding performance is good enough for my needs anyway.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93006,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/19/2015 22:41:55",
      "content": "<p>@Senecaur I have taken a similar approach of converting the sloth json output for use with OpenCV. However, I am having issues running opencv_train cascade (as noted by my <a href=\"http://stackoverflow.com/questions/32671459/opencv-training-a-cascade-classifier\">stackoverflow post</a>). In the meantime, I have tried installing OpenCV 3 from source, instead of using</p>\n\n<p><code>conda install opencv</code> </p>\n\n<p>but I have been having problems getting it going as well.</p>\n\n<p>Do you have any guides or suggestions; what was you opencv installation process?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93007,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/19/2015 22:48:17",
      "content": "<p>@Jay Karimi  I'm using OpenCV 3.0.0 built from source on OS X 10.10.5</p>\n\n<p>I do almost exactly the same thing as you describe in your stack overflow post.  A critical difference is that I use haar features whereas you are using LBP.  When I try using LBP nothing happens either, just like you are describing; when I use haar it starts training almost instantly.  As I understand it you are likely to get better detection performance using haar features in any case, detection just runs slightly slower.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93008,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/19/2015 23:13:38",
      "content": "<p>@Senecaur that's interesting. I am currently trying to install opencv 3 using my anaconda setup with the <a href=\"https://blog.kevin-brown.com/programming/2014/09/27/building-and-installing-opencv-3.html\">following tutorial</a> but</p>\n\n<p><code>sudo make install</code></p>\n\n<p>keeps failing saying with error </p>\n\n<p><code>'Python.h' file not found</code> </p>\n\n<p>I do not know what is causing that, any ideas? In the meantime, I will try to <code>conda install</code> opencv 2.4.8 and see if using haar features, instead of LBP, will bypass the bug.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93033,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/20/2015 17:49:19",
      "content": "<p>@Senecaur, I was able to train the cascade with haar features; there must be some bug with the LBP approach? But, I have not been able to use <code>opencv_performance</code>, I receive an <code>invalid xml</code> error. Is this occurring for you as well?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93036,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/20/2015 18:35:57",
      "content": "<p>@Jay Karimi I haven't spent much time looking at it, but I did get the LBP model to train on a server with 48 cores and 128GB RAM.  So not sure if the Macbook is the limiting factor or there is indeed a bug.  I just switched to haar features as they did what I need.</p>\n\n<p>I've never used opencv_performance.  I know that opencv changed it's cascade classifier xml format at one point, so that might be the issue.  That change caused me problems when I wanted to use the GPU to accelerate the classifier - you can't with the new xml format.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93318,
      "author_name": "alexbra",
      "author_url": "",
      "post_date": "09/23/2015 20:14:31",
      "content": "<p>Hi everyone, \nDoes anyone run sloth under the Windows 7 command line?\nAfter installation I run in command line sloth examples/example1_labels.json I receive error:\n<em>'sloth' is not recognized as an internal or external command</em></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93379,
      "author_name": "jeffrichley",
      "author_url": "",
      "post_date": "09/24/2015 18:06:01",
      "content": "<p>I ran into that briefly. You need to look where the sloth application is located and add it to your path. Basically, what it is telling you is it isn't in the current directory or anywhere on your path. You could also give the fully qualified path to the sloth application. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93459,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/26/2015 05:14:28",
      "content": "<p>@Senecaur I was able to get a haar cascade trained but when I try to detect a face in an image, it seems to run indefinitely for a single image...I have been waiting 50 minutes and still no result...any ideas?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93478,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/26/2015 12:30:40",
      "content": "<p>@Jay Karimi Performing detection on a new image should 10s-100s of milliseconds. What code are you using for detection?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93490,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/26/2015 15:56:02",
      "content": "<p>@Senecaur</p>\n\n<p>Python:</p>\n\n<pre><code>import cv2\nface_cascade = cv2.CascadeClassifier('trained_cascade.xml')\nimg = cv2.imread('whale_img.jpg')\ngray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\nfaces = face_cascade.detectMultiScale(gray)\n</code></pre>\n\n<p>it will hang on the last line.</p>\n\n<p><a href=\"http://docs.opencv.org/master/d7/d8b/tutorial_py_face_detection.html#gsc.tab=0\">Source</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93493,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/26/2015 16:30:12",
      "content": "<p>@Jay Karimi I just tested that code and it works fine with my cascade.xml and a test image.  Takes about 1 second.  </p>\n\n<p>You could try using python -m trace --trace YOURSCRIPT.py to see some verbose output and find out what it's hanging on</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93495,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/26/2015 17:11:37",
      "content": "<p>@Senecaur </p>\n\n<pre><code>re.py(234):     if not bypass_cache:\nre.py(235):         cachekey = (type(key[0]),) + key\nre.py(236):         try:\nre.py(237):             p, loc = _cache[cachekey]\nre.py(238):             if loc is None or loc == _locale.setlocale(_locale.LC_CTYPE):\nre.py(239):                 return p\nwarnings.py(73):     if append:\nwarnings.py(76):         filters.insert(0, item)\nface.py(2): face_cascade = cv2.CascadeClassifier('data/data/cascade.xml')\nface.py(3): img = cv2.imread('../w_821.jpg')\nface.py(4): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\nface.py(5): faces = face_cascade.detectMultiScale(gray)\n</code></pre>\n\n<p>no luck, once it gets to that line even the verbose output hangs/disappears</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93497,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "09/26/2015 17:38:44",
      "content": "<p>@Jay Karimi Just a thought - is your Python cv2 definitely using the same opencv as you used to train the classifier?  I know you mentioned using conda install opencv and building opencv 3 from source.  If it's any help, I am using opencv 3 on OS X.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93502,
      "author_name": "kburnham",
      "author_url": "",
      "post_date": "09/26/2015 18:43:04",
      "content": "<p>Hi @Jay Karimi,</p>\n\n<p>I had a similar problem - my classifier took a long time to run, even for a single image. I suspect it means that I have trained a bad classifier and need a new one. However, I was able to get it to work faster by increasing the minimum window size and/or increasing the required number of neighbors. </p>\n\n<p>kb</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93506,
      "author_name": "jkarimi91",
      "author_url": "",
      "post_date": "09/26/2015 19:40:56",
      "content": "<p>@ Senecaur I trained my classifier on a linux machine running opencv 2.4.10 and I used it for detection on my mac running 2.4.8. I tried running the detection on the linux machine to see if the discrepancy in versions was the source of the issue, no luck; I have the same problem.</p>\n\n<p>@Kevin Burnham I tried increasing those values but no luck  yet. I probably just have a poor classifier but my opencv_performance function has not been working. Since detection isn't worker either, I have no way of verifying the performance.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 93833,
      "author_name": "grfiv4",
      "author_url": "",
      "post_date": "10/01/2015 23:12:00",
      "content": "<p>I'm still struggling with false positives with OpenCV 3.0.0 but the speed with which I identified those false positives was enormously increased when I installed the program on an AWS g2.2xlarge AMI with a GPU.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 193867,
      "author_name": "ryouchinsa",
      "author_url": "",
      "post_date": "06/18/2017 14:27:55",
      "content": "<p>If you are using Mac OS X, you can use RectLabel. </p>\n\n<p>An image annotation tool to label images for bounding box object detection and segmentation.</p>\n\n<p><a href=\"https://rectlabel.com/\">https://rectlabel.com</a></p>\n\n<p>Key features:</p>\n\n<ul>\n<li><p>Drawing bounding box, polygon, and cubic bezier</p></li>\n<li><p>Export index color mask image and separated mask images</p></li>\n<li><p>1-click buttons make your labeling work faster</p></li>\n<li><p>Customize the label dialog to combine with attributes</p></li>\n<li><p>Settings for objects, attributes, hotkeys, and labeling fast</p></li>\n<li><p>Layer order for overlapped boxes</p></li>\n<li><p>Quick zoom to existing boxes</p></li>\n<li><p>Support the PASCAL VOC format</p></li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 318153,
      "author_name": "gajju3588",
      "author_url": "",
      "post_date": "04/23/2018 09:03:52",
      "content": "<p>This is a web based alternative, collaborative, slick UI, clean interface, and lots of open datasets</p>\n\n<p><a href=\"https://dataturks.com/\">https://dataturks.com/</a>\n<a href=\"https://dataturks.com/projects/Dataturks/Demo%20Image%20Bounding%20Box%20Project\">https://dataturks.com/projects/Dataturks/Demo%20Image%20Bounding%20Box%20Project</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "91608": "For those who are not MATLAB users (or not qualified to get the free software), I've found the tool \"sloth\" described [here][1] to be a great Python alternative.\r\n\r\n  [1]: https://cvhci.anthropomatik.kit.edu/~baeuml/projects/a-universal-labeling-tool-for-computer-vision-sloth/",
    "91625": "Re:  (or not qualified to get the free software)\r\n\r\nJust to clarify that all participants of this competition, without exceptions, are eligible for a complementary copy of MATLAB. Please navigate to the following link to request your copy:\r\nhttp://www.mathworks.com/academia/student-competitions/kaggle/",
    "91627": "Senecaur, thanks so much for mentioning this! I searched briefly yesterday, didn't find anything, so naively started reinventing the wheel with the idea of posting the code. Not all a loss at least - I remembered how much I hate DOM + JS ;)\r\n\r\nI was also going to propose we create an open dataset for these annotations. The competition won't be won or lost by who has the best \"whale face\" training data, only slowed down because it's annoying.",
    "91690": "^Great idea, the organizers should've released only the whale face training data, instead of wasting competitors' time with the annotations.",
    "91713": "I don't think that the annotations are a waste of time; if the algorithm needs to be able to focus on a whale's head to work, they also need the algorithm that identifies that subregion to make it useful.\r\n\r\nEdit: I guess we would still need to have developed this with training set annotations; that said, the appropriate annotation may be an important decision.",
    "91820": "I would think that 'whale detection' would be an important part of this competition. It's kind of trivial to identify images that have already been cropped. \r\n\r\nCan the admins chime in? Are they looking for a winning algorithm that requires hand labeling the whale's head for every image, or would they rather have something that would just take raw images and identify whales?",
    "91959": "Thanks a lot. I have got the complimentary version of Matlab, but I think an open-source language is always a good alternative.",
    "92693": "I've never used sloth before but really want to get it up and going.  I'm having errors when I try to open the app, it just crashes with a stack trace.  Any thoughts on what I may be doing incorrectly?  I've attached the errors I am seeing.",
    "92694": "argument 1 has unexpected type 'NoneType'\r\n\r\nIt looks like you're not providing any command line arguments to the sloth application and it expects them.  The first argument is a json file that your labels will be recorded in.  You can also pass in custom configurations for the type of object you want to label and how you want to select those objects, e.g. rectangle, circle, polygon.\r\n\r\nInstructions can be found [here][1]\r\n\r\n\r\n  [1]: http://sloth.readthedocs.org/en/latest/index.html",
    "92706": "As @Senecaur said, it's likely the command line arguments aren't set properly (i.e. `sloth --config slothwhales.py whale_faces_smerity.json`).\r\n\r\nI have instructions and an example JSON configuration that adds the custom labels \"Head\" and \"Body\" at the [Right Whale Hunt](https://github.com/Smerity/right_whale_hunt) repository - hopefully they're of use.",
    "92716": "Thanks all for the feedback. I did end up getting it to work. In the end, there was an issue with the environment. I went to the code where it was blowing up and it had to do with the saved window state. I commented it out and it ran like a champ. I then close it, uncommented the offending line, and it started right up. Kind of weird but it's going now. \r\n\r\nThanks a bunch Kagglers!",
    "92731": "Senecaur is there a way to load multiple images, at a time, into sloth?",
    "92737": "Jay Karimi, there's an example on the Sloth site of [adding every nth image to a label file](http://sloth.readthedocs.org/en/latest/examples.html#adding-every-nth-image-to-label-file). This is extended to our dataset in my [Right Whale Hunt](https://github.com/Smerity/right_whale_hunt#contributing-to-annotations) repo.",
    "92920": "Smerity, I created a custom label in the sloth default config file but it does not appear in the GUI; what am I missing?\r\n\r\n\r\n**UPDATE:** I realized I had to rerun\r\n\r\n    sudo python setup.py install",
    "92996": "Smerity & @Senecaur, did you use the annotations generated by sloth to train the cascade classifier using MATLAB or an alternative like OpenCV? I have had no luck with OpenCV.",
    "93004": "Jay Karimi, a friend of mine has tried to use the [Sloth annotations](https://github.com/Smerity/right_whale_hunt/) to train OpenCV but she has had mixed success. It turns out OpenCV has a number of limitations such as only working on grayscale and being very sensitive to parameters for training. We also look at dlib's [facial classification system](http://blog.dlib.net/2014/02/dlib-186-released-make-your-own-object.html), meant to be far faster and higher precision than OpenCV, but it requires the bounding boxes to be the same general ratio.\r\n\r\nConverting the JSON file to an XML file should be relatively straightforward and I'd be very interested to know how MATLAB's cascade classifier handles it! Unfortunately MATLAB is very far from my lingua franca so it's not something I'll be doing.",
    "93005": "Jay Karimi   I trained an OpenCV cascade classifier (haar features) based on the sloth output.  I just wrote  a Python script (~15 lines of code) to parse the sloth json output and crop out the training images using OpenCV.  \r\n\r\nI didn't actually realize that OpenCV only uses grayscale images, but that certainly seems to be the case.  I'm finding performance is good enough for my needs anyway.",
    "93006": "Senecaur I have taken a similar approach of converting the sloth json output for use with OpenCV. However, I am having issues running opencv_train cascade (as noted by my [stackoverflow post][1]). In the meantime, I have tried installing OpenCV 3 from source, instead of using\r\n \r\n`conda install opencv` \r\n\r\nbut I have been having problems getting it going as well.\r\n\r\nDo you have any guides or suggestions; what was you opencv installation process?\r\n\r\n\r\n  [1]: http://stackoverflow.com/questions/32671459/opencv-training-a-cascade-classifier",
    "93007": "Jay Karimi  I'm using OpenCV 3.0.0 built from source on OS X 10.10.5\r\n\r\nI do almost exactly the same thing as you describe in your stack overflow post.  A critical difference is that I use haar features whereas you are using LBP.  When I try using LBP nothing happens either, just like you are describing; when I use haar it starts training almost instantly.  As I understand it you are likely to get better detection performance using haar features in any case, detection just runs slightly slower.",
    "93008": "Senecaur that's interesting. I am currently trying to install opencv 3 using my anaconda setup with the [following tutorial][1] but\r\n\r\n`sudo make install`\r\n\r\n keeps failing saying with error \r\n\r\n`'Python.h' file not found` \r\n\r\nI do not know what is causing that, any ideas? In the meantime, I will try to `conda install` opencv 2.4.8 and see if using haar features, instead of LBP, will bypass the bug.\r\n\r\n\r\n  [1]: https://blog.kevin-brown.com/programming/2014/09/27/building-and-installing-opencv-3.html",
    "93033": "Senecaur, I was able to train the cascade with haar features; there must be some bug with the LBP approach? But, I have not been able to use `opencv_performance`, I receive an `invalid xml` error. Is this occurring for you as well?",
    "93036": "Jay Karimi I haven't spent much time looking at it, but I did get the LBP model to train on a server with 48 cores and 128GB RAM.  So not sure if the Macbook is the limiting factor or there is indeed a bug.  I just switched to haar features as they did what I need.\r\n\r\nI've never used opencv_performance.  I know that opencv changed it's cascade classifier xml format at one point, so that might be the issue.  That change caused me problems when I wanted to use the GPU to accelerate the classifier - you can't with the new xml format.",
    "93318": "Hi everyone, \r\nDoes anyone run sloth under the Windows 7 command line?\r\nAfter installation I run in command line sloth examples/example1_labels.json I receive error:\r\n*'sloth' is not recognized as an internal or external command*",
    "93379": "I ran into that briefly. You need to look where the sloth application is located and add it to your path. Basically, what it is telling you is it isn't in the current directory or anywhere on your path. You could also give the fully qualified path to the sloth application.",
    "93459": "Senecaur I was able to get a haar cascade trained but when I try to detect a face in an image, it seems to run indefinitely for a single image...I have been waiting 50 minutes and still no result...any ideas?",
    "93478": "Jay Karimi Performing detection on a new image should 10s-100s of milliseconds. What code are you using for detection?",
    "93490": "Senecaur\r\n\r\n Python:\r\n\r\n    import cv2\r\n    face_cascade = cv2.CascadeClassifier('trained_cascade.xml')\r\n    img = cv2.imread('whale_img.jpg')\r\n    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\r\n    faces = face_cascade.detectMultiScale(gray)\r\n\r\nit will hang on the last line.\r\n\r\n[Source][1]\r\n\r\n\r\n  [1]: http://docs.opencv.org/master/d7/d8b/tutorial_py_face_detection.html#gsc.tab=0",
    "93493": "Jay Karimi I just tested that code and it works fine with my cascade.xml and a test image.  Takes about 1 second.  \r\n\r\nYou could try using python -m trace --trace YOURSCRIPT.py to see some verbose output and find out what it's hanging on",
    "93495": "Senecaur \r\n\r\n    re.py(234):     if not bypass_cache:\r\n    re.py(235):         cachekey = (type(key[0]),) + key\r\n    re.py(236):         try:\r\n    re.py(237):             p, loc = _cache[cachekey]\r\n    re.py(238):             if loc is None or loc == _locale.setlocale(_locale.LC_CTYPE):\r\n    re.py(239):                 return p\r\n    warnings.py(73):     if append:\r\n    warnings.py(76):         filters.insert(0, item)\r\n    face.py(2): face_cascade = cv2.CascadeClassifier('data/data/cascade.xml')\r\n    face.py(3): img = cv2.imread('../w_821.jpg')\r\n    face.py(4): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\r\n    face.py(5): faces = face_cascade.detectMultiScale(gray)\r\n\r\nno luck, once it gets to that line even the verbose output hangs/disappears",
    "93497": "Jay Karimi Just a thought - is your Python cv2 definitely using the same opencv as you used to train the classifier?  I know you mentioned using conda install opencv and building opencv 3 from source.  If it's any help, I am using opencv 3 on OS X.",
    "93502": "Hi @Jay Karimi,\r\n\r\nI had a similar problem - my classifier took a long time to run, even for a single image. I suspect it means that I have trained a bad classifier and need a new one. However, I was able to get it to work faster by increasing the minimum window size and/or increasing the required number of neighbors. \r\n\r\nkb",
    "93506": "Senecaur I trained my classifier on a linux machine running opencv 2.4.10 and I used it for detection on my mac running 2.4.8. I tried running the detection on the linux machine to see if the discrepancy in versions was the source of the issue, no luck; I have the same problem.\r\n\r\n@Kevin Burnham I tried increasing those values but no luck  yet. I probably just have a poor classifier but my opencv_performance function has not been working. Since detection isn't worker either, I have no way of verifying the performance.",
    "93833": "I'm still struggling with false positives with OpenCV 3.0.0 but the speed with which I identified those false positives was enormously increased when I installed the program on an AWS g2.2xlarge AMI with a GPU.",
    "193867": "If you are using Mac OS X, you can use RectLabel. \n\nAn image annotation tool to label images for bounding box object detection and segmentation.\n\nhttps://rectlabel.com\n\nKey features:\n\n- Drawing bounding box, polygon, and cubic bezier\n\n- Export index color mask image and separated mask images\n\n- 1-click buttons make your labeling work faster\n\n- Customize the label dialog to combine with attributes\n\n- Settings for objects, attributes, hotkeys, and labeling fast\n\n- Layer order for overlapped boxes\n\n- Quick zoom to existing boxes\n\n- Support the PASCAL VOC format",
    "318153": "This is a web based alternative, collaborative, slick UI, clean interface, and lots of open datasets\n\nhttps://dataturks.com/\nhttps://dataturks.com/projects/Dataturks/Demo%20Image%20Bounding%20Box%20Project"
  },
  "source": "meta"
}