home/exp1000/acquire_and_label_images.py
def move_images_for_keeping(self, raw_keep, png_keep, applied_label):
        """Move the images to keep into to experiment's toGround folder."""

        # Remove the raw image file if it is not flagged to be kept.
        if not raw_keep:
            cmd_remove_raw_image = 'rm ' + BASE_PATH + '/*.ims_rgb'
            os.system(cmd_remove_raw_image)

        # Remove the png image file if it is not flagged to be kept.
        if not png_keep:
            cmd_remove_png_image = 'rm ' + BASE_PATH + '/*.png'
            os.system(cmd_remove_png_image)

        # Remove the jpeg image that was used as an input for the image classification program.
        cmd_remove_input_image = 'rm ' + BASE_PATH + '/*_input.jpeg'
        os.system(cmd_remove_input_image)

        # Create a label directory in the experiment's toGround directory.
        # This is where the images will be moved to and how we categorize images based on their predicted labels.
        toGround_label_dir = TOGROUND_PATH + '/' + applied_label
        if not os.path.exists(toGround_label_dir):
            os.makedirs(toGround_label_dir)
        
        # Create the command to move the images to the experiment's toGround's label folder
        cmd_move_images = 'mv *.png *.ims_rgb *_thumbnail.jpeg {G}/'.format(G=toGround_label_dir)

        # Move the image to the experiment's toGround folder.
        os.system(cmd_move_images)
Move the images to keep into to experiment's toGround folder.
Move the images to keep into to experiment's toGround folder.
Move the images to keep into to experiment ' s toGround folder .
def move_images_for_keeping(self, raw_keep, png_keep, applied_label):
        if not raw_keep:
            cmd_remove_raw_image = 'rm ' + BASE_PATH + '/*.ims_rgb'
            os.system(cmd_remove_raw_image)
        if not png_keep:
            cmd_remove_png_image = 'rm ' + BASE_PATH + '/*.png'
            os.system(cmd_remove_png_image)
        cmd_remove_input_image = 'rm ' + BASE_PATH + '/*_input.jpeg'
        os.system(cmd_remove_input_image)
        toGround_label_dir = TOGROUND_PATH + '/' + applied_label
        if not os.path.exists(toGround_label_dir):
            os.makedirs(toGround_label_dir)
        cmd_move_images = 'mv *.png *.ims_rgb *_thumbnail.jpeg {G}/'.format(G=toGround_label_dir)
        os.system(cmd_move_images)
def move_images_for_keeping ( self , raw_keep , png_keep , applied_label ) : if not raw_keep : cmd_remove_raw_image = 'rm ' + BASE_PATH + '/*.ims_rgb' os . system ( cmd_remove_raw_image ) if not png_keep : cmd_remove_png_image = 'rm ' + BASE_PATH + '/*.png' os . system ( cmd_remove_png_image ) cmd_remove_input_image = 'rm ' + BASE_PATH + '/*_input.jpeg' os . system ( cmd_remove_input_image ) toGround_label_dir = TOGROUND_PATH + '/' + applied_label if not os . path . exists ( toGround_label_dir ) : os . makedirs ( toGround_label_dir ) cmd_move_images = 'mv *.png *.ims_rgb *_thumbnail.jpeg {G}/' . format ( G = toGround_label_dir ) os . system ( cmd_move_images )
Move the images to keep into to experiment's toGround folder.
Move the images to keep into to experiment ' s toGround folder .
"""Move the images to keep into to experiment's toGround folder.""" # Remove the raw image file if it is not flagged to be kept. # Remove the png image file if it is not flagged to be kept. # Remove the jpeg image that was used as an input for the image classification program. # Create a label directory in the experiment's toGround directory. # This is where the images will be moved to and how we categorize images based on their predicted labels. # Create the command to move the images to the experiment's toGround's label folder # Move the image to the experiment's toGround folder.
self
raw_keep
png_keep
applied_label