Skip to content

Instantly share code, notes, and snippets.

Avatar

Junyong You junyongyou

  • NORCE
  • Bergen, Norway
View GitHub Profile
View ImageRecognitionServlet.java
package videotoolkit.deeplearning.servlet;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import no.cmr.videotoolkit.deeplearning.engine.ClassificationResultJSON;
import no.cmr.videotoolkit.deeplearning.engine.ImageRecognition;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import javax.servlet.ServletException;
View gist:28cbca140337d1e054f05d61f7240084
package org.deeplearning4j.examples.convolution;
import org.canova.api.records.reader.RecordReader;
import org.canova.api.split.FileSplit;
import org.canova.image.loader.BaseImageLoader;
import org.canova.image.loader.NativeImageLoader;
import org.canova.image.recordreader.ImageRecordReader;
import org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator;
import org.deeplearning4j.datasets.iterator.DataSetIterator;
import org.deeplearning4j.eval.Evaluation;