I dont know anything about Doods or Tensorflow, but if you need a reliable sensor, Yolink is the way to go. This is the contact sensor I use on all of my gates, etc.
https://www.amazon.com/Universal-Contact-Closure-Assistant-Security-Required/dp/B08P1VQMCR