# Resources/Guidance to incorporate tensorflow model to slicer scripted module

**URL:** <https://discourse.slicer.org/t/resources-guidance-to-incorporate-tensorflow-model-to-slicer-scripted-module/20897>\
**Category:** Support\
**Tags:** segmentation, python, deep-learning, tensorflow\
**Created:** [December 3, 2021, 4:42am UTC](https://discourse.slicer.org/t/resources-guidance-to-incorporate-tensorflow-model-to-slicer-scripted-module/20897 "2021-12-03T04:42:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganeshaaraj](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@Ganeshaaraj](https://discourse.slicer.org/u/Ganeshaaraj)\
**Post date:** [December 3, 2021, 4:42am UTC](https://discourse.slicer.org/t/resources-guidance-to-incorporate-tensorflow-model-to-slicer-scripted-module/20897/1 "2021-12-03T04:42:27Z")

</div>

Hello,

I developed a semantic segmentation model using U-Net (Deep learning architecture) in Tensorflow. Model is fully trained. I want to develop a scripted module in which I want to import that particular model to carry out predictions for unseen future data.

It will be very helpful if someone can refer to any reference material which helps to build the above case from scratch or any comments./ideas/guidance regarding above case are welcome

Thank you

G.Ganeshaaraj

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [December 3, 2021, 2:12pm UTC](https://discourse.slicer.org/t/resources-guidance-to-incorporate-tensorflow-model-to-slicer-scripted-module/20897/2 "2021-12-03T14:12:06Z")

</div>

@Fernando has done some [cool tools with pytorch](https://github.com/fepegar/SlicerParcellation). Tensorflow can also be added to Slicer via `pip_install` so you can probably do something similar. I don’t have any example code I can share, but I’ve used tensorflow with Slicer volumes just by passing numpy arrays around.

What structures are you segmenting with the U-Net?
