thm = $('#algorithm option:selected').val();
            var marked_pic = null;
            if ($('input[name=marked_pic]')[0].files.length > 0) {
                marked_pic = $('input[name=marked_pic]')[0].files[0];
            }
            var pic = null;
            if ($('input[name=pic]')[0].files.length > 0) {
                pic = $('input[name=pic]')[0].files[0];
            }
            var mark = null;
            if ($('input[name=mark]')[0].files.length > 0) {
                mark = $('input[n