Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reid訓練後執行vail失敗問題 #9

Open
qa717415 opened this issue May 9, 2024 · 1 comment
Open

Reid訓練後執行vail失敗問題 #9

qa717415 opened this issue May 9, 2024 · 1 comment

Comments

@qa717415
Copy link

qa717415 commented May 9, 2024

您好,我們在執行reid模型時,epoch=60個訓練的途中,於第59個epoch出現錯誤
以下是錯誤訊息
Exception during training:
Traceback (most recent call last):
File ".\fast_reid\fastreid\evaluation\reid_evaluation.py", line 133, in _compile_dependencies
from .rank_cylib.rank_cy import evaluate_cy
ModuleNotFoundError: No module named 'fast_reid.fastreid.evaluation.rank_cylib.rank_cy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\fast_reid\fastreid\engine\train_loop.py", line 151, in train
self.after_epoch()
File ".\fast_reid\fastreid\engine\train_loop.py", line 185, in after_epoch
h.after_epoch()
File ".\fast_reid\fastreid\engine\hooks.py", line 377, in after_epoch
self._do_eval()
File ".\fast_reid\fastreid\engine\hooks.py", line 351, in _do_eval
results = self._func()
File ".\fast_reid\fastreid\engine\defaults.py", line 305, in test_and_save_results
self._last_eval_results = self.test(self.cfg, self.model)
File ".\fast_reid\fastreid\engine\defaults.py", line 434, in test
data_loader, evaluator = cls.build_evaluator(cfg, dataset_name)
File ".\fast_reid\fastreid\engine\defaults.py", line 417, in build_evaluator
return data_loader, ReidEvaluator(cfg, num_query, output_dir)
File ".\fast_reid\fastreid\evaluation\reid_evaluation.py", line 35, in init
self._compile_dependencies()
File ".\fast_reid\fastreid\evaluation\reid_evaluation.py", line 138, in compile_dependencies
compile_helper()
File ".\fast_reid\fastreid\evaluation\rank_cylib_init
.py", line 15, in compile_helper
ret = subprocess.run(["make", "-C", path])
File "C:\Users\adm\anaconda3\envs\botsort\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\adm\anaconda3\envs\botsort\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\adm\anaconda3\envs\botsort\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系統找不到指定的檔案。
Traceback (most recent call last):
File ".\fast_reid\fastreid\evaluation\reid_evaluation.py", line 133, in _compile_dependencies
from .rank_cylib.rank_cy import evaluate_cy
ModuleNotFoundError: No module named 'fast_reid.fastreid.evaluation.rank_cylib.rank_cy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "fast_reid/tools/train_net.py", line 60, in
args=(args,),
File ".\fast_reid\fastreid\engine\launch.py", line 71, in launch
main_func(*args)
File "fast_reid/tools/train_net.py", line 47, in main
return trainer.train()
File ".\fast_reid\fastreid\engine\defaults.py", line 350, in train
super().train(self.start_epoch, self.max_epoch, self.iters_per_epoch)
File ".\fast_reid\fastreid\engine\train_loop.py", line 151, in train
self.after_epoch()
File ".\fast_reid\fastreid\engine\train_loop.py", line 185, in after_epoch
h.after_epoch()
File ".\fast_reid\fastreid\engine\hooks.py", line 377, in after_epoch
self._do_eval()
File ".\fast_reid\fastreid\engine\hooks.py", line 351, in _do_eval
results = self._func()
File ".\fast_reid\fastreid\engine\defaults.py", line 305, in test_and_save_results
self._last_eval_results = self.test(self.cfg, self.model)
File ".\fast_reid\fastreid\engine\defaults.py", line 434, in test
data_loader, evaluator = cls.build_evaluator(cfg, dataset_name)
File ".\fast_reid\fastreid\engine\defaults.py", line 417, in build_evaluator
return data_loader, ReidEvaluator(cfg, num_query, output_dir)
File ".\fast_reid\fastreid\evaluation\reid_evaluation.py", line 35, in init
self._compile_dependencies()
File ".\fast_reid\fastreid\evaluation\reid_evaluation.py", line 138, in compile_dependencies
compile_helper()
File ".\fast_reid\fastreid\evaluation\rank_cylib_init
.py", line 15, in compile_helper
ret = subprocess.run(["make", "-C", path])
File "C:\Users\adm\anaconda3\envs\botsort\lib\subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\adm\anaconda3\envs\botsort\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\adm\anaconda3\envs\botsort\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系統找不到指定的檔案。

我們不清楚,其中ModuleNotFoundError: No module named 'fast_reid.fastreid.evaluation.rank_cylib.rank_cy'
這段訊息所提出的rank_cy檔案中,為何無法讀取到?

@ricky-696
Copy link
Owner

ricky-696 commented May 9, 2024

哈囉~

根據下面的Code

def _compile_dependencies(self):
# Since we only evaluate results in rank(0), so we just need to compile
# cython evaluation tool on rank(0)
if comm.is_main_process():
try:
from .rank_cylib.rank_cy import evaluate_cy
except ImportError:
start_time = time.time()
logger.info("> compiling reid evaluation cython tool")
compile_helper()
logger.info(
">>> done with reid evaluation cython tool. Compilation time: {:.3f} "
"seconds".format(time.time() - start_time))

我猜測你應該在安裝環境時沒有確實進行Installation的Step.6與Step.7

你可以看看模型輸出的Log有沒有compiling reid evaluation cython tool相關的文字,如果有就代表我上面的猜測是對的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants