The invention discloses a method for quickly and automatically generating a software graphical interface. The method comprises the following steps: S100, receiving a source picture for generating thegraphical interface; s200, identifying various UI component graphs and text information in the source picture through machine vision detection; and S300, completing automatic layout of the UI component, automatically and quickly generating a graphical interface, and generating and displaying a control script code of the interface. The invention further discloses a corresponding device. According to the method for quickly and automatically generating a software graphical interface, source pictures of a graphical interface are generated by flexibly adopting various modes such as sketch drawing on a drawing board, field hand-drawn sketch input and external picture import; the problems that in the software design process, UI design and product manager repeated drawing, modification and other efficiency are low, and design inspiration and graphic expression are affected are effectively solved, the sketch is rapidly converted into a graphic interface capable of being operated practically, the graphic interface design and manufacturing process is shortened, and the graphic interface input work efficiency is greatly improved.