As a F-visa holder, whether F-1 or F-2, you are considered as a nonresident for five years from the year you first enter the US. In your situation, it's 2012-2016. Starting from January 1, 2017, if you meet the Substantial Presence Test SPT, ( be present in US for at least 183 days), you are considered as a resident for tax purposes.