Jorven Seren, who was born a man, asked to be addressed as a woman throughout his court appearance - while he sat in the dock hugging a large doll he brought to hearing .
The 55-year-old was arrested after being seen kissing a child outside a cafe before cops later found child sex images on his computer.
Members of a nearby church contacted police about Seren's odd behaviour then spoke to the victim's distressed mother about the incident in Thanet, Kent.
Police went to Seren's home in Margate, Kent, where they discovered more than 460 disturbing images of child sex on his mobile phone.
When questioned, Seren claimed that a known paedophile, who has since died, persuaded him to download the images.
When he appeared in Canterbury Crown Court on Monday, judge Adele Williams banned Seren from keeping the 3ft doll in the dock - so he sucked his thumb throughout the rest of the hearing.
Judge Williams said: "That is totally inappropriate and I make it plain she will not be doing that for the rest of the hearing."
In April, last year members of a church had contacted officers after becoming concerned about Seren's behaviour towards children.
Sometime later, the victim's mother saw Seren trying to get the attention of her very young child and later saw her child being kissed on the lips.
The mother later described it as "a prolonged peck" and immediately took the child away after becoming "deeply shocked" by the incident.
Police had a meeting with Seren and noted "some items of concern" in his home.
In July last year, Seren was arrested and officers found the images on his computer which he claimed had been downloaded by a man known to police as a paedophile.
Paul Hogben defending Seren said: "I am sure looking at this defendant and the offences which she has admitted there is a great deal of concern.
"There are no mental health issues but there are personality disorders. Miss Seren was born a man but since an early age felt she is more a woman than a man."
Seren had pleaded guilty to indecent assault and downloading illegal child sex images.
The court heard how Seren thinks he is a five-year-old girl and is regarded as "highly vulnerable".
Although psychiatrists concluded the defendant has personality problems he did not have any mental illness.
He was jailed for a total of 15 months.
Judge Williams told him: "I know it will be difficult for you to serve a custodial sentence but I have a duty to protect the public and especially young children."