All the above that I wrote about is for tumor segmentation. For segmentation of the lung, you can use this automated tool: