Seven months after losing his right eye in a freak training accident, former Philadelphia Phillies pitching prospect Matt Imhof is retiring from baseball at age 23.

Imhof, who began the 2016 season with the Clearwater Threshers in the Class A Florida State League, was taking part in a routine stretching regimen at Brevard County Stadium in late June when a piece of metal broke loose from the wall and struck him in the face -- fracturing his nose, breaking two orbital bones and severely injuring his eye.

After consulting with doctors at Bascom Palmer Eye Institute in Miami and learning the eye was damaged beyond repair, Imhof decided to have it surgically removed and replaced with a prosthetic one. He shared the details of his medical ordeal in a subsequent Instagram post.

"I still love the game of baseball and I'm proud of everything I accomplished in the game," Imhof wrote in a firsthand account for ESPN. "It's opened doors for me I never thought I'd walk through. It's allowed me to represent my country on the biggest stage, and it's given me a platform to effect positive change in the lives of those less fortunate than myself. I am blessed that I was able to play this game for 18 years and will never forget the lessons it taught me along the way.

"I have never doubted my ability to be successful in life and I don't plan on starting now; whether it's a baseball field or a boardroom, I know my future is bright. With that in mind, I would like to announce my retirement from the game of baseball."

Imhof began his professional career as the 47th overall pick in the 2014 MLB first-year player draft out of Cal Poly-San Luis Obispo. In four minor league stops with the Phillies over 2½ seasons, he posted a 13-10 record with a 3.69 ERA.