Skip to content

Instantly share code, notes, and snippets.

@AruniRC
Last active March 10, 2018 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AruniRC/27b6259a45f5736bf63f1077d3fef2aa to your computer and use it in GitHub Desktop.
Save AruniRC/27b6259a45f5736bf63f1077d3fef2aa to your computer and use it in GitHub Desktop.
Ms-coco hard negs on gypsum

Multi-Class Detection with RetinaNet

Location

On gypsum:

/mnt/nfs/scratch1/arunirc/data/MS-COCO_cls-1_hard-neg

Data format

This shows how to parse the data:

import os.path as osp

ROOT_PATH= '/mnt/nfs/scratch1/arunirc/data/MS-COCO_cls-1_hard-neg'
CLS_ID = 1 # for Person category (fixed)

VID_ID = 101 # have to loop thru these

vid_folder_name = 'hardNeg_video-%d_cls-1_alpha=10_beta=100_validScore=0.60' % VID_ID

vid_frames_folder = osp.join(ROOT_PATH, 'output', vid_folder_name, '101_cls-1')


# annotations file (FDDB-style format) <-- should be quickest to use
txt_annot_file = osp.join(vid_frames_folder, 101_cls-1.txt)

# annotations file (JSON-style format ... *not* exactly MS-COCO)
json_annot_file = osp.join(vid_frames_folder, '101_cls-1_detections.json')

# read in a frame image
img_name = '101_cls-1/101_cls-1_103.jpg'
img_file = osp.join(vid_frames_folder, img_name)


Example for video101:

<DATA_ROOT>/output/hardNeg_video-101_cls-1_alpha=10_beta=100_validScore=0.60/
    |
    |-- vis_101_cls-1
    |
    |-- 101_cls-1
            |
            |-- 101_cls-1.txt
            |-- 101_cls-1_detections.json
            |-- 101_cls-1
                    |--101_cls-1_103.jpg
                    |--101_cls-1_1274.jpg
                    |--101_cls-1_1277.jpg
                    |--101_cls-1_3471.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment