Remote network usage
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# VideoDetect — Docker Compose environment variables
|
||||
# Copy this file to .env and fill in real values before running docker-compose up.
|
||||
|
||||
API_HOST=https://10.0.1.7:3000
|
||||
|
||||
@@ -9,15 +9,13 @@ services:
|
||||
container_name: videodetect-aiworker
|
||||
restart: "no"
|
||||
environment:
|
||||
- API_BASE_URL=${API_BASE_URL:-http://videodetect-api:3000}
|
||||
- API_BASE_URL=${API_BASE_URL:-http://10.0.1.7:3000}
|
||||
- OLLAMA_URL=${OLLAMA_URL:-http://10.0.1.7:11434}
|
||||
- SECONDS_PER_FRAME=${SECONDS_PER_FRAME:-30}
|
||||
- TASK_COUNT=${TASK_COUNT:-50}
|
||||
volumes:
|
||||
- nas_input:/data:ro
|
||||
- ./run.pl:/app/run.pl:ro
|
||||
networks:
|
||||
- videodetect_videodetect-network
|
||||
|
||||
volumes:
|
||||
nas_input:
|
||||
@@ -27,6 +25,3 @@ volumes:
|
||||
o: addr=10.0.0.2,ro,nfsvers=4,hard,intr
|
||||
device: ":/mnt/Bulk/Homes/ryan/Prawns"
|
||||
|
||||
networks:
|
||||
videodetect_videodetect-network:
|
||||
external: true
|
||||
|
||||
+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