toniz / deeplab-on-ios

Tensorflow-lite Deeplab Real Time Segmentation on iOS with OpenCV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

intgrate new model with the code

hakS07 opened this issue · comments

commented

@toniz
thnx for the project, it was really helpful for me, i have tried to put my retrained model on the code but I got an error if you don't mind can you check it with me??

error > EXC_BAD_ACCESS

i have trained deeplab model on new object and its work with detection
i was able to successfully convert the model with the following command:
toco --output_file=model.tflite --input_file=prozen_inference_graph.pb --input_arrays=ImageTensor --output_arrays=SemanticPredictions --input_shapes=1,513,513,3 --inference_input_type=QUANTIZED_UINT8 --inference_type=FLOAT --mean_values=128 --std_dev_values=127 --allow_custom_ops --post_training_quantize
Sans titre 2

commented

your model input shape is: --input_shapes=1,513,513,3
So change
cv::resize(frame, small, cv::Size(257, 257), 0, 0, CV_INTER_LINEAR);
to:
cv::resize(frame, small, cv::Size(513, 513), 0, 0, CV_INTER_LINEAR);

commented

@toniz thnx it works now