Ref from zhijie Lee and add super pixel to the code.