<commit_before>#!/usr/bin/python3

# For all the feature matches and camera poses, estimate a mean
# reprojection error

import argparse
import pickle
import math
import numpy as np
import os

from lib import Groups
from lib import Optimizer
from lib import ProjectMgr

import match_culling as cull

parser = argparse.ArgumentParser(description='Keypoint projection.')
parser.add_argument('--project', required=True, help='project directory')
parser.add_argument('--area', default='area-00', help='sub area directory')
parser.add_argument('--group', type=int, default=0, help='group number')
parser.add_argument('--stddev', type=float, default=5, help='how many stddevs above the mean for auto discarding features')
parser.add_argument('--initial-pose', action='store_true', help='work on initial pose, not optimized pose')
parser.add_argument('--strong', action='store_true', help='remove entire match chain, not just the worst offending element.')
parser.add_argument('--interactive', action='store_true', help='interactively review reprojection errors from worst to best and select for deletion or keep.')

args = parser.parse_args()

proj = ProjectMgr.ProjectMgr(args.project)
proj.load_area_info(args.area)

area_dir = os.path.join(args.project, args.area)
source = 'matches_grouped'<commit_msg>Update paths a bit.<commit_after>#!/usr/bin/python3

# For all the feature matches and camera poses, estimate a mean
# reprojection error

import argparse
import pickle
import math
import numpy as np
import os

from lib import Groups
from lib import Optimizer
from lib import ProjectMgr

import match_culling as cull

parser = argparse.ArgumentParser(description='Keypoint projection.')
parser.add_argument('--project', required=True, help='project directory')
parser.add_argument('--area', default='area-00', help='sub area directory')
parser.add_argument('--group', type=int, default=0, help='group number')
parser.add_argument('--stddev', type=float, default=5, help='how many stddevs above the mean for auto discarding features')
parser.add_argument('--initial-pose', action='store_true', help='work on initial pose, not optimized pose')
parser.add_argument('--strong', action='store_true', help='remove entire match chain, not just the worst offending element.')
parser.add_argument('--interactive', action='store_true', help='interactively review reprojection errors from worst to best and select for deletion or keep.')

args = parser.parse_args()

proj = ProjectMgr.ProjectMgr(args.project)
proj.load_area_info(args.area)

area_dir = os.path.join(proj.analysis_dir, args.area)
source = 'matches_grouped'
{'fraction_non_alphanumeric': 0.11681348142474147, 'fraction_numerical': 0.0038299502106472617, 'mean_word_length': 6.484240687679083, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7456607', 'n_tokens_mistral': 761, 'n_tokens_neox': 739, 'n_words': 240}