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。问提解决。

  • 13
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值