This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class YoloKerasModelImport { | |
public static int nBoxes = 5; | |
public static double [][] priorBoxes = {{0.57273, 0.677385}, {1.87446, 2.06253} , | |
{3.33843, 5.47434}, {7.88282, 3.52778}, {9.77052, 9.16828}}; | |
private static long seed; | |
private static WorkspaceMode workspaceMode; | |
public static void main(String[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[net] | |
# Testing | |
#batch=1 | |
#subdivisions=1 | |
# Training | |
batch=64 | |
subdivisions=16 | |
width=224 | |
height=224 | |
channels=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Obj_Detect { | |
public static void main(String[] args) throws Exception { | |
//org.openjdk.jmh.Main.main(args); | |
Model model = ModelSerializer.restoreComputationGraph("/home/project/data/tiny_yolov2.zip",false); | |
ParallelInference parallelInference = new ParallelInference.Builder(model).inferenceMode(InferenceMode.BATCHED).batchLimit(8).workers(4).build(); //.queueLimit(32) | |
new Thread(() -> { | |
try { | |
new ObjectDetectorFromVideo(parallelInference).startRealTimeVideoDetection("/home/project/videos/adisys_cam_1.mp4"); | |
); |