Taung Byone, Myanmar (CNN) Gyrating dancers passed through the crowds, bowing to men in silk dresses with orchids in their hair, as the normally sleepy village of Taung Byone marked the start of the annual Spirit Festival with a flamboyant opening ceremony.

Every summer, this part of central Myanmar hosts the cross between a traditional religious gathering and gay pride festival, which has become a key event for the LGBT community in a country where those who do not conform to traditional gender ideas are often shunned and "homosexual acts" remain illegal.

This year, as many as 5,000 people from across Myanmar traveled to the festival, many drawn by the promise of meeting with the event's famed Nat Kadaws, mediums whose name translates as "spirit wives."

Nat Kadaws are believed by their followers to communicate with spirits on behalf of worshippers, transmitting their wishes and questions to spirits, before relaying the spirit's guidance or advice to believers, to solve their problem. Nat Kadaws also perform dances to celebrate the spirits and spread luck, usually in elaborate costumes and makeup.

Nat Kadaw U Win Hlaing has performed in multiple countries around the world and is high demand during the Spirit Festival.

"People might have different difficulties, such as physiological needs, like food, clothes and shelter, their business, or relationships," one of Myanmar's most eminent spirit mediums, U Win Hlaing, told CNN. "I discuss with supernatural beings how to solve their problems."

The medium -- who has performed in nine countries including Thailand, Singapore, France and Japan -- is a superstar among "Nat," or spirit, believers.

Hlaing has more than 100 assistants, including a masseuse, security guards and cooks, who prepare food for both Hlaing and fans, as well as the medium's ever-full red wine dispenser.

Hlaing has also earned an award from the government, for a $300,000 donation and other contributions to Buddhism.

Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Photographer Mariette Pathy Allen has documented the lives of spirit mediums in Myanmar and Thailand. Hide Caption 1 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A spirit medium performs a song and dance as part of a ritual in Mandalay, Myanmar. Hide Caption 2 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Ancient swords are sometimes used as part of religious ceremonies. Hide Caption 3 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Burmese medium, Mot Me Noe, poses with a video of a recent spirit festival performance. Hide Caption 4 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Transgender medium Sai Si said that she is comfortable expressing her femininity, despite the discrimination faced by gay and gender non-conforming men in Myanmar. Hide Caption 5 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Sai Si in the countryside just outside Mandalay, Myanmar. Hide Caption 6 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A spirit medium waits to perform at a spirit festival. Hide Caption 7 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand The assistant of a Burmese medium prepares to perform at a spirit festival. Hide Caption 8 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A Mandalay spirit medium, U Lin Lin, poses for a photo in a ceremonial headdress. Hide Caption 9 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Spirit medium Tinko applies makeup before a religious ceremony. Hide Caption 10 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A novice spirit medium in Mandalay. Hide Caption 11 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A medium in Chiang Mai, Thailand, lights a cigar for the enjoyment of the spirits. Hide Caption 12 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Spirit mediums are often highly regarded in Thailand and Myanmar. They offer spiritual counseling, healing and good fortune. Hide Caption 13 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand The mediums featured in Allen's new book combine Buddhist practices with Southeast Asia's ancient traditions of spirit worship. Hide Caption 14 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Prem, a transgender woman, said that she is possessed by seven different spirits. Hide Caption 15 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A Thai medium performs a ritual that is hoped will bring a young man out of a coma. Hide Caption 16 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand As well as documenting the spirit mediums themselves, Allen's photo series captures the statutes, altars and paraphernalia used in religious ceremonies and spirit festivals. Hide Caption 17 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand A medium seemingly possessed by the spirit of a monkey. Allen also met psychics who said that they were possessed by the spirits of ancestors and even babies. Hide Caption 18 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand Spirit medium Oo Shout Wai rests after performing at a festival outside Mandalay. Hide Caption 19 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand While the book features candid shots of the mediums' everyday lives, some of the most striking images capture them mid-ritual -- at home or at religious festivals. Hide Caption 20 of 21 Photos: How transgender spirit mediums escape stigma in Myanmar and Thailand "Transcendents: Spirit Mediums in Burma and Thailand," published by Daylight Books, is out now. Hide Caption 21 of 21

Addressed by both the female honorific "Daw" and the male "Ko," Hlaing said "I had the feeling I was different from other kids, growing up."

Hlaing is one of many outsiders who have found a home at the Spirit Festival. "Culturally, it is a long-time tradition that straight and gay people come together at this festival," Hlaing said. "It's not just for gays, it's for everyone."

Spirit Wives, Hlaing added, "can be male or female, gay or straight," adding "as long as they are professional, their gender identity does not matter," after expertly applying a double set of false lashes.

For Myanmar's LGBT community however, the festival has become an annual haven, in a country where a colonial era law -- section 377 of the penal code -- still bans homosexual acts.

Festival goers pose for a photo during Myanmar's Spirit Festival in Taung Byone. The event is popular with the country's marginalized LGBT community.

'My parents beat me'

While not widely enforced, LGBT people in Myanmar face a greater frequency of arrests, as well as other discrimination, and many suffer domestic abuse, according to Colors Rainbow, an NGO dedicated to advancing LGBT rights in Myanmar.

Chit Ya Aung -- the 30-year-old's name means "let's love" in English -- knows this only too well. "I felt like I was a girl since I was born," she said. "My parents beat me for being girly."

Raised as a boy, but identifying as female, Aung left home and joined the Nat Kadaws at 14, eventually meeting the man she now regards as her husband at a Spirit Festival eight years ago.

"I am a dancer, he is a drummer. After meeting several times, and making eye contact, it felt like there was something special," she said.

An attendee at the annual Spirit Festival in Myanmar's Taung Byone village.

While Myanmar does not allow same-sex marriage, under local customs, communities may recognize a relationship as legitimate if seven houses to the east and west accept it.

Aung's family came around to both her identity and her relationship, recently calling her home for a reunion and welcoming her husband.

Despite identifying as a woman, Aung describes herself as gay, rather than transgender -- a less common identity in Myanmar due partially to the lack of access to gender confirmation surgery in the country. Only those who can afford to are able to get the expensive procedures, mostly performed in neighboring Thailand.

Social prejudice against transgender people also add to the challenges they face, on top of those experienced by other members of the LGBT community in Myanmar.

"Once they identify themselves as trans people, it is the hardest part," said Hla Myat Htun, deputy director of Colors Rainbow.

"If you are (a) gay guy or lesbian woman, and you are ... not really expressing yourself in the workplace, you are fine," he said.

Those who outwardly express a noncomformist identity face "a lot of discrimination, or different kinds of mistreatment," Htun added, particularly from colleagues or supervisors.

Beautician The The Darli poses for a photo during Myanmar's Spirit Festival.

As Myanmar's economy continues to open up, attitudes to its LGBT community are continuing to change. More than 250 local companies have signed up to the UN Global Compact, which includes adhering to global human rights standards. This does not apply to many local firms, however, said Htun.

"I found it very hard to get a job, so I run my own business as a beautician," said 40-year old The The Darli, who sports long hair and smoky eyes.

Darli -- addressed as "brother or sister" -- made a 20 hour-car journey from the Ayerwaddy Delta for the last ten festivals, with limited funds.

A statue of a Nat Kadaw, seen in Taung Byone, Myanmar.

'Now nobody says anything'

While many openly gay, lesbian and transgender people in Myanmar struggle to find work, spiritual problem-solving can be a lucrative business, with some Nat Kadaws earning up to $7,000 in four days.

"In their whole life, when they are young... they were looked down on because of their identity," said Htun. As Nat Kadaws though, "they are worshiped" without discrimination and stigma.

And in contrast to the past, with senior Nat Kadaws guarding their identities even at the Spirit Festival, many younger fans and apprentices are openly gay.

"I want to dance more at Nat festivals, because I love to dance," said 25-year old Pyae Pyae. He said life for gay men in Myanmar is getting easier year by year, touching a bright pink ruby band on his ring finger.

"We didn't get married, but we lived together secretly," he said. "Now nobody says anything, and we can stay at both parents' homes."

While Pyae's father was a maritime pilot, and his mother wanted him to become one too, he insisted on pursuing the Nat Kadaw path, beginning as a dancer, a move which initially cost his parents' support for him going to college.

"Now my parents surrendered," he said. "Whatever I dig, I dig."

Mediums spin around in a frenzy of red and gold while glugging from a bottle of whiskey, part of an age old ritual to honour Myanmar's spirit guardian of drunkards and gamblers.

Fight goes on

Back at Hlaing's temporary compound, two younger men hurriedly laid out Hlaing's array of lipsticks, the final touch of makeup for the opening ceremony. Hlaing opted for mauve.

After an hour of beautifying, the medium was ready for the thousands of heaving fans waiting in the packed temple. Screams worthy of a rock star erupted as Hlaing entered, with festival-goers clamoring over one another and punch-ups erupting between those vying to get near him.

Hlaing danced for the spirits, before blessing thick wads of bank notes worth roughly 40 cents each and tossing them into the frenzied, sweating crowd.

The show was spectacular. But for Myanmar's LGBT community -- swinging between widespread discrimination and occasional celebration -- when the music stops, the fight for everyday equality, dignity and respect goes on.