def getOcclusions(df):
    """
    Finds all occlusions in the annotated dataset, provided in a pandas dataframe

    Input:
        df: Pandas DataFrame contatining the dataset
    
    Output: 
        occlusion_id_cam: Dictinary containing a dict per fish ID. The dict per fish ID contains two keys (cam1/cam2), each holding a list of tuples, where each tuple is the start and endframe of an occlusion

    """
    
    unique_ids = df["id"].unique()
    id_map = {id_n:idx for idx, id_n in enumerate(unique_ids)}
    
    occlusion_id_cam = {id_n: {"cam1":[], "cam2": []} for id_n in id_map.keys()}

    for id_n in unique_ids:
        id_df = df[df["id"] == id_n]

        for cam in ["cam1", "cam2"]:

            id_df_cam = id_df.dropna(subset=["{}_occlusion".format(cam)])
            
            occlusions = id_df_cam["{}_occlusion".format(cam)].values
            frames = id_df_cam["{}_frame".format(cam)].unique()
            
            occ_tuples = []

            startFrame = -1
            for idx, frame in enumerate(frames[:-1]):
                
                if occlusions[idx] == 0:
                    continue
                
                if startFrame == -1:
                    startFrame = frame
                
                if occlusions[idx+1] == 0:
                    occ_tuples.append((startFrame, frame))
                    startFrame = -1

            occlusion_id_cam[id_n][cam] = occ_tuples

    return occlusion_id_cam