69 lines
1.3 KiB
Plaintext
69 lines
1.3 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Load model"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import tensorflow as tf\n",
|
|
"tf.enable_eager_execution()\n",
|
|
"from model import DepthEstimate\n",
|
|
"\n",
|
|
"model = DepthEstimate()\n",
|
|
"checkpoint_path = \"training_1/cp.ckpt\"\n",
|
|
"model.load_weights(checkpoint_path)\n",
|
|
"\n",
|
|
"print('Model weights loaded.')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Load and evalute on Eigen's test data"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from evaluate import load_test_data, evaluate\n",
|
|
"\n",
|
|
"rgb, depth, crop = load_test_data()\n",
|
|
"evaluate(model, rgb, depth, crop)"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python [conda env:tf_gpu] *",
|
|
"language": "python",
|
|
"name": "conda-env-tf_gpu-py"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.7.3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|