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
Exception in thread "main" java.lang.ExceptionInInitializerError | |
at com.ftu.data.LPData.forceNumericalStability(LPData.java:88) | |
at com.ftu.cnn.ConvolutionalNetRun.main(ConvolutionalNetRun.java:24) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:498) | |
at com.intellij.uiDesigner.snapShooter.SnapShooter.main(SnapShooter.java:59) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) |
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
// Predict function | |
public static int[][] toIntArrayArray(BufferedImage image) { | |
int w = image.getWidth(); | |
int h = image.getHeight(); | |
int[][] ret = new int[h][w]; | |
int j; | |
if(image.getRaster().getNumDataElements() == 1) { | |
WritableRaster i = image.getRaster(); | |
for(j = 0; j < h; ++j) { |
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 Model saveModel() throws IOException { | |
log.info("Save model............"); | |
OutputStream fos = Files.newOutputStream(Paths.get(Config.FILE_PARAMS)); | |
DataOutputStream dos = new DataOutputStream(fos); | |
Nd4j.write(model.params(), dos); | |
dos.flush(); | |
dos.close(); | |
FileUtils.writeStringToFile(new File(Config.FILE_MODEL), model.getLayerWiseConfigurations().toJson()); | |
return this; | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ftu</groupId> | |
<artifactId>ANPR</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.ldt.plateregconition; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.ldt.plateregconition; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.File; |