diff --git a/tools/infer/predict_cls.py b/tools/infer/predict_cls.py index ab3f4b04f0c306aaf7e26eb98e781938b7528275..ed2f47c04de6f4ab6a874db052e953a1ce4e0b76 100755 --- a/tools/infer/predict_cls.py +++ b/tools/infer/predict_cls.py @@ -16,7 +16,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer/predict_det.py b/tools/infer/predict_det.py index 95a099451bb12ef537e6f942df88da91df48038f..2c389f0e49767a40dd6f397f5445d5673e8dae55 100755 --- a/tools/infer/predict_det.py +++ b/tools/infer/predict_det.py @@ -16,7 +16,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer/predict_e2e.py b/tools/infer/predict_e2e.py index c00d101aa601c05230da39bc19f0e5068bc80aa2..fb2859f0c7e0d3aa0b87dbe11123dfc88f4b4e8e 100755 --- a/tools/infer/predict_e2e.py +++ b/tools/infer/predict_e2e.py @@ -16,7 +16,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer/predict_rec.py b/tools/infer/predict_rec.py index 575e1925c9a84b1de2d98f14567623ada6dabcb8..eebb2b3ba4a1489512de3b977ddf9f1ef8f67ec1 100755 --- a/tools/infer/predict_rec.py +++ b/tools/infer/predict_rec.py @@ -16,7 +16,7 @@ import sys from PIL import Image __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer/predict_system.py b/tools/infer/predict_system.py index b4e316d6a5edf464abd846ad2129f5373fc2a36f..63b635c1114d079478e34682d7c94c433bd21ffa 100755 --- a/tools/infer/predict_system.py +++ b/tools/infer/predict_system.py @@ -17,7 +17,7 @@ import subprocess __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '../..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '../..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_cls.py b/tools/infer_cls.py index ab6a49120b6e22621b462b680a161d70ee965e78..4be30bbb3c2f8bbf6a59179220faa942e6cc27b8 100755 --- a/tools/infer_cls.py +++ b/tools/infer_cls.py @@ -23,7 +23,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_det.py b/tools/infer_det.py index 9d2daf13ad6ad3de396ea1587c3d25cccb126eac..1acecedf3e42fe67a93644a7f06c07c8b6bea2e3 100755 --- a/tools/infer_det.py +++ b/tools/infer_det.py @@ -23,7 +23,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_e2e.py b/tools/infer_e2e.py index 96dbac8e83cb8651ca19c05d5a680a4efebc6ff6..f3d5712fdda21faf04b95b7a2d5d3092af1b5011 100755 --- a/tools/infer_e2e.py +++ b/tools/infer_e2e.py @@ -23,7 +23,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_kie.py b/tools/infer_kie.py index 16294e59cc51727f39af77d16255ef4d0f2a1bd8..0cb0b8702cbd7ea74a7b7fcff69122731578a1bd 100755 --- a/tools/infer_kie.py +++ b/tools/infer_kie.py @@ -24,7 +24,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_rec.py b/tools/infer_rec.py index adc3c1c3c49dcaad5ec8657f5d32b2eca8e10a40..02b3afd8a1b32c3c9c1e4a9a121f08b58c10151d 100755 --- a/tools/infer_rec.py +++ b/tools/infer_rec.py @@ -24,7 +24,7 @@ import json __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_table.py b/tools/infer_table.py index c73e384046d1fadbbec4bf43a63e13aa8d54fc6c..66c2da4421a313c634d27eb7a1013638a7c005ed 100644 --- a/tools/infer_table.py +++ b/tools/infer_table.py @@ -24,7 +24,7 @@ import json __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' diff --git a/tools/infer_vqa_token_ser.py b/tools/infer_vqa_token_ser.py index 5859c28f92085bda67627af2a10acc56cb36d932..83ed72b392e627c161903c3945f57be0abfabc2b 100755 --- a/tools/infer_vqa_token_ser.py +++ b/tools/infer_vqa_token_ser.py @@ -23,7 +23,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' import cv2 diff --git a/tools/infer_vqa_token_ser_re.py b/tools/infer_vqa_token_ser_re.py index fd62ace8aef35db168537580513139e429e88cc3..1e5f6f76d6b0599089069ab30f76b3479c7c90b4 100755 --- a/tools/infer_vqa_token_ser_re.py +++ b/tools/infer_vqa_token_ser_re.py @@ -23,7 +23,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) os.environ["FLAGS_allocator_strategy"] = 'auto_growth' import cv2 diff --git a/tools/train.py b/tools/train.py index 506e0f7fa87fe8afc82cbb12d553a8da4ba298e2..f6cd0e7d12cdc572dd8d2c402e03e160001a9f4a 100755 --- a/tools/train.py +++ b/tools/train.py @@ -21,7 +21,7 @@ import sys __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) +sys.path.insert(0, os.path.abspath(os.path.join(__dir__, '..'))) import yaml import paddle