Remote network usage

This commit is contained in:
Ryan
2026-09-13 18:40:02 -04:00
parent dbbbaa2ea2
commit ad3deb3226
6 changed files with 36 additions and 19 deletions
+9 -2
View File
@@ -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 {