sf = utils.softmax(output_image, theta = args.theta, axis = 2)
            sf_first = sf[:,:,0]
            sf_m = np.amax(sf, 2)

            output_image = helpers.reverse_one_hot(output_image)
            # this was generalized to accept any dataset
            class_names_list, label_values = helpers.get_label_info(os.path.join(args.dataset, "class_dict.csv"))

            out_vis_image = helpers.colour_code_segmentation(output_image, label_values)
            unprocessed_image = cv2.cvtColor(np.uint8(out_vis_image), cv2.COLOR_RGB2BGR)

            start4 = time.time()
            if (args.post_processing >= 2):
                processed_image = PostProcessing.ProcessImageMARS(cv2.cvtColor(np.uint8(out_vis_image), cv2.COLOR_RGB2BGR),args.removal, args.post_processing)
            elif (args.post_processing == 1):
                processed_image = PostProcessing.ProcessImageRail(cv2.cvtColor(np.uint8(out_vis_image), cv2.COLOR_RGB2BGR), args.post_processing, args.rail_sens)
            end4 = time.time()
            dur4 = dur4 + (end4-start4)

            unprocessed_image = cv2.cvtColor(np.uint8(out_vis_image), cv2.COLOR_RGB2BGR) #needs to be re-generated
            unprocessed_image_sf = cv2.cvtColor(np.uint8(out_vis_image), cv2.COLOR_BGR2GRAY)
            unprocessed_image_sf_o = unprocessed_image_sf * sf_m

            if resized_image_vis is None:
                print("WARNING: image not found (1)")
                continue
            if processed_image is None:
                print("WARNING: image not found (2)")
                continue
            if unprocessed_image is None:
                print("WARNING: image not found (3)")