Ubuntu 配置 FastestDet 遇到的问题

搭建环境遇到的问题:
requirement.txt里面对应的库的版本没有

4060Ti 导致 torch 和torchvision 版本错误

训练数据集时遇到的问题:

	Traceback (most recent call last):
  	File "/home/be/Downloads/FastestDet-main/train.py", line 134, in <module>
    model.train()
  	File "/home/be/Downloads/FastestDet-main/train.py", line 126, in train
    mAP05 = self.evaluation.compute_map(self.val_dataloader, self.model)
  	File "/home/be/Downloads/FastestDet-main/utils/evaluation.py", line 98, in compute_map
    mAP05 = self.coco_evaluate(gts, pts)
  	File "/home/be/Downloads/FastestDet-main/utils/evaluation.py", line 46, in coco_evaluate
    coco_pred.dataset["annotations"].append({"image_id": i, "category_id": np.int(pred[j, 0]),
  	File "/home/be/anaconda3/envs/FastestDet/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
	AttributeError: module 'numpy' has no attribute 'int'.
	`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.

解决方式:https://blog.csdn.net/hhhhhhhhhhwwwwwwwwww/article/details/131430993

但是尝试过之后发现,这个问题解决啦,但是还有 np.float。 都是发生在安装的 prococotal 这个库里面。
于是就尝试一下安装了最新版的prcocotal。问提解决。

你可能感兴趣的:(ubuntu,linux,运维)