Training Neural Network Using Two Datasets

Hello. Can someone with kind heart explain to me how training with two different datasets work? The first dataset is purely for person detection while the second dataset is for head detection. The process should be, the model should detect a person then after detecting a person it then detect the head. Thank you!

You can train two network one by one.
one will person detection
other with head detection.

After training you can pass the input to first network and based on output you can pass it to next network.