i = Binarize@Import["https://i.sstatic.net/qofeF.png"];
 id = ColorNegate@DeleteSmallComponents[ColorNegate@i, 10^4]
 vertexI = SelectComponents[id, "Count", 10 < # < 100 &]
 vertexpos = ComponentMeasurements[vertexI, "Centroid"][[All, 2]]
 template = Subsets[Range@Length@vertexpos, {2}]
 lines = Subsets[vertexpos, {2}]
 t1 = Total@Flatten@ImageData@Binarize@ImageMultiply[id, ColorNegate@vertexI]
 p = Flatten@
 Position[Total@Flatten@ImageData@
 Binarize@
 Show[ImageMultiply[id, ColorNegate@vertexI], 
 Graphics[{Line[#]}]] & /@ lines - t1, x_ /; x > -100]
 Show[Graphics[{Red, Line[#]}] & /@ lines[[p]]]

![Mathematica graphics](https://i.sstatic.net/daN3F.png)

 Graph[UndirectedEdge @@@ template[[p]]]

![Mathematica graphics](https://i.sstatic.net/7Opun.png)