The robbery occurred at about 1:55 a.m. at a home in the 500 block of 40th Avenue.
The 33-year-old woman and 30-year-old man were at home when four suspects stormed in through a back door and held them at gunpoint while taking items from the house, according to police.
The robbers took 40 marijuana plants, a television, an iPad, two cellphones and cash before fleeing.
Officers responding to the robbery then found more marijuana plants inside the home and detained the man and woman, police spokesman Lt. Troy Dangerfield said.
The names of the pair were not immediately available, and they have not been arrested, Dangerfield said.
The pair had a prescription from their doctor to grow 99 marijuana plants, and had less than that amount in the home, he said.
Paraphernalia was found that indicated the marijuana was being sold, but the pair said they only sold it to their friends and family, Dangerfield said.
However, their medical marijuana card was expired and "that's something (police) are going to look into," he said.
The robbers had not been found as of Friday morning. They are described as a white man, two black men and an Asian man, and "were more than likely known to the victims," Dangerfield said.
The white man is described as being 5 feet 10 inches tall and weighing about 150 pounds, while the two black men are both described as being about 6 feet tall and 175 pounds, and the Asian man is described as being about 5 feet 6 inches tall and weighing 175 pounds, according to Dangerfield.
Anyone with information about the robbery is asked to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.