current_process = psutil.Process()
print(current_process)

command = 'python ' + main_dir + '/people_detection/get_cpu_usage.py --pid ' + str(current_process.pid)

print(command)
os.system('nohup ' + command + ' &')

detect_over_frames(video_dict,
                   'yolo_darknet_608',
                   detect_single_frame,
                   output_video=output_video,
                   detect_on_tiles=detect_on_tiles,
                   debug=debug,
                   tiles_x=tiles_x,
                   tiles_y=tiles_y,
                   model=net,
                   ground_truth_boxes=ground_truth_boxes,
                   main_dir=main_dir,
                   only_moving_frames=only_moving_frames,
                   total_frames_all_videos=total_frames_all_videos,
                   moving_frames=moving_frames,
                   confidence=confidence,
                   threshold=threshold)

if detect_on_tiles == 'y':
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'yolo_darknet_608', str(tiles_x) + ',' + str(tiles_y))
else:
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'yolo_darknet_608', None)
current_process = psutil.Process()
print(current_process)

command = 'python ' + main_dir + '/people_detection/get_cpu_usage.py --pid ' + str(current_process.pid)

print(command)
os.system('nohup ' + command + ' &')

detect_over_frames(video_dict,
                   'faster_rcnn',
                   detect_single_frame,
                   output_video=output_video,
                   detect_on_tiles=detect_on_tiles,
                   debug=debug,
                   tiles_x=tiles_x,
                   tiles_y=tiles_y,
                   model=net,
                   ground_truth_boxes=ground_truth_boxes,
                   main_dir=main_dir,
                   only_moving_frames=only_moving_frames,
                   total_frames_all_videos=total_frames_all_videos,
                   moving_frames=moving_frames,
                   confidence=confidence,
                   threshold=threshold)

if detect_on_tiles == 'y':
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'faster_rcnn', str(tiles_x) + ',' + str(tiles_y))
else:
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'faster_rcnn', None)
Example #3
0
print(current_process)

command = 'python ' + main_dir + '/people_detection/get_cpu_usage.py --pid ' + str(
    current_process.pid)

print(command)
os.system('nohup ' + command + ' &')

detect_over_frames(video_dict,
                   'haar',
                   detect_single_frame,
                   output_video=output_video,
                   detect_on_tiles=detect_on_tiles,
                   debug=debug,
                   tiles_x=tiles_x,
                   tiles_y=tiles_y,
                   model=full_body_cascade,
                   ground_truth_boxes=ground_truth_boxes,
                   main_dir=main_dir,
                   scaleFactor=scaleFactor,
                   minNeighbors=minNeighbors,
                   only_moving_frames=only_moving_frames,
                   total_frames_all_videos=total_frames_all_videos,
                   moving_frames=moving_frames)

if detect_on_tiles == 'y':
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'haar',
                         str(tiles_x) + ',' + str(tiles_y))
else:
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'haar', None)
command = 'python ' + main_dir + '/people_detection/get_cpu_usage.py --pid ' + str(
    current_process.pid)

print(command)
os.system('nohup ' + command + ' &')

detect_over_frames(video_dict,
                   'hog_confidence',
                   detect_single_frame,
                   output_video=output_video,
                   detect_on_tiles=detect_on_tiles,
                   debug=debug,
                   tiles_x=tiles_x,
                   tiles_y=tiles_y,
                   model=hog,
                   ground_truth_boxes=ground_truth_boxes,
                   main_dir=main_dir,
                   only_moving_frames=only_moving_frames,
                   total_frames_all_videos=total_frames_all_videos,
                   moving_frames=moving_frames,
                   winStride=winStride,
                   padding=padding,
                   scale=scale)

if detect_on_tiles == 'y':
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'hog_confidence',
                         str(tiles_x) + ',' + str(tiles_y))
else:
    write_cpu_usage_file(main_dir, 'VIRAT_videos', 'hog_confidence', None)