public class GistCalculator
{
public static Gist<fimage> fsg = new Gist<fimage>(256, 256);
public static FeatureExtractor<floatfv, fimage=""> gex = new GistExtractor(fsg);
public static SVMAnnotator svm = new SVMAnnotator(gex);</floatfv,></fimage></fimage>
I get an error "Data did not contain exactly 2 classes. It had 12."
Does anyone have any samples that might use GIST + SVM? Currently my 12 folders are just that, folders. The names hold no relevance to what is inside (I actually use a RecordReader and extract a float score from a csv file for each image).
Thanks
-scprotz
Last edit: Dave Mobley 2015-09-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your overall approach looks fine - I think the problem lies with your ScenicOrNot class, which I would guess is building a dataset with too many classes (for a binary problem the GroupedDataset should have two just groups).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Last post was actually by me (but forgot to log in-not sure iof I can fix it after the fact)
Hi All,
I have a data set (some thousands of images). I want to run the GIST global descriptor on then and then apply SVM to it.
My basic procedure is:
1) Load dataset (Images are on filesystem in 12 distinct folders)
2) Run SVM (and feature extractor is a GIST extractor I made)
Does this sound like a correct approach? And if so, here is my code so far - any recommendations?
public class GistExtractor implements FeatureExtractor<floatfv, fimage="">
{
private Gist<fimage> gist = null;</fimage></floatfv,>
}
public class GistCalculator
{
public static Gist<fimage> fsg = new Gist<fimage>(256, 256);
public static FeatureExtractor<floatfv, fimage=""> gex = new GistExtractor(fsg);
public static SVMAnnotator svm = new SVMAnnotator(gex);</floatfv,></fimage></fimage>
}
I get an error "Data did not contain exactly 2 classes. It had 12."
Does anyone have any samples that might use GIST + SVM? Currently my 12 folders are just that, folders. The names hold no relevance to what is inside (I actually use a RecordReader and extract a float score from a csv file for each image).
Thanks
-scprotz
Last edit: Dave Mobley 2015-09-07
Your overall approach looks fine - I think the problem lies with your
ScenicOrNot
class, which I would guess is building a dataset with too many classes (for a binary problem theGroupedDataset
should have two just groups).