forked from ob-f/OpenBot
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathModel.java
More file actions
86 lines (69 loc) · 1.44 KB
/
Model.java
File metadata and controls
86 lines (69 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package org.openbot.tflite;
import android.util.Size;
import com.google.gson.annotations.SerializedName;
/** The model. */
public class Model {
public Model(
Integer id,
CLASS classType,
TYPE type,
String name,
PATH_TYPE pathType,
String path,
String inputSize) {
this.id = id;
this.classType = classType;
this.type = type;
this.name = name;
this.pathType = pathType;
this.path = path;
this.inputSize = inputSize;
}
public enum CLASS {
AUTOPILOT_F,
MOBILENETV1_1_0_Q,
MOBILENETV3_S_Q,
YOLOV4
}
public enum TYPE {
AUTOPILOT,
DETECTOR
}
public enum PATH_TYPE {
URL,
ASSET,
FILE
}
@SerializedName("class")
public CLASS classType;
public Integer id;
public TYPE type;
public String name;
public PATH_TYPE pathType;
public String path;
private String inputSize;
public String getName() {
return name;
}
public Size getInputSize() {
return Size.parseSize(inputSize);
}
public void setPath(String path) {
this.path = path;
}
public void setPathType(PATH_TYPE pathType) {
this.pathType = pathType;
}
public void setInputSize(String inputSize) {
this.inputSize = inputSize;
}
public void setName(String name) {
this.name = name;
}
public void setClassType(CLASS classType) {
this.classType = classType;
}
public void setType(TYPE type) {
this.type = type;
}
}