toniz / deeplab-on-ios

Tensorflow-lite Deeplab Real Time Segmentation on iOS with OpenCV
MIT License
23 stars 5 forks source link

intgrate new model with the code #2

Closed hakS07 closed 5 years ago

hakS07 commented 5 years ago

@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

toniz commented 5 years ago

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);

hakS07 commented 5 years ago

@toniz thnx it works now