Skip to content

论文FishNet: a versatile backbone for image, region, and pixel level prediction的Megengine实现

Notifications You must be signed in to change notification settings

CV51GO/FishNet_Megengine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

介绍

本项目是论文《FishNet: a versatile backbone for image, region, and pixel level prediction》的Megengine实现。该论文的官方实现地址:https://github.com/kevin-ssy/FishNet

环境安装

依赖于CUDA10

conda create -n FishNet python=3.7
pip install -r requirements.txt

下载官方的权重:https://pan.baidu.com/s/11U3sRod1VfbDBRbmXph6KA ,将下载后的文件置于./official_FishNet路径下。

使用方法

安装完环境后,直接运行python compare.py

compare.py文件对官方实现和Megengine实现的推理结果进行了对比。

运行compare.py时,会读取./data中存放的图片进行推理。compare.py中实现了Megengine框架和官方使用的Pytorch框架的推理,并判断两者推理结果的一致性。

模型加载示例

在model.py中,定义了get_megengine_fishnet_model方法,该方法能够利用hub加载模型。

@hub.pretrained(
"https://studio.brainpp.com/api/v1/activities/3/missions/92/files/8b51a6a2-391f-49e2-a202-60e8a9dda7fe"
)
def get_megengine_fishnet_model():
    model_megengine = fishnet99()
    return model_megengine

在使用模型时,使用如下代码即可加载权重:

from model import get_megengine_fishnet_model as get_megengine_fishnet99
megengine_model = get_megengine_fishnet99(pretrained=True)

About

论文FishNet: a versatile backbone for image, region, and pixel level prediction的Megengine实现

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages