Manually added system path for tensorflow
This commit is contained in:
parent
8ecbc781eb
commit
4a28f9f9a1
11
.classpath
11
.classpath
|
@ -6,21 +6,16 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/OpenCV-3.4.0">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/TensorFlow">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Tensorflow"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=9
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=9
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=9
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
|
@ -47,6 +47,7 @@ public class IronMiner {
|
|||
public void run() throws Exception {
|
||||
while (true) {
|
||||
BufferedImage screenCapture = objectDetector.captureScreenshotGameWindow();
|
||||
System.out.println("looking for iron ores");
|
||||
ArrayList<DetectedObject> detectedObjects = objectDetector.getObjectsInImage(screenCapture, 0.60);
|
||||
ArrayList<DetectedObject> ironOres = objectDetector.getObjectsOfClassInList(detectedObjects, "ironOre");
|
||||
|
||||
|
@ -67,7 +68,7 @@ public class IronMiner {
|
|||
}
|
||||
}
|
||||
|
||||
dropInventoryIfFull();
|
||||
//dropInventoryIfFull();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ObjectDetector {
|
|||
Robot robot;
|
||||
|
||||
public ObjectDetector() throws AWTException {
|
||||
this.model = SavedModelBundle.load(Paths.TENSORFLOW_MODEL_DIRECTORY, "serve");
|
||||
this.model = SavedModelBundle.load("/home/dpapp/raccoon_dataset/results/checkpoint_56749/saved_model/", "serve");
|
||||
this.robot = new Robot();
|
||||
}
|
||||
|
||||
|
@ -140,4 +140,9 @@ public class ObjectDetector {
|
|||
data[i + 2] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
public BufferedImage captureScreenshotGameWindow() throws IOException, AWTException {
|
||||
Rectangle area = new Rectangle(Constants.GAME_WINDOW_OFFSET_X, Constants.GAME_WINDOW_OFFSET_Y, Constants.GAME_WINDOW_WIDTH, Constants.GAME_WINDOW_HEIGHT);
|
||||
return robot.createScreenCapture(area);
|
||||
}
|
||||
}
|
|
@ -10,8 +10,13 @@ public class main {
|
|||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println("Starting Iron Miner.");
|
||||
System.load("/usr/local/cuda/lib64/libcublas.so.9.0");
|
||||
System.load("/usr/local/cuda/lib64/libcusolver.so.9.0");
|
||||
System.load("/usr/local/cuda/lib64/libcudart.so.9.0");
|
||||
System.load("/usr/local/cuda/lib64/libcufft.so.9.0");
|
||||
System.load("/usr/local/cuda/lib64/libcurand.so.9.0");
|
||||
//System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
//System.loadLibrary(org.tensorflow);
|
||||
System.load("/home/dpapp/jni/libtensorflow_jni.so");
|
||||
|
||||
IronMiner ironMiner = new IronMiner();
|
||||
ironMiner.run();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue