Remote network usage
This commit is contained in:
+9
-2
@@ -25,6 +25,8 @@ for(my $i=0; $i<$task_count; $i++) {
|
||||
my $video_id = $video->{'id'};
|
||||
my $path = $video->{'file_path'};
|
||||
my $result = CheckPath($path);
|
||||
|
||||
next unless $result;
|
||||
|
||||
my $response = PostResponse($task_id, $ref->{'assign_key'}, $result);
|
||||
}
|
||||
@@ -69,14 +71,19 @@ sub CheckPath {
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
if($total == 0) {
|
||||
warn "No images were processed for $path\n";
|
||||
return undef;
|
||||
}
|
||||
|
||||
my $percentage = ($yes*100)/$total;
|
||||
print "$yes of $total images gave yes - $percentage\n";
|
||||
my $verdict = 0;
|
||||
if($percentage >= $sensitivity) {
|
||||
print "Probably a black dude, $percentage\n";
|
||||
print "$path: Probably a black dude, $percentage\n";
|
||||
$verdict = 1;
|
||||
} else {
|
||||
print "Probably not, $percentage\n";
|
||||
print "$path: Probably not, $percentage\n";
|
||||
$verdict = 0;
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user