fuck you java
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
plugins {
|
||||
id("application")
|
||||
id("java")
|
||||
kotlin("jvm") version "1.9.22"
|
||||
}
|
||||
|
||||
group = "org.jdetect"
|
||||
@@ -17,4 +19,16 @@ dependencies {
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
resources {
|
||||
srcDir("src/main/resources")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("org.jdetect.MainApp")
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ public class MainApp extends JFrame {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("it runs?");
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
try {
|
||||
|
||||
@@ -26,9 +26,14 @@ public class ModelLoader {
|
||||
InputStream weightsStream = ModelLoader.class.getResourceAsStream("/yolov4-tiny.weights");
|
||||
InputStream configStream = ModelLoader.class.getResourceAsStream("/yolov4-tiny.cfg");
|
||||
|
||||
assert weightsStream != null;
|
||||
if (weightsStream == null) {
|
||||
throw new IOException("Could not find yolov4-tiny.weights in classpath");
|
||||
}
|
||||
byte[] weights = weightsStream.readAllBytes();
|
||||
assert configStream != null;
|
||||
if (configStream == null) {
|
||||
System.err.println("Could not find yolov4-tiny.cfg in classpath");
|
||||
}
|
||||
byte[] config = configStream.readAllBytes();
|
||||
|
||||
// Create temp files
|
||||
|
||||
Reference in New Issue
Block a user