if len(args.log_dir) > 0: create_dir(args.log_dir) sys.stdout.write("\n") # Process videos for video_name in video_list: if os.path.exists(video_name) and os.path.isfile(video_name): process_video_kwiver(video_name, args, is_image_list) else: print("Skipping " + video_name) # Build out final analytics if args.detection_plots: print("Generating data plots") aggregate_plots.fish_aggregate("database", args.species.split(","), float(args.threshold), float(args.frame_rate), int(args.smooth)) # Build index if args.build_index: print("\n\nBuilding searchable index\n") if args.ball_tree: database_tool.build_balltree_index(remove_quotes(args.install_dir)) else: database_tool.build_standard_index(remove_quotes(args.install_dir)) # Output complete message print("\n\nIngest complete\n")
create_dir( track_plot_dir, logging=False, recreate=True, prompt=False ) generate_detection_plots.detection_plot( args.output_directory, track_plot_dir, args.objects.split( "," ), float( args.plot_threshold ), float( args.frame_rate ), int( args.smooth ), ext = track_ext, top_category_only = True ) if args.detection_plots or args.track_plots: log_info( lb1 ) # Build searchable index if args.build_index: log_info( lb1 + "Building searchable index" + lb2 ) if len( args.log_directory ) > 0 and args.log_directory != "PIPE": index_log_file = args.output_directory + div + args.log_directory + div + "smqtk_indexer.txt" else: index_log_file = "" if args.ball_tree: print( "Warning: building a ball tree is deprecated" ) if not database_tool.build_standard_index( remove_quotes( args.install_dir ), log_file = index_log_file ): exit_with_error( "Unable to build index" ) # Output complete message if os.name == 'nt': log_info( lb1 + "Processing complete, close this window before launching any GUI." + lb2 ) else: log_info( lb1 + "Processing complete" + lb2 )
track_plot_dir, args.objects.split( "," ), float( args.plot_threshold ), float( args.frame_rate ), int( args.smooth ), ext = track_ext, top_category_only = True ) if args.detection_plots or args.track_plots: log_info( lb1 ) # Build searchable index if args.build_index: log_info( lb1 + "Building searchable index" + lb2 ) if len( args.log_directory ) > 0: index_log_file = args.output_directory + div + args.log_directory + div + "smqtk_indexer.txt" else: index_log_file = "" if args.ball_tree: if not database_tool.build_balltree_index( remove_quotes( args.install_dir ), log_file = index_log_file ): exit_with_error( "Unable to build index" ) else: if not database_tool.build_standard_index( remove_quotes( args.install_dir ), log_file = index_log_file ): exit_with_error( "Unable to build index" ) # Output complete message if os.name == 'nt': log_info( lb1 + "Processing complete, close this window before launching any GUI." + lb2 ) else: log_info( lb1 + "Processing complete" + lb2 )