If \(S\) is a numerical semigroup, we will denote by \({\mathrm F}(S),\) \({\mathrm g}(S)\) and \({\mathrm t}(S),\) the Frobenius number, the genus and the type of \(S,\) respectively. We will also denote by \({\mathrm n}(S)\) and \({\mathrm i}(S)\) the cardinality of the sets \(\{s\in S\mid s<{\mathrm F}(S)\}\) and \(\{x\in \mathbb{N}\backslash S\mid x-1\in S\},\) respectively. In this paper we will study the \(\mathrm{PTT}\)-semigroups. That is, perfect numerical semigroups with type two. In particular, we will see that if \(S\) is a numerical semigroup, then the following conditions are equivalent: 1) \(S\) is a \(\mathrm{PTT}\)-semigroup; 2) The set of pseudo-Frobenius number of \(S\) is \(\{{\mathrm F}(S),{\mathrm F}(S)-1\}\); 3) \(S\) is maximal in the set \(\{T\mid T \mbox{ is a numerical semigroup } T\cap \{{\mathrm F}(S),{\mathrm F}(S)-1\}=\emptyset \mbox{ and } {\mathrm t}(T)=2\}\); and 4) \({\mathrm F}(S)-1\notin S\) and \({\mathrm n}(S)={\mathrm g}(S)-{\mathrm i}(S).\) As an application of these characterizations, we will provide several algorithms for calculating all the \(\mathrm{PTT}\)-semigroups with a given Frobenius number.