Added the code to find out the frame numbers for each label, some
changes to the pipeline are coming soon.