Code Monkey home page Code Monkey logo

Comments (3)

BrianPugh avatar BrianPugh commented on July 22, 2024 6

Here's a MATLAB script I wrote to do the preprocessing. Since YorkUrban is such a small dataset, it might be worthwhile just to reupload it in the preprocessed format.

This is to be ran in the york_raw directory with the YorkUrbanDB unzipped to that directory.

york_urban_db_path = 'YorkUrbanDB';
load(fullfile(york_urban_db_path, 'Manhattan_Image_DB_Names.mat'));
load(fullfile(york_urban_db_path,'ECCV_TrainingAndTestImageNumbers.mat'));

n_exemplars = length(Manhattan_Image_DB_Names);
for i = 1:n_exemplars
    name = Manhattan_Image_DB_Names{i}(1:end-1);
    fprintf('Processing %d/%d\r', i, n_exemplars);
    
    %% Image Ontology Preprocess
    input_im_path = fullfile(york_urban_db_path, name, [name, '.jpg']);
    output_im_path = [name, '_rgb.png'];
    
    im = imread(input_im_path);
    imwrite(im, output_im_path);
    
    %% Line Segment Ontology Preprocess
    input_contents_path = fullfile(york_urban_db_path, name, [name, 'LinesAndVP.mat']);
    output_contents_path = [name, '.mat'];
    
    contents = load(input_contents_path);
    line = contents.lines;
    
    save(output_contents_path, 'line');
end

from afm_cvpr2019.

cherubicXN avatar cherubicXN commented on July 22, 2024

You need to use matlab to read the YorkUrban dataset and write the images and line segments into "filename_rgb.png" and "filename.mat". The line segments in the mat file should be saved with the variable 'line'. In our evaluation, we only use the test data (51 images). You can read the guideline of YorkUrban dataset for the format.

from afm_cvpr2019.

718155407 avatar 718155407 commented on July 22, 2024

Thank u very much,I will try it again。

from afm_cvpr2019.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.