Skip to content

This is a head detector tool adopted yolov3, for simple head detection in particular.

License

Notifications You must be signed in to change notification settings

fei-chang/Tool_head_detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Head Detector

This is a ready-to-use head detector tool adopted yolov3.

Info

The head detector is trained on dataset HollywoodHeads, to download the original dataset, click here.

The model weights can be found in the public NAS of VIPL at 10.29.0.195:/affect/D/Data/tool/model_weights/head_detector_best.pt, or can be downloaded here.

Usage

  1. Run by command line
python detect.py --model_weights path/to/model_weights.pt --input_img_folder path/to/imgs --txt_file path/to/save.txt
  1. Adopted for running folders containing subfolders
model_weights = 'path/to/model_weights.pt'
model, device, imgsz = load_model(model_weights)

base_folder = 'path/to/folders'

for folder in os.listdir(base_folder):
    input_img_folder = os.path.join(base_folder, folder)
    txt_file = 'path/to/save.txt'
    dataset = LoadImages(input_img_folder, img_size=imgsz, stride=model.stride, auto=model.pt and not model.jit)
    run_single_folder(model, device, dataset, txt_file)
    LOGGER.info('Done: %s'%input_img_folder)

Output File Format

  • ❌ No column header, entries are organized as ['frameID', 'label', 'xmin', 'ymin', 'xmax', 'ymax']
  • ❌ No index column
  • Entries of 'xmin', 'ymin', 'xmax', 'ymax' are all in 0-1 scale

About

This is a head detector tool adopted yolov3, for simple head detection in particular.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages