mofanv / darknetz

runs several layers of a deep learning model in TrustZone
MIT License
85 stars 29 forks source link

Couldn't open file: cfg/mnist_lenet.cfg even as root #28

Closed haadeescott closed 3 years ago

haadeescott commented 3 years ago

Hi @mofanv

When I ran the command darknetp classifier predict -pp_start 4 -pp_end 10 cfg/mnist.dataset cfg/mnist_lenet.cfg models/mnist/mnist_lenet.weights data/mnist/images/t_00007_c3.png I encountered the error Couldn't open file: cfg/mnist_lenet.cfg even when Im logged in as root. Any advice?

Thanks, HD

mofanv commented 3 years ago

Hi, did you run it on real board? Can you please check if the file cfg/mnist_lenet.cfg exist or not? I think it either does not exist or is in the wrong directory.

haadeescott commented 3 years ago

The file does exist.

cfg
├── cifar100.data
├── cifar.data
├── cifar_small.cfg
├── mnist.dataset
├── mnist_lenet_bak.cfg
├── mnist_lenet.cfg
├── vgg-7.cfg
├── vgg-7_cifar100.cfg
└── vgg-7_cifar10.cfg

And i believe its in the right directory. However im able to run the inference model on the Qemu v8 optee, but not on the RPI3 board itself.

haadeescott commented 3 years ago

Hi @mofanv Ive solved the issue. It turns out its a file path issue that needs to be specified further. In the rootfs/root/tz_datasets/cfg/ I editted the mnist.dataset file and added tz_datasets/ into the start of the filepath for all except for backup. e.g. labels = tz_datasets/data/mnist/mnist.labels.list names = tz_datasets/data/mnist/mnist.names.list