This commit is contained in:
2025-10-04 11:45:45 -04:00
parent 028149b786
commit 36b7784b4e
11 changed files with 281 additions and 73 deletions

View File

@@ -1,3 +1,4 @@
#!/home/thebears/envs/ml_vision_objdet/bin/python
import os
import subprocess as sp
@@ -18,13 +19,13 @@ if not ('__file__' in vars() or '__file__' in globals()):
parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.append(parent_dir)
logger = get_logger(__name__,'/var/log/ml_vision_logs/00_watch_and_fix_permissions', stdout=True, systemd=False)
logger = get_logger(__name__,'/var/log/ml_vision_logs/00_load_missed', stdout=True, systemd=False, level=logging.INFO)
from common import settings
default_dir_watch = settings.dir_watch
default_dir_watch = settings.dir_watch_missed
publish = kwq.producer.send
topic = kwq.TOPICS.videos_to_score_detection
topic = kwq.TOPICS.exit_00_videos_to_score_detection
necessary_extensions = [
'.oclip_embeds.npz',
@@ -32,10 +33,13 @@ necessary_extensions = [
'.db_has_sl2_embeds_part' ]
def decide_to_put_in_queue(file_name):
if os.path.getsize(file_name) < 1*1000*1000:
return False
disqualifiers = list()
disqualifiers.append(not os.path.exists(file_name))
disqualifiers.append("_reduced" in file_name)
disqualifiers.append("_trimmed" in file_name)
# disqualifiers.append('hummingbird' in file_name)
disqualified = any(disqualifiers)
if file_name.endswith(".mp4") and not disqualified: