File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
cnnlibs/src/main/java/com/tzutalin/vision/visionrecognition Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 29
29
/**
30
30
* Created by darrenl on 2015/9/10.
31
31
*/
32
- public class Utils {
32
+ public final class Utils {
33
+
34
+ private Utils () throws InstantiationException {
35
+ throw new InstantiationException ("This class is not for initialization" );
36
+ }
37
+
33
38
@ NonNull
34
39
public static Map <String , Float > sortPrediction (@ NonNull String [] synsets , @ NonNull float [] propArray ) {
35
40
HashMap <String , Float > map = new HashMap <>();
Original file line number Diff line number Diff line change 24
24
/**
25
25
* Create an instance using default instances for vision recognition and detection
26
26
*/
27
- public class VisionClassifierCreator {
27
+ public final class VisionClassifierCreator {
28
28
private final static String SCENE_MODEL_PATH = "/sdcard/vision_scene/mit/deploy_places205_mem.protxt" ;
29
29
private final static String SCENE_WIEGHTS_PATH = "/sdcard/vision_scene/mit/googlelet_places205_train_iter_2400000.caffemodel" ;
30
30
private final static String SCENE_MEAN_FILE = null ;
@@ -35,6 +35,10 @@ public class VisionClassifierCreator {
35
35
private final static String DETECT_MEAN_FILE = "/sdcard/fastrcnn/imagenet_mean.binaryproto" ;
36
36
private final static String DETECT_SYNSET_FILE = "/sdcard/fastrcnn/fastrcnn_synset" ;
37
37
38
+ private VisionClassifierCreator () throws InstantiationException {
39
+ throw new InstantiationException ("This class is not for instantiation" );
40
+ }
41
+
38
42
/**
39
43
* Create an instance using a default {@link SceneClassifier} instance
40
44
* @return {@link SceneClassifier instance
You can’t perform that action at this time.
0 commit comments