To investigate which shape of solid obstacles is most optimal in terms of detonation-assisting capability within a closed channel, this study utilizes the Large Eddy Simulation (LES) method, based on the OpenFOAM platform, to conduct a detailed numerical study on the effects of different shaped obstacles (rectangular, rhombus, trapezoidal, circular, triangular) on flame acceleration and detonation initiation processes. The results show that the obstacles arranged in the middle of the combustion chamber can create more passages and local flames. Meanwhile, changes in the shape of obstacles can also produce different vortex structures and recirculation zones. These differences affect the flame surface area and the total combustion heat release rate, thereby affecting the flame acceleration effect. Judging from the results, triangular obstacles have the best flame acceleration effect, followed by rhombus, trapezoid, rectangle, and circular obstacles. In terms of detonation initiation, the obstacles with a slope can induce vortex to detach earlier, which produce a better vortex-flame interaction. Simultaneously, the slope can reflect the shock wave more frequently, creating more favourable conditions for the formation of Mach reflection and Mach stem. Based on this, it is found that trapezoidal and triangular obstacles have better detonation-assisting capability. Additionally, it is found that the stronger the leading shock wave and the shorter the distance between it and the flame front, the better the detonation initiation effect. In general, the types of detonation initiation in this study all belong to the shock detonation transition (SDT). However, the detonation initiation process can be further classified into two categories: (I) Detonation induced by shock wave reflection; (II) Detonation triggered by shock wave focusing.