SYMBOL INDEX (544 symbols across 111 files) FILE: moonlight/conversions/musicxml.py function score_to_musicxml (line 61) | def score_to_musicxml(score): function _get_attributes (line 121) | def _get_attributes(measure, position=-1): function _glyph_to_clef (line 143) | def _glyph_to_clef(glyph): function _glyph_to_note (line 160) | def _glyph_to_note(glyph): class MusicXMLScore (line 199) | class MusicXMLScore(object): method __init__ (line 206) | def __init__(self, omr_score): method get_measure (line 213) | def get_measure(self, part_ind, measure_ind): method to_string (line 224) | def to_string(self): function _create_part_list (line 233) | def _create_part_list(num_parts): function _get_part_id (line 242) | def _get_part_id(part_ind): FILE: moonlight/conversions/musicxml_test.py class MusicXMLTest (line 27) | class MusicXMLTest(absltest.TestCase): method testSmallScore (line 29) | def testSmallScore(self): FILE: moonlight/conversions/notesequence.py function score_to_notesequence (line 25) | def score_to_notesequence(score): function page_to_notesequence (line 38) | def page_to_notesequence(page): function _score_notes (line 42) | def _score_notes(score): FILE: moonlight/engine.py class OMREngine (line 47) | class OMREngine(object): method __init__ (line 70) | def __init__(self, glyph_classifier_fn=None): method run (line 100) | def run(self, input_pngs, output_notesequence=False): method process_image (line 121) | def process_image(self, image_arr, process_structure=True): method _get_page (line 137) | def _get_page(self, feed_dict=None, process_structure=True): function _nested_ndarrays_to_tensors (line 183) | def _nested_ndarrays_to_tensors(data): FILE: moonlight/evaluation/evaluator.py class Evaluator (line 33) | class Evaluator(object): method __init__ (line 35) | def __init__(self, **kwargs): method evaluate (line 38) | def evaluate(self, ground_truth): function main (line 46) | def main(argv): FILE: moonlight/evaluation/evaluator_endtoend_test.py class EvaluatorEndToEndTest (line 28) | class EvaluatorEndToEndTest(tf.test.TestCase): method testIncludedGroundTruth (line 30) | def testIncludedGroundTruth(self): FILE: moonlight/evaluation/musicxml.py function musicxml_similarity (line 60) | def musicxml_similarity(a, b): function _not_similar (line 124) | def _not_similar(): function _index (line 134) | def _index(num_staves, num_measures): class PartStaves (line 139) | class PartStaves(object): method __init__ (line 146) | def __init__(self, score): method get_measure (line 169) | def get_measure(self, part_staff, measure_num): method _build_attributes (line 191) | def _build_attributes(self, staff_num, orig_measure): method num_partstaves (line 240) | def num_partstaves(self): method num_measures (line 244) | def num_measures(self, part_staff): method _get_part (line 248) | def _get_part(self, part_num): method all_measure_counts (line 251) | def all_measure_counts(self): function _filter_for_staff (line 258) | def _filter_for_staff(staff_num, elem): function measure_similarity (line 296) | def measure_similarity(a, b): function measure_to_note_list (line 322) | def measure_to_note_list(measure): function pitch_to_int (line 332) | def pitch_to_int(pitch): function duration_to_fraction (line 365) | def duration_to_fraction(duration, measure): function _note_distance (line 373) | def _note_distance(n1, n2): function levenshtein (line 414) | def levenshtein(s1, s2, distance=_note_distance): function exact_match_distance (line 445) | def exact_match_distance(n1, n2): FILE: moonlight/evaluation/musicxml_test.py class MusicXMLTest (line 33) | class MusicXMLTest(absltest.TestCase): method testNotSimilar (line 35) | def testNotSimilar(self): method testEmptyMeasures (line 38) | def testEmptyMeasures(self): method testSomeMeasuresNotEqual (line 57) | def testSomeMeasuresNotEqual(self): method testIdentical (line 88) | def testIdentical(self): method testMoreChangesLessSimilar (line 97) | def testMoreChangesLessSimilar(self): method testLevenshteinDistance (line 121) | def testLevenshteinDistance(self): method testOptionalAlter (line 135) | def testOptionalAlter(self): method testPitchToInt (line 149) | def testPitchToInt(self): method testNoteDistance_samePitch_sameDuration_isEqual (line 167) | def testNoteDistance_samePitch_sameDuration_isEqual(self): method testNoteDistance_samePitch_differentDuration_fuzzyDuration (line 170) | def testNoteDistance_samePitch_differentDuration_fuzzyDuration(self): method testNoteDistance_differentPitch_sameDuration_fuzzyPitch (line 175) | def testNoteDistance_differentPitch_sameDuration_fuzzyPitch(self): method testNoteDistance_differentPitchAndDuration_fuzzyDistance (line 180) | def testNoteDistance_differentPitchAndDuration_fuzzyDistance(self): class PartStavesTest (line 187) | class PartStavesTest(absltest.TestCase): method testDivisions_golden (line 189) | def testDivisions_golden(self): method testAttributes_perStaff (line 204) | def testAttributes_perStaff(self): FILE: moonlight/glyphs/base.py class GlyphsTensorColumns (line 28) | class GlyphsTensorColumns(enum.IntEnum): class BaseGlyphClassifier (line 41) | class BaseGlyphClassifier(object): method __init__ (line 45) | def __init__(self): method get_detected_glyphs (line 57) | def get_detected_glyphs(self): method glyph_predictions_to_page (line 70) | def glyph_predictions_to_page(self, predictions): FILE: moonlight/glyphs/convolutional.py class Convolutional1DGlyphClassifier (line 36) | class Convolutional1DGlyphClassifier(base.BaseGlyphClassifier): method __init__ (line 39) | def __init__(self, run_min_length=DEFAULT_RUN_MIN_LENGTH): method staffline_predictions (line 51) | def staffline_predictions(self): method _build_detected_glyphs (line 62) | def _build_detected_glyphs(self, predictions_arr): method _create_glyph_arr (line 101) | def _create_glyph_arr(self, staff_index, y_position, x, type_value): method get_detected_glyphs (line 109) | def get_detected_glyphs(self): FILE: moonlight/glyphs/convolutional_test.py class ConvolutionalTest (line 35) | class ConvolutionalTest(tf.test.TestCase): method testGetGlyphsPage (line 37) | def testGetGlyphsPage(self): method testNoGlyphs_dummyClassifier (line 62) | def testNoGlyphs_dummyClassifier(self): FILE: moonlight/glyphs/corpus.py function get_patch_shape (line 27) | def get_patch_shape(corpus_file): function parse_corpus (line 48) | def parse_corpus(corpus_file, height, width): FILE: moonlight/glyphs/geometry.py function glyph_y (line 21) | def glyph_y(staff, glyph): FILE: moonlight/glyphs/glyph_types.py function is_notehead (line 27) | def is_notehead(glyph): function is_stemmed_notehead (line 34) | def is_stemmed_notehead(glyph): function is_beamed_notehead (line 40) | def is_beamed_notehead(glyph): function is_dotted_notehead (line 44) | def is_dotted_notehead(glyph): function is_clef (line 49) | def is_clef(glyph): function is_rest (line 55) | def is_rest(glyph): FILE: moonlight/glyphs/knn.py class NearestNeighborGlyphClassifier (line 34) | class NearestNeighborGlyphClassifier( method __init__ (line 38) | def __init__(self, corpus_file, staffline_extractor, **kwargs): method staffline_predictions (line 116) | def staffline_predictions(self): function _squared_euclidean_distance_matrix (line 120) | def _squared_euclidean_distance_matrix(a, b): FILE: moonlight/glyphs/knn_model.py function knn_kmeans_model (line 33) | def knn_kmeans_model(centroids, labels, patches=None): function _to_uint8 (line 103) | def _to_uint8(values): function _to_float (line 107) | def _to_float(values_t): function export_knn_model (line 111) | def export_knn_model(centroids, labels, export_path): function _squared_euclidean_distance_matrix (line 142) | def _squared_euclidean_distance_matrix(a, b): FILE: moonlight/glyphs/knn_test.py class KnnTest (line 36) | class KnnTest(tf.test.TestCase): method testFakeStaffline (line 38) | def testFakeStaffline(self): FILE: moonlight/glyphs/neural.py class NeuralNetworkGlyphClassifier (line 33) | class NeuralNetworkGlyphClassifier(object): method __init__ (line 36) | def __init__(self, method get_autoencoder_initializers (line 98) | def get_autoencoder_initializers(self): method get_classifier_initializers (line 106) | def get_classifier_initializers(self): method semi_supervised_model (line 115) | def semi_supervised_model(batch_size, class BaseLayer (line 170) | class BaseLayer(object): method __init__ (line 172) | def __init__(self, filter_size, n_in, n_out, name): method get (line 178) | def get(self): class InputConvLayer (line 188) | class InputConvLayer(BaseLayer): method __init__ (line 191) | def __init__(self, image, n_hidden, activation=tf.nn.sigmoid, name="in... class HiddenLayer (line 215) | class HiddenLayer(BaseLayer): method __init__ (line 218) | def __init__(self, class ReconstructionLayer (line 242) | class ReconstructionLayer(BaseLayer): method __init__ (line 245) | def __init__(self, class PredictionLayer (line 271) | class PredictionLayer(BaseLayer): method __init__ (line 274) | def __init__(self, layer_in, name="prediction"): FILE: moonlight/glyphs/neural_test.py class NeuralNetworkGlyphClassifierTest (line 30) | class NeuralNetworkGlyphClassifierTest(tf.test.TestCase): method testSemiSupervisedClassifier (line 32) | def testSemiSupervisedClassifier(self): FILE: moonlight/glyphs/note_dots.py class NoteDots (line 41) | class NoteDots(object): method __init__ (line 43) | def __init__(self, structure): method apply (line 46) | def apply(self, page): function _is_in_range (line 74) | def _is_in_range(min_value, values, max_value): function _extract_dots (line 78) | def _extract_dots(structure): FILE: moonlight/glyphs/repeated.py class FixRepeatedRests (line 23) | class FixRepeatedRests(object): method apply (line 25) | def apply(self, page): FILE: moonlight/glyphs/saved_classifier.py class SavedConvolutional1DClassifier (line 47) | class SavedConvolutional1DClassifier( method __init__ (line 55) | def __init__(self, method staffline_predictions (line 167) | def staffline_predictions(self): FILE: moonlight/glyphs/saved_classifier_fn.py function build_classifier_fn (line 39) | def build_classifier_fn(saved_model=None): FILE: moonlight/glyphs/saved_classifier_test.py class SavedClassifierTest (line 33) | class SavedClassifierTest(tf.test.TestCase): method testSaveAndLoadDummyClassifier (line 35) | def testSaveAndLoadDummyClassifier(self): FILE: moonlight/glyphs/testing.py class DummyGlyphClassifier (line 54) | class DummyGlyphClassifier(convolutional.Convolutional1DGlyphClassifier): method __init__ (line 60) | def __init__(self, predictions): method staffline_predictions (line 65) | def staffline_predictions(self): FILE: moonlight/image.py function decode_music_score_png (line 27) | def decode_music_score_png(contents): FILE: moonlight/models/base/batches.py function get_batched_tensor (line 35) | def get_batched_tensor(dataset): FILE: moonlight/models/base/batches_test.py class BatchesTest (line 26) | class BatchesTest(tf.test.TestCase): method testBatching (line 28) | def testBatching(self): FILE: moonlight/models/base/glyph_patches.py function read_patch_dimensions (line 88) | def read_patch_dimensions(): function input_fn (line 109) | def input_fn(input_patches): function _augment (line 153) | def _augment(patch): function _augment_shift (line 158) | def _augment_shift(patch): function _shift_left (line 177) | def _shift_left(patch): function _shift_right (line 182) | def _shift_right(patch): function _augment_rotation (line 187) | def _augment_rotation(patch): function serving_fn (line 199) | def serving_fn(): function create_patch_feature_column (line 221) | def create_patch_feature_column(): function multiclass_binary_metric (line 226) | def multiclass_binary_metric(class_number, binary_metric, labels, predic... function metrics_fn (line 235) | def metrics_fn(features, labels, predictions): function train_and_evaluate (line 268) | def train_and_evaluate(estimator): FILE: moonlight/models/base/glyph_patches_test.py class GlyphPatchesTest (line 29) | class GlyphPatchesTest(tf.test.TestCase): method testInputFn (line 31) | def testInputFn(self): method testShiftLeft (line 60) | def testShiftLeft(self): method testShiftRight (line 68) | def testShiftRight(self): method testMulticlassBinaryMetric (line 76) | def testMulticlassBinaryMetric(self): FILE: moonlight/models/base/hyperparameters.py function estimator_with_saved_params (line 30) | def estimator_with_saved_params(estimator, params): FILE: moonlight/models/base/hyperparameters_test.py class HyperparametersTest (line 23) | class HyperparametersTest(tf.test.TestCase): method testSimpleModel (line 25) | def testSimpleModel(self): FILE: moonlight/models/base/label_weights.py function parse_label_weights_array (line 48) | def parse_label_weights_array(weights_str=None): function weights_from_labels (line 79) | def weights_from_labels(labels, weights_str=None): FILE: moonlight/models/base/label_weights_test.py class LabelWeightsTest (line 25) | class LabelWeightsTest(tf.test.TestCase): method testWeightsFromLabels (line 27) | def testWeightsFromLabels(self): FILE: moonlight/models/glyphs_dnn/model.py function get_flag_params (line 42) | def get_flag_params(): function create_estimator (line 83) | def create_estimator(params=None): FILE: moonlight/models/glyphs_dnn/train.py function main (line 29) | def main(_): FILE: moonlight/omr.py function run (line 52) | def run(input_pngs, glyphs_saved_model=None, output_notesequence=False): function main (line 70) | def main(argv): FILE: moonlight/omr_endtoend_test.py class OmrEndToEndTest (line 34) | class OmrEndToEndTest(absltest.TestCase): method setUp (line 36) | def setUp(self): method testNoteSequence (line 39) | def testNoteSequence(self): method testBeams_sixteenthNotes (line 53) | def testBeams_sixteenthNotes(self): method testIMSLP00747_000_structure_barlines (line 74) | def testIMSLP00747_000_structure_barlines(self): method testMusicXML (line 102) | def testMusicXML(self): method testProcessImage (line 113) | def testProcessImage(self): FILE: moonlight/omr_regression_test.py class OmrRegressionTest (line 40) | class OmrRegressionTest(absltest.TestCase): method testIMSLP01963_106_multipleStaffSizes (line 42) | def testIMSLP01963_106_multipleStaffSizes(self): method testIMSLP00823_000_structure (line 53) | def testIMSLP00823_000_structure(self): method testIMSLP00823_008_mergeStandardAndBeginRepeatBars (line 76) | def testIMSLP00823_008_mergeStandardAndBeginRepeatBars(self): method testIMSLP39661_keySignature_CSharpMinor (line 104) | def testIMSLP39661_keySignature_CSharpMinor(self): method testIMSLP00023_015_doubleNoteDots (line 117) | def testIMSLP00023_015_doubleNoteDots(self): function _get_imslp_path (line 178) | def _get_imslp_path(filename): FILE: moonlight/page_processors.py function create_processors (line 38) | def create_processors(structure, staffline_extractor=None): function process (line 63) | def process(page, structure, staffline_extractor=None): class CenteredRests (line 70) | class CenteredRests(object): method apply (line 72) | def apply(self, page): FILE: moonlight/pipeline/pipeline_flags.py function create_pipeline (line 33) | def create_pipeline(**kwargs): FILE: moonlight/score/elements/clef.py class Clef (line 30) | class Clef(object): method y_position_to_midi (line 39) | def y_position_to_midi(self, y_position): class TrebleClef (line 43) | class TrebleClef(Clef): method __init__ (line 46) | def __init__(self): class BassClef (line 52) | class BassClef(Clef): method __init__ (line 55) | def __init__(self): class _ScalePitch (line 61) | class _ScalePitch(object): method __init__ (line 72) | def __init__(self, scale, midi): method midi (line 78) | def midi(self): method pitch_index (line 84) | def pitch_index(self): method __add__ (line 88) | def __add__(self, interval): FILE: moonlight/score/elements/clef_test.py class ClefTest (line 26) | class ClefTest(absltest.TestCase): method testTrebleClef (line 28) | def testTrebleClef(self): method testBassClef (line 44) | def testBassClef(self): FILE: moonlight/score/elements/key_signature.py class _BaseAccidentals (line 37) | class _BaseAccidentals(object): method __init__ (line 40) | def __init__(self, clef, accidentals=None): method _normalize_position (line 44) | def _normalize_position(self, position): method get_accidental_for_position (line 58) | def get_accidental_for_position(self, position): class Accidentals (line 62) | class Accidentals(_BaseAccidentals): method __init__ (line 65) | def __init__(self, clef): method put (line 68) | def put(self, position, accidental): class KeySignature (line 72) | class KeySignature(_BaseAccidentals): method _normalize_position (line 80) | def _normalize_position(self, position): method try_put (line 95) | def try_put(self, position, accidental): method _can_put (line 111) | def _can_put(self, position, accidental): method get_next_accidental (line 118) | def get_next_accidental(self): method get_type (line 162) | def get_type(self): method __len__ (line 167) | def __len__(self): function _key_sig_pitch_classes (line 172) | def _key_sig_pitch_classes(note_name, ascending_fifths): FILE: moonlight/score/elements/key_signature_test.py class KeySignatureTest (line 27) | class KeySignatureTest(absltest.TestCase): method testEmpty_noNextAccidental (line 29) | def testEmpty_noNextAccidental(self): method testGMajor (line 34) | def testGMajor(self): method testGMajor_bassClef (line 40) | def testGMajor_bassClef(self): method testBMajor (line 46) | def testBMajor(self): method testEFlatMajor (line 54) | def testEFlatMajor(self): method testEFlatMajor_bassClef (line 62) | def testEFlatMajor_bassClef(self): method testCFlatMajor_noMoreAccidentals (line 70) | def testCFlatMajor_noMoreAccidentals(self): FILE: moonlight/score/measures.py class Measures (line 30) | class Measures(object): method __init__ (line 33) | def __init__(self, staff_system): method size (line 36) | def size(self): method get_measure (line 44) | def get_measure(self, glyph): function _get_bar_intervals (line 59) | def _get_bar_intervals(staff_system): FILE: moonlight/score/reader.py class ScoreReader (line 39) | class ScoreReader(object): method __init__ (line 50) | def __init__(self): method __call__ (line 54) | def __call__(self, score): method read_page (line 70) | def read_page(self, page): method read_system (line 85) | def read_system(self, system): method _read_glyph (line 95) | def _read_glyph(self, glyph, staff_state): method _read_clef (line 103) | def _read_clef(self, staff_state, glyph): method _read_note (line 125) | def _read_note(self, staff_state, glyph): method _read_rest (line 129) | def _read_rest(self, staff_state, glyph): method _read_accidental (line 132) | def _read_accidental(self, staff_state, glyph): method _no_op_handler (line 135) | def _no_op_handler(self, glyph): FILE: moonlight/score/reader_test.py class ReaderTest (line 34) | class ReaderTest(absltest.TestCase): method testTreble_simple (line 36) | def testTreble_simple(self): method testBass_simple (line 56) | def testBass_simple(self): method testTreble_accidentals (line 76) | def testTreble_accidentals(self): method testChords (line 128) | def testChords(self): method testBeams (line 172) | def testBeams(self): method testAllNoteheadTypes (line 221) | def testAllNoteheadTypes(self): method testStaffSystems (line 245) | def testStaffSystems(self): method testMeasures (line 323) | def testMeasures(self): method testKeySignatures (line 395) | def testKeySignatures(self): function _bar (line 452) | def _bar(x): FILE: moonlight/score/state/__init__.py class ScoreState (line 24) | class ScoreState(object): method __init__ (line 37) | def __init__(self): method num_staves (line 40) | def num_staves(self, num_staves): method add_measure (line 58) | def add_measure(self): FILE: moonlight/score/state/measure.py class _KeySignatureState (line 42) | class _KeySignatureState(enum.Enum): class MeasureState (line 48) | class MeasureState(object): method __init__ (line 61) | def __init__(self, start_time, clef, key_signature=None): method new_measure (line 84) | def new_measure(self, start_time): method set_accidental (line 98) | def set_accidental(self, y_position, accidental): method get_note (line 111) | def get_note(self, glyph): method set_clef (line 155) | def set_clef(self, clef): method on_read_notehead (line 163) | def on_read_notehead(self): function _get_note_duration (line 173) | def _get_note_duration(note): FILE: moonlight/score/state/staff.py class StaffState (line 24) | class StaffState(object): method __init__ (line 32) | def __init__(self, start_time, clef=None): method add_measure (line 36) | def add_measure(self, start_time): method new_staff (line 46) | def new_staff(self, start_time): method get_key_signature (line 59) | def get_key_signature(self): method get_time (line 63) | def get_time(self): method set_time (line 67) | def set_time(self, time): method set_clef (line 75) | def set_clef(self, clef): FILE: moonlight/score_processors.py function create_processors (line 28) | def create_processors(): function process (line 32) | def process(score): FILE: moonlight/staves/base.py class BaseStaffDetector (line 28) | class BaseStaffDetector(object): method __init__ (line 38) | def __init__(self, image=None): method data (line 50) | def data(self): method staves_interpolated_y (line 63) | def staves_interpolated_y(self): method compute (line 162) | def compute(self, session=None, feed_dict=None): class ComputedStaves (line 177) | class ComputedStaves(BaseStaffDetector): method __init__ (line 184) | def __init__(self, staves, staffline_distance, staffline_thickness, method staves_interpolated_y (line 195) | def staves_interpolated_y(self): method compute (line 198) | def compute(self, session=None, feed_dict=None): FILE: moonlight/staves/detectors_test.py class StaffDetectorsTest (line 31) | class StaffDetectorsTest(tf.test.TestCase): method setUp (line 33) | def setUp(self): method tearDown (line 40) | def tearDown(self): method test_single_staff (line 44) | def test_single_staff(self): method test_corpus_image (line 70) | def test_corpus_image(self): method test_staves_interpolated_y (line 86) | def test_staves_interpolated_y(self): method test_staves_interpolated_y_empty (line 103) | def test_staves_interpolated_y_empty(self): method test_staves_interpolated_y_staves_dont_extend_to_edge (line 109) | def test_staves_interpolated_y_staves_dont_extend_to_edge(self): method generate_staff_detectors (line 119) | def generate_staff_detectors(self, image): FILE: moonlight/staves/filter.py function staff_center_filter (line 40) | def staff_center_filter(image, function _shift_y (line 89) | def _shift_y(image, y_offset): function _get_staff_ys (line 122) | def _get_staff_ys(is_staff, staffline_thickness): FILE: moonlight/staves/hough.py class FilteredHoughStaffDetector (line 45) | class FilteredHoughStaffDetector(base.BaseStaffDetector): method __init__ (line 53) | def __init__(self, method staves (line 75) | def staves(self): method staffline_distance (line 80) | def staffline_distance(self): method staffline_thickness (line 85) | def staffline_thickness(self): method _data (line 90) | def _data(self): class _SingleSizeFilteredHoughStaffDetector (line 144) | class _SingleSizeFilteredHoughStaffDetector(object): method __init__ (line 155) | def __init__(self, image, staffline_distance, staffline_thickness, method staves (line 178) | def staves(self): function _argsort (line 215) | def _argsort(values): FILE: moonlight/staves/projection.py class ProjectionStaffDetector (line 28) | class ProjectionStaffDetector(base.BaseStaffDetector): method __init__ (line 37) | def __init__(self, image=None): method staves (line 52) | def staves(self): method staffline_distance (line 57) | def staffline_distance(self): method staffline_thickness (line 62) | def staffline_thickness(self): function _projection_to_staves (line 66) | def _projection_to_staves(projection, width): FILE: moonlight/staves/removal.py class StaffRemover (line 30) | class StaffRemover(object): method __init__ (line 38) | def __init__(self, staff_detector, threshold=127): method remove_staves (line 44) | def remove_staves(self): FILE: moonlight/staves/removal_test.py class RemovalTest (line 31) | class RemovalTest(tf.test.TestCase): method test_corpus_image (line 33) | def test_corpus_image(self): FILE: moonlight/staves/staff_processor.py class StaffProcessor (line 27) | class StaffProcessor(object): method __init__ (line 29) | def __init__(self, structure, staffline_extractor): method apply (line 33) | def apply(self, page): FILE: moonlight/staves/staff_processor_test.py class StaffProcessorTest (line 33) | class StaffProcessorTest(absltest.TestCase): method testGetPage_x_scale (line 35) | def testGetPage_x_scale(self): FILE: moonlight/staves/staffline_distance.py function _single_peak (line 70) | def _single_peak(values, relative_cutoff, minval, invalidate_distance): function _estimate_staffline_distance (line 104) | def _estimate_staffline_distance(columns, lengths): function _estimate_staffline_thickness (line 168) | def _estimate_staffline_thickness(columns, values, lengths, staffline_di... function estimate_staffline_distance_and_thickness (line 217) | def estimate_staffline_distance_and_thickness(image, threshold=127): FILE: moonlight/staves/staffline_distance_test.py class StafflineDistanceTest (line 28) | class StafflineDistanceTest(tf.test.TestCase): method testCorpusImage (line 30) | def testCorpusImage(self): method testZeros (line 43) | def testZeros(self): method testSpeckles (line 53) | def testSpeckles(self): FILE: moonlight/staves/staffline_extractor.py class Axes (line 36) | class Axes(enum.IntEnum): function get_staffline (line 44) | def get_staffline(y_position, extracted_staff_arr): function y_position_to_index (line 65) | def y_position_to_index(y_position, num_stafflines): class StafflineExtractor (line 73) | class StafflineExtractor(object): method __init__ (line 89) | def __init__(self, method extract_staves (line 119) | def extract_staves(self): method _extract_staffline (line 166) | def _extract_staffline(self, staff_y, staffline_distance, staffline_num): method _get_resized_width (line 217) | def _get_resized_width(self, staffline_distance): method _get_staffline_window_size (line 224) | def _get_staffline_window_size(self, staffline_distance): class StafflinePatchExtractor (line 231) | class StafflinePatchExtractor(object): method __init__ (line 241) | def __init__(self, method extract_staff_strip (line 285) | def extract_staff_strip(self, filename, staff_index, y_position): method extract_staff_patch (line 310) | def extract_staff_patch(self, filename, staff_index, y_position, image... method page_patch_iterator (line 336) | def page_patch_iterator(self, filename): method make_patch_id (line 378) | def make_patch_id(filename, staff_index, y_position, image_x): FILE: moonlight/staves/staffline_extractor_test.py class StafflineExtractorTest (line 29) | class StafflineExtractorTest(tf.test.TestCase): method setUp (line 31) | def setUp(self): method testExtractStaff (line 50) | def testExtractStaff(self): method testFloatMultiple (line 77) | def testFloatMultiple(self): class StafflinePatchExtractorTest (line 96) | class StafflinePatchExtractorTest(tf.test.TestCase): method testCompareIteratorWithSinglePatch (line 98) | def testCompareIteratorWithSinglePatch(self): FILE: moonlight/staves/testing.py class FakeStaves (line 23) | class FakeStaves(base.BaseStaffDetector): method __init__ (line 36) | def __init__(self, method staves (line 47) | def staves(self): method staffline_distance (line 51) | def staffline_distance(self): method staffline_thickness (line 55) | def staffline_thickness(self): FILE: moonlight/structure/__init__.py function create_structure (line 35) | def create_structure(image, class Structure (line 77) | class Structure(object): method __init__ (line 80) | def __init__(self, method compute (line 94) | def compute(self, session=None, image=None): method is_computed (line 152) | def is_computed(self): method data (line 160) | def data(self): FILE: moonlight/structure/barlines.py class Barlines (line 27) | class Barlines(object): method __init__ (line 30) | def __init__(self, structure, close_barline_threshold=None): method apply (line 43) | def apply(self, page): method _assign_barlines (line 63) | def _assign_barlines(self, systems): method _get_blacklist_x (line 114) | def _get_blacklist_x(self, system): function assign_barlines_to_staves (line 147) | def assign_barlines_to_staves(barline_x, barline_y0, barline_y1, FILE: moonlight/structure/barlines_test.py class BarlinesTest (line 34) | class BarlinesTest(absltest.TestCase): method testDummy (line 36) | def testDummy(self): FILE: moonlight/structure/beam_processor.py class BeamProcessor (line 38) | class BeamProcessor(object): method __init__ (line 40) | def __init__(self, structure): method apply (line 45) | def apply(self, page): function _get_overlapping_beams (line 83) | def _get_overlapping_beams(stem, beams): function _maybe_duplicate_beams (line 105) | def _maybe_duplicate_beams(beams, staffline_distance): function _do_intervals_overlap (line 135) | def _do_intervals_overlap(intervals_a, intervals_b): FILE: moonlight/structure/beams.py class Beams (line 42) | class Beams(object): method __init__ (line 45) | def __init__(self, staff_remover, threshold=127): class ComputedBeams (line 64) | class ComputedBeams(object): method __init__ (line 67) | def __init__(self, beams): FILE: moonlight/structure/components.py class ConnectedComponentsColumns (line 29) | class ConnectedComponentsColumns(enum.IntEnum): function from_staff_remover (line 39) | def from_staff_remover(staff_remover, threshold=127): class ConnectedComponents (line 45) | class ConnectedComponents(object): method __init__ (line 48) | def __init__(self, components): class ComputedComponents (line 54) | class ComputedComponents(object): method __init__ (line 57) | def __init__(self, components): function get_component_bounds (line 62) | def get_component_bounds(image): function _unsorted_segment_min (line 93) | def _unsorted_segment_min(data, segment_ids, num_segments): FILE: moonlight/structure/components_test.py class ComponentsTest (line 25) | class ComponentsTest(tf.test.TestCase): method testComponents (line 27) | def testComponents(self): FILE: moonlight/structure/section_barlines.py class SectionBarlines (line 37) | class SectionBarlines(object): method __init__ (line 40) | def __init__(self, structure): method apply (line 44) | def apply(self, page): method _section_min_width (line 127) | def _section_min_width(self): method _section_max_width (line 130) | def _section_max_width(self, staff_index): class MergeStandardAndBeginRepeatBars (line 134) | class MergeStandardAndBeginRepeatBars(object): method __init__ (line 150) | def __init__(self, structure): method apply (line 153) | def apply(self, page): FILE: moonlight/structure/stems.py class Stems (line 47) | class Stems(object): method __init__ (line 50) | def __init__(self, structure): method apply (line 66) | def apply(self, page): function _get_stem_candidates (line 117) | def _get_stem_candidates(staffline_distance, verticals): FILE: moonlight/structure/stems_test.py class StemsTest (line 34) | class StemsTest(absltest.TestCase): method testDummy (line 36) | def testDummy(self): FILE: moonlight/structure/structure_test.py class StructureTest (line 28) | class StructureTest(tf.test.TestCase): method testCompute (line 30) | def testCompute(self): FILE: moonlight/structure/verticals.py class ColumnBasedVerticals (line 40) | class ColumnBasedVerticals(object): method __init__ (line 58) | def __init__( method lines (line 84) | def lines(self): method _verticals_in_column (line 100) | def _verticals_in_column(self, max_gap, column): method data (line 129) | def data(self): function _horizontal_filter (line 138) | def _horizontal_filter(image, staffline_thickness): class ComputedVerticals (line 163) | class ComputedVerticals(object): method __init__ (line 170) | def __init__(self, lines): method data (line 174) | def data(self): FILE: moonlight/structure/verticals_test.py class ColumnBasedVerticalsTest (line 27) | class ColumnBasedVerticalsTest(tf.test.TestCase): method testVerticalLines_singleColumn (line 29) | def testVerticalLines_singleColumn(self): FILE: moonlight/tools/export_kmeans_centroids.py function run (line 27) | def run(tfrecords_filename, export_dir): function main (line 35) | def main(argv): FILE: moonlight/tools/export_kmeans_centroids_test.py class ExportKmeansCentroidsTest (line 31) | class ExportKmeansCentroidsTest(tf.test.TestCase): method testEndToEnd (line 33) | def testEndToEnd(self): FILE: moonlight/tools/gen_structure_test_case.py function main (line 32) | def main(argv): function _sanitized_basename (line 54) | def _sanitized_basename(filename): FILE: moonlight/training/clustering/kmeans_labeler.py function load_clusters (line 43) | def load_clusters(input_path): function main (line 70) | def main(_): FILE: moonlight/training/clustering/kmeans_labeler_request_handler.py class LabelerHTTPRequestHandler (line 40) | class LabelerHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): method __init__ (line 49) | def __init__(self, clusters, output_path, *args): method do_GET (line 54) | def do_GET(self): method do_POST (line 64) | def do_POST(self): function create_page (line 81) | def create_page(clusters, template): function _process_cluster (line 105) | def _process_cluster(cluster): function create_highlighted_image (line 129) | def create_highlighted_image(cluster, enlarge_ratio=10): function create_examples (line 169) | def create_examples(clusters, labels): FILE: moonlight/training/clustering/kmeans_labeler_request_handler_test.py class KmeansLabelerRequestHandlerTest (line 33) | class KmeansLabelerRequestHandlerTest(absltest.TestCase): method testCreatePage (line 35) | def testCreatePage(self): method testCreateExamples (line 45) | def testCreateExamples(self): FILE: moonlight/training/clustering/staffline_patches_dofn.py function _filter_patch (line 37) | def _filter_patch(patch, min_num_dark_pixels=10): class StafflinePatchesDoFn (line 42) | class StafflinePatchesDoFn(beam.DoFn): method __init__ (line 45) | def __init__(self, patch_height, patch_width, num_stafflines, timeout_ms, method start_bundle (line 65) | def start_bundle(self): method process (line 72) | def process(self, png_path): method finish_bundle (line 110) | def finish_bundle(self): FILE: moonlight/training/clustering/staffline_patches_dofn_test.py class StafflinePatchesDoFnTest (line 38) | class StafflinePatchesDoFnTest(absltest.TestCase): method testPipeline_corpusImage (line 40) | def testPipeline_corpusImage(self): FILE: moonlight/training/clustering/staffline_patches_kmeans_pipeline.py function train_kmeans (line 63) | def train_kmeans(patch_file_pattern, function main (line 147) | def main(_): FILE: moonlight/training/clustering/staffline_patches_kmeans_pipeline_test.py class StafflinePatchesKmeansPipelineTest (line 38) | class StafflinePatchesKmeansPipelineTest(absltest.TestCase): method testKmeans (line 40) | def testKmeans(self): FILE: moonlight/training/generation/generation.py function _normalize_path (line 62) | def _normalize_path(filename): class PageGenerationDoFn (line 83) | class PageGenerationDoFn(beam.DoFn): method __init__ (line 90) | def __init__(self, num_pages_per_batch, vexflow_generator_command, method process (line 96) | def process(self, batch_num): method get_pages_for_batch (line 104) | def get_pages_for_batch(self, batch_num, num_pages_per_batch): method get_pages (line 124) | def get_pages(self, seeds): method _svg_to_png (line 135) | def _svg_to_png(self, svg): class PatchExampleDoFn (line 150) | class PatchExampleDoFn(beam.DoFn): method __init__ (line 153) | def __init__(self, method start_bundle (line 164) | def start_bundle(self): method process (line 172) | def process(self, item): method _create_example (line 253) | def _create_example(self, staffline, x, label): FILE: moonlight/training/generation/generation_test.py class GenerationTest (line 30) | class GenerationTest(tf.test.TestCase): method testDoFn (line 32) | def testDoFn(self): FILE: moonlight/training/generation/image_noise.py function placeholder_image (line 29) | def placeholder_image(): function random_rotation (line 33) | def random_rotation(image, angle=math.pi / 180): function gaussian_noise (line 40) | def gaussian_noise(image, stddev=5): FILE: moonlight/training/generation/vexflow_generator.js function checkNotNull (line 40) | function checkNotNull(value, opt_message) { function vexflowLineToOMR (line 56) | function vexflowLineToOMR(line) { function absoluteYToOMR (line 67) | function absoluteYToOMR(stave, y) { function resetPageState (line 75) | function resetPageState() { constant CLEF_LINE_FOR_OMR (line 83) | const CLEF_LINE_FOR_OMR = { constant ACCIDENTAL_TYPES (line 138) | const ACCIDENTAL_TYPES = { function discreteSample (line 170) | function discreteSample(random, probs) { constant PROB_LEDGER_NOTE (line 183) | const PROB_LEDGER_NOTE = 0.1; constant PROB_MODIFIERS (line 184) | const PROB_MODIFIERS = { class Clef (line 192) | class Clef { method genNote (line 198) | genNote(random) { method baseNotes_ (line 210) | baseNotes_() { class TrebleClef (line 219) | class TrebleClef extends Clef { method name (line 221) | name() { class BassClef (line 227) | class BassClef extends Clef { method name (line 229) | name() { constant CLEFS (line 235) | const CLEFS = [new TrebleClef(), new BassClef()]; FILE: moonlight/training/generation/vexflow_generator_pipeline.py function main (line 58) | def main(_): FILE: moonlight/util/functional_ops.py function flat_map_fn (line 23) | def flat_map_fn(fn, elems, dtype=None): FILE: moonlight/util/functional_ops_test.py class FunctionalOpsTest (line 25) | class FunctionalOpsTest(tf.test.TestCase): method testFlatMap (line 27) | def testFlatMap(self): FILE: moonlight/util/memoize.py class MemoizedFunction (line 21) | class MemoizedFunction(object): method __init__ (line 31) | def __init__(self, function): method __call__ (line 35) | def __call__(self, *args): FILE: moonlight/util/more_iter_tools.py function iter_sample (line 10) | def iter_sample(iterator, count, rand=None): FILE: moonlight/util/more_iter_tools_test.py class MoreIterToolsTest (line 15) | class MoreIterToolsTest(absltest.TestCase): method testSample_count_0 (line 17) | def testSample_count_0(self): method testSample_iter_empty (line 20) | def testSample_iter_empty(self): method testSample_distribution (line 23) | def testSample_distribution(self): FILE: moonlight/util/patches.py function patches_1d (line 24) | def patches_1d(images, patch_width): FILE: moonlight/util/patches_test.py class PatchesTest (line 26) | class PatchesTest(tf.test.TestCase): method test2D (line 28) | def test2D(self): method test4D (line 40) | def test4D(self): method testEmpty (line 57) | def testEmpty(self): FILE: moonlight/util/run_length.py function vertical_run_length_encoding (line 31) | def vertical_run_length_encoding(image): FILE: moonlight/util/run_length_test.py class RunLengthTest (line 25) | class RunLengthTest(tf.test.TestCase): method testEmpty (line 27) | def testEmpty(self): method testBooleanImage (line 35) | def testBooleanImage(self): FILE: moonlight/util/segments.py class SegmentsMode (line 24) | class SegmentsMode(enum.Enum): function true_segments_1d (line 32) | def true_segments_1d(segments, function _segments_1d (line 116) | def _segments_1d(values, mode, name=None): function peaks (line 175) | def peaks(values, minval=None, invalidate_distance=0, name=None): FILE: moonlight/util/segments_test.py class SegmentsTest (line 29) | class SegmentsTest(tf.test.TestCase, absltest.TestCase): method test_true_segments_1d (line 31) | def test_true_segments_1d(self): method test_true_segments_1d_large (line 45) | def test_true_segments_1d_large(self): method test_true_segments_1d_empty (line 71) | def test_true_segments_1d_empty(self): method test_true_segments_1d_max_gap (line 81) | def test_true_segments_1d_max_gap(self): method test_true_segments_1d_all_false_length_1 (line 114) | def test_true_segments_1d_all_false_length_1(self): method test_true_segments_1d_all_false_length_2 (line 117) | def test_true_segments_1d_all_false_length_2(self): method test_true_segments_1d_all_false_length_8 (line 120) | def test_true_segments_1d_all_false_length_8(self): method test_true_segments_1d_all_false_length_11 (line 123) | def test_true_segments_1d_all_false_length_11(self): method _test_true_segments_1d_all_false (line 126) | def _test_true_segments_1d_all_false(self, length): method test_true_segments_1d_min_length_0 (line 132) | def test_true_segments_1d_min_length_0(self): method test_true_segments_1d_min_length_1 (line 135) | def test_true_segments_1d_min_length_1(self): method test_true_segments_1d_min_length_2 (line 138) | def test_true_segments_1d_min_length_2(self): method test_true_segments_1d_min_length_3 (line 141) | def test_true_segments_1d_min_length_3(self): method test_true_segments_1d_min_length_4 (line 144) | def test_true_segments_1d_min_length_4(self): method test_true_segments_1d_min_length_5 (line 147) | def test_true_segments_1d_min_length_5(self): method test_true_segments_1d_min_length_6 (line 150) | def test_true_segments_1d_min_length_6(self): method _test_true_segments_1d_min_length (line 153) | def _test_true_segments_1d_min_length(self, min_length): method test_peaks (line 176) | def test_peaks(self): method test_peaks_empty (line 182) | def test_peaks_empty(self): method test_peaks_invalidate_distance (line 186) | def test_peaks_invalidate_distance(self): method test_peaks_array_filled_with_same_value (line 206) | def test_peaks_array_filled_with_same_value(self): method test_peaks_one_segment (line 212) | def test_peaks_one_segment(self): FILE: moonlight/vision/hough.py function hough_lines (line 33) | def hough_lines(image, thetas): function hough_peaks (line 58) | def hough_peaks(hough_bins, thetas, minval=0, invalidate_distance=0): function _bincount_2d (line 115) | def _bincount_2d(values, num_values): FILE: moonlight/vision/hough_test.py class HoughTest (line 26) | class HoughTest(tf.test.TestCase): method testHorizontalLines (line 28) | def testHorizontalLines(self): method testHoughPeaks_verticalLines (line 54) | def testHoughPeaks_verticalLines(self): method testHoughPeaks_minval (line 76) | def testHoughPeaks_minval(self): method testHoughPeaks_minvalTooLarge (line 89) | def testHoughPeaks_minvalTooLarge(self): FILE: moonlight/vision/images.py function translate (line 26) | def translate(image, x, y): FILE: moonlight/vision/images_test.py class ImagesTest (line 25) | class ImagesTest(tf.test.TestCase): method testTranslate (line 27) | def testTranslate(self): FILE: moonlight/vision/morphology.py function binary_erosion (line 32) | def binary_erosion(image, n): function binary_dilation (line 50) | def binary_dilation(image, n): function _repeated_morphological_op (line 68) | def _repeated_morphological_op(float_image, binary_op, n): function _single_morphological_op (line 77) | def _single_morphological_op(float_image, binary_op): FILE: moonlight/vision/morphology_test.py class MorphologyTest (line 26) | class MorphologyTest(tf.test.TestCase): method testMorphology_false (line 28) | def testMorphology_false(self): method testErosion_small (line 35) | def testErosion_small(self): method testErosion (line 42) | def testErosion(self): method testDilation (line 60) | def testDilation(self):