userID(); $userinfo = $session->getUserInfo(); $requestid = $userdb->getLiveRequestID($userid); $requestinfo = $userdb->getRequestInfo($requestid); if (!$session->loggedIn()) { redirect_to("../../login.php"); } if ($session->loggedIn() && $userinfo['userlevel'] == 0) { redirect_to("../../request.php"); } require_once('eval_server_config.php'); /* ilsvrc2013_server is the database * submissions -> submission_time, submitter_id, submission_id, det_id,cls_id,loc_id * {det,cls,loc}_results -> submission_id, {det,cls,loc}_id, file, result * {det,cls,loc}_class_results -> submission_id, class, result */ function verifySubmission() { global $userinfo, $conn; $userid = $userinfo['userid']; //if ($userid == 482) // olga // return true; if ($userid == 1347) // For wei to debug return true; $q = "SELECT * FROM ilsvrc2013_server.submissions WHERE ". "timestampdiff(minute,submission_time,now()) < 60*24*7 ". "and submitter_id=".$userid." and (det_id is not null or cls_id is not null or loc_id is not null)"; $result = mysql_query ($q, $conn); return mysql_num_rows ($result) < 2; } function evaluateSubmission() { global $userinfo, $conn, $root, $fse, $max_size, $success; $types = array("det","cls","loc"); foreach ($types as $type) { $s = $type.'_submit'; if (!isset($_FILES[$s])) continue; $submit_file = $_FILES[$s]; if (strlen($submit_file["name"]) == 0) continue; $size = $submit_file['size']; if ($size > $max_size) return $fse; // Handle submission error. Added by Wei Liu $message = 'Error uploading file'; switch( $submit_file['error'] ) { case UPLOAD_ERR_OK: $message = false;; break; case UPLOAD_ERR_INI_SIZE: $message .= ' - file exceeds the upload_max_filesize'; break; case UPLOAD_ERR_FORM_SIZE: $message .= ' - file too large (limit of '.get_max_upload().' bytes).'; break; case UPLOAD_ERR_PARTIAL: $message .= ' - file upload was not completed.'; break; case UPLOAD_ERR_NO_FILE: $message .= ' - no file was uploaded.'; break; case UPLOAD_ERR_NO_TMP_DIR: $message .= ' - missing a temporary folder.'; break; case UPLOAD_ERR_CANT_WRITE: $message .= ' - failed to write file to disk.'; break; case UPLOAD_ERR_EXTENSION: $message .= ' - file upload stopped by extension.'; break; default: $message .= ' - unknown upload error #'.$submit_file['error']; break; } if( !$message ) { if( !is_uploaded_file($submit_file['tmp_name']) ) { return 'Error uploading file - unknown error.'; } else { $unq_fname = time() . "__" . preg_replace("/[^A-Za-z0-9.]/", "", $submit_file["name"]); $store_path = $root."/".$type."_submissions/".$unq_fname; if(!move_uploaded_file($submit_file['tmp_name'], $store_path)) { return 'Failed to move '.$submit_file['tmp_name']; } } } else { return $message; } $q = "insert into ilsvrc2013_server.submissions (submitter_id) values (".$userinfo['userid'].")"; mysql_query ($q, $conn); $submission_id = mysql_insert_id(); $q = "insert into ilsvrc2013_server.".$type."_results (submission_id,file) values ($submission_id,\"" .mysql_real_escape_string (addslashes ($unq_fname))."\")"; mysql_query ($q, $conn) or die (mysql_error()); $entry_id = mysql_insert_id (); $q = "update ilsvrc2013_server.submissions set ".$type."_id = $entry_id where submission_id = $submission_id;"; mysql_query ($q, $conn); $log_file = $store_path.".log"; $cmd = $root."eval.sh $type $store_path $submission_id &> $log_file &"; exec ($cmd); } return $success; } include('../../commonheader.php'); ?>
Back to Main page"; // echo '

The submission server is temporarily unavailable.'; echo "

Announcement regarding submission server policy."; $userinfo = $session->getUserInfo(); if (isset($_FILES['cls_submit']) || isset($_FILES['loc_submit']) || isset($_FILES['det_submit'])) { if (verifySubmission()) { // if (true) { echo "

"; $result= evaluateSubmission(); echo $result; } else { echo "

You are not allowed to test your submission more than twice a week. Please try again later."; } } else { echo "

"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // echo ""; // echo ""; echo ""; echo ""; echo ""; echo "
Username:".$userinfo['username']."
Email:".htmlspecialchars($userinfo['useremail'])."
Full Name:".htmlspecialchars($userinfo['userrealname'])."
Organization:".htmlspecialchars($userinfo['userorganization'])."
Classification submission (top-5 and top-1 cls error):
Localization submission (top-5 loc error):
Detection submission (mAP):

"; echo "We will evaluate the submission and email the results to you.
"; echo "Please note that you cannot make more than 2 submissions per week,"; echo " and the uploaded files must be smaller than 200Mb.
"; echo "

NEW: You may now submit zip files for evaluation. "; echo "If your zip file is named submission.zip, it must unzip to a single text file named submission.txt. "; echo "This can be achieved for example by generating a submission.txt file with your results, "; echo "and then running the command 'zip submission.zip submission.txt'. "; echo "

"; echo "
"; } include("footer.php"); echo ""; ?>