function bodyPartCheck

DATdir = 'data/';
imagePath = 'images/'
yourImages = dir(imagePath);
for p = 3 : length(yourImages)
    IMGdir = yourImages(p).name;
    PNGdir = ['images/',IMGdir, '/']
    ANNdir = ['annotation/',IMGdir]
    if(~exist(ANNdir,'dir'))
        mkdir(ANNdir)
    end

    d=dir([PNGdir,'/*.jpg']);
    for i = 1 : length(d),
        [path, name, ext] = fileparts(d(i).name);
        annfile = [ANNdir, '/', name, '.txt'];
        if(~exist(annfile, 'file'))
            continue;
        end
        
        record = load(annfile);
        img = imread([PNGdir, d(i).name]);
        imagesc(img);
        titlename = strrep(d(i).name, '_', '\_');
        title(titlename);
        
        if record(1,1) >= 0 && record(1,2) >= 0 && record(2,1) >= 0 && record(2,2) >= 0
            line([record(1,1) record(2,1)], [record(1,2) record(2,2)], 'Color', 'r', 'LineWidth', 2);
        end
        if record(3,1) >= 0 && record(3,2) >= 0 && record(4,1) >= 0 && record(4,2) >= 0
            line([record(3,1) record(4,1)], [record(3,2) record(4,2)], 'Color', 'g', 'LineWidth', 2);
        end
        if record(5,1) >= 0 && record(5,2) >= 0 && record(6,1) >= 0 && record(6,2) >= 0
            line([record(5,1) record(6,1)], [record(5,2) record(6,2)], 'Color', 'b', 'LineWidth', 2);
        end
        if record(6,1) >= 0 && record(6,2) >= 0 && record(7,1) >= 0 && record(7,2) >= 0
            line([record(6,1) record(7,1)], [record(6,2) record(7,2)], 'Color', 'c', 'LineWidth', 2);
        end
        if record(8,1) >= 0 && record(8,2) >= 0 && record(9,1) >= 0 && record(9,2) >= 0
            line([record(8,1) record(9,1)], [record(8,2) record(9,2)], 'Color', 'm', 'LineWidth', 2);
        end
        if record(9,1) >= 0 && record(9,2) >= 0 && record(10,1) >= 0 && record(10,2) >= 0
            line([record(9,1) record(10,1)], [record(9,2) record(10,2)], 'Color', 'y', 'LineWidth', 2);
        end
        ginput(1);
    end;
end

return