This year, Mr. Dighera sold the square and heart-shaped watermelons for $40 each, primarily through local upscale markets. At the same time, he figured out how to use a mold to imprint logos: Whole Foods received its own branded melons, the letters perfectly pressed into the rind.

It took Mr. Dighera 27 varieties of pumpkin — and roughly $400,000 — before he found the right one to take the monster shape.

“I started playing around and realized pretty quickly this wasn’t going to be a quick thing,” he said. “But I also realized that if I could really figure it out, I would have something special.”

And something that could make a lot of money.

Mr. Dighera, 53, worked as a tractor operator for the Los Angeles Department of Water and Power for more than three decades, but he always harbored dreams of tilling land instead of asphalt, as his grandparents had done on their farm in San Diego. In 2003, he bought a small piece of property in Ventura County, in an area known for avocados. For more than a decade, he mostly lost money as a small organic farmer, growing kale, lettuce, berries, tomatoes and whatever else he could on the fertile ground, selling primarily to nearby organic markets.

For the past four years, though, he has pursued the creation of perfectly molded produce with a vengeance. He learned that he could shape only the first two fruits of a vine — subsequent pumpkins were too big. He worked with a local plastics company to develop a mold.

“When you try something for four years of your life, people really start to think you’re wacko,” he said.

This year, he estimates he produced 5,500 pumpkin heads. But in the coming year, he plans to turn over almost his entire farm to the endeavor, aiming to harvest between 30,000 and 40,000 pumpkinsteins. Cultivating them is easier than watermelons, Mr. Dighera said, because nobody is concerned about how a Halloween pumpkin tastes.