toniz / deeplab-on-ios Goto Github PK
View Code? Open in Web Editor NEWTensorflow-lite Deeplab Real Time Segmentation on iOS with OpenCV
License: MIT License
Tensorflow-lite Deeplab Real Time Segmentation on iOS with OpenCV
License: MIT License
@toniz
Hi, I have trained deep lab on my custom dataset(50*50,3400 images) for iris eyes object with 257 as crop size and during the test, it detects for crop with crop size 257 .
i tested the pb model with code python it detects ok
now what I need is to integrate my model on ios application, i was able to successfully convert the model to tflite .but it gives me a slow segmentation
tflite_convert ----output_format=TFLITE --inference_type=FLOAT --inference_input_type=FlOAT --input_arrays=sub_2 --input_shapes=1,257,257,3 --output_arrays=ResizeBilinear_2 --output_file=/Users/hak/Downloads/deeplabv3_mnv2_pascal_trainvall/mobilenet.tflite --graph_def=/Users/hak/Downloads/deeplabv3_mnv2_pascal_trainvall/mobilenet.pb --mean_values=128 --std_dev_values=127 --allow_custom_ops --post_training_quantize
tflite file size=2,2mo
however the original deeplab tflite file works fine on the appliacation
i have changed fps to 60 and to 240 but nothing change
i use iphone6+
@toniz
Hi ,
if you don't mind I want to ask you for the source code of your github repository
@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
@toniz
Hi, I have trained deep lab on my custom dataset(400*300,14000 images) for iris eyes object with 513 as crop size and during the test, it detects for crop with crop size 513 .
i tested the pb model with code python it detects ok(not precise very much but it ok)
now what I need i integrate my model on ios application, i was able to successfully convert the model to tflite .but it gives me a wrong and bad segmentation
python train.py \ --logtostderr \ --train_split="trainval" \ --model_variant="mobilenet_v2" \ --output_stride=16 \ --train_crop_size="513,513" \ --train_batch_size=4 \ --training_number_of_steps=20000 \ --fine_tune_batch_norm=true \ --tf_initial_checkpoint="${INIT_FOLDER}/${CKPT_NAME}/model.ckpt-30000" \ --train_logdir="${TRAIN_LOGDIR}" \ --dataset_dir="${my_DATASET}"
####convert to tflite
tflite_convert ----output_format=TFLITE --inference_type=QUANTIZED_UINT8 --inference_input_type=FlOAT --input_arrays=sub_2 --input_shapes=1,513,513,3 --output_arrays=ResizeBilinear_2 --output_file=/Users/hak/Downloads/deeplabv3_mnv2_pascal_trainvall/mobilenet1-20000.tflite --graph_def=/Users/hak/Downloads/deeplabv3_mnv2_pascal_trainvall/mobilenet-20000.pb --mean_values=128 --std_dev_values=127 --allow_custom_ops --post_training_quantize
did you have any idea why mobilenet gives me such bad result is't the training steps no enough for 14000 images or what ??
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.