tobybreckon / fire-detection-cnn

real-time fire detection in video imagery using a convolutional neural network (deep learning) - from our ICIP 2018 paper (Dunnings / Breckon) + ICMLA 2019 paper (Samarth / Bhowmik / Breckon)
MIT License
542 stars 172 forks source link

how to use pd to generate pbtxt #46

Closed hwangyl closed 4 years ago

hwangyl commented 4 years ago

Describe the bug < insert a clear and concise description of what the bug is >.

To Reproduce: (please complete the following information): < insert steps to reproduce the behavior in the Linux/Unix terminal >

user@hostname[~] ....

Error output received < insert a clear and concise description of what you expected to happen/see >

Computing Environment (please complete the following information):

Additional context < insert any other context about the problem here >.

< if possible provide links to an test images - hosted on pichost/dropbox/google drive or similar open/shared hosting>

tobybreckon commented 4 years ago

Why do you need the pdtxt? All of the major frameworks use pd, in addition tflite format networks are now also provided.

hwangyl commented 4 years ago

Why do you need the pdtxt? All of the major frameworks use pd, in addition tflite format networks are now also provided.

for C++ OpenCV API

tobybreckon commented 4 years ago

From my reading of the opencv API at docs.opencv.org, the second parameter to the function readNetFromTensorflow() is optional and can be passed as an empty string and hence the the function should work with only the .pb file rather than having both the .pd and the .pdtxt file.

The second parameter can be passed as the empty string or just left out under which circumstances it will take the default value of an empty string as indicated in the opencv manual.

I am aware of others who have successfully used the final model with the opencv c++ API using only the .pd file.

The examples provided inside the conversion and validation scripts in this repo, the python interface to the opencv API is shown to work using just the .pd file. The python interface to opencv is essentially just a wrapper around the c++ interface, expect this to work inherently just a .pd file only also.

hwangyl commented 4 years ago

From my reading of the opencv API at docs.opencv.org, the second parameter to the function readNetFromTensorflow() is optional and can be passed as an empty string and hence the the function should work with only the .pb file rather than having both the .pd and the .pdtxt file.

The second parameter can be passed as the empty string or just left out under which circumstances it will take the default value of an empty string as indicated in the opencv manual.

I am aware of others who have successfully used the final model with the opencv c++ API using only the .pd file.

The examples provided inside the conversion and validation scripts in this repo, the python interface to the opencv API is shown to work using just the .pd file. The python interface to opencv is essentially just a wrapper around the c++ interface, expect this to work inherently just a .pd file only also.

Thank you for your prompt reply.