File size: 478 Bytes
f2798b7
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import pathlib
root=pathlib.Path(__file__).resolve().parent
bad=[]
for p in root.rglob('*.py'):
    if p.name == 'verify_engine.py' or '.paddledetection' in p.parts:
        continue
    s=p.read_text(errors='ignore')
    if 'transformers.models.rt_detr' in s or 'RTDetrForObjectDetection' in s:
        bad.append(str(p))
if bad:
    raise SystemExit('Hugging Face RT-DETR code found: ' + ', '.join(bad))
print('OK: application training path is PaddleDetection RT-DETR only.')