Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Commit e0ea6ee

Browse files
authored
Improve viz for image classification (#164)
* Write another file to show the classification argmax. Scale up images in ResultFragment.kt. * Bump ci * Bump ci * Bump ci
1 parent 7a78549 commit e0ea6ee

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

plugin/src/main/kotlin/edu/wpi/axon/plugin/ProcessTestOutputPlugins.kt

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ object ProcessTestOutputPlugins {
1414
| with open("output/model_output.txt", "w+") as f:
1515
| np.savetxt(f, model_output)
1616
|
17+
| with open("output/classification.txt", "w+") as f:
18+
| f.write("Expected class: {}\n".format(np.argmax(expected_output)))
19+
| f.write("Predicted class: {}\n".format(np.argmax(model_output)))
20+
|
1721
| images = tf.image.encode_jpeg(tf.cast(model_input[0]*255, tf.uint8))
1822
| fwrite = tf.write_file(
1923
| tf.constant("output/model_input.jpeg"),

ui-javafx/src/main/kotlin/edu/wpi/axon/ui/view/jobresult/ResultFragment.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class ResultFragment : Fragment() {
7171
) {
7272
isPreserveRatio = true
7373
isSmooth = true
74-
isCache = true
74+
fitHeight = this@borderpane.height - 50
7575
}
7676

7777
else -> label("Cannot visualize data format: $extension")

0 commit comments

Comments
 (0)