Depreciation is based on the lower of (1) Adjusted Cost Basis, or (2) Fair Market Value at date of conversion to a rental.
Adjusted Cost Basis is usually your (1) original purchase price, plus (2) cost of improvements, minus (3) any depreciation taken prior to conversion to a rental.
In other words, a refinance does not affect it. If it was refinanced while it was a rental, some of the refinance closing costs may be deductible or amortizable.