A Long Island high school senior whose family was forced into a homeless shelter just weeks ago has been named one of the top science students in the nation.

Samantha Garvey, 17, is among 61 Long Island teens designated as semi-finalists in the National Intel Science Search.

"I couldn't believe it," Garvey told NBC New York. "My dad has always said, 'Pick your head up and keep on going.' That's the mentality."

The Garvey family was evicted from their home in December after the teen's parents were injured in a car crash. Samantha, along with her mom, dad and two siblings, moved into a homeless shelter in Bay Shore two weeks ago.

It's the family's second time in a shelter. Garvey, who attends Brentwood High School, says being homeless has "always been a motivator for me."

That motivation has driven Garvey to become an honors student applying for admission to Brown University, among others, even as she struggled to find the cash to pay for her application.

"You can sit around and mope, but what's that going to get you?" Garvey said.

The teen found relief in the two-and-a-half year scientific study that culminated in her Intel entry. The study focused on the effects of predators on mussels, and the work took her to a Long Island salt marsh and a research lab at Stony Brook University -- all as she faced obstacles at home.

"Sam has the ability to focus amidst all of her troubles," said teacher Rebecca Grella. "Even in the darkness, she sees the light."

"I tell all my customers about her," said dad Leo Garvey, now working as a cab driver.

"We are so proud of her," said mom Olga Garvey, now working at a local hospital.

Samantha Garvey aspires to be a marine biologist. She hopes for more good news later this month, when Intel names its finalists for the competition's top prize of $100,000.