Git Product home page Git Product logo

global-wheat-detection's Issues

小麦检测

首先祝贺你取得1%的成绩,能加下联系方式吗,我想和你请教下这次比赛的一些技巧和方法,十分感谢!
VX:15256956711

记录kaggle提交结果步骤

有些比赛是强制使用notebook进行提交csv文件,并运行notebook

  • 在比赛界面点击new Notebook,可选开启GPU
  • 注意:有的比赛会限制联网,所以要在notebook的右方面板关闭internet
  • 要先运行一遍自己的notebook,输出csv结果到output
  • 点击右上方的save version,选择第二种方式,run and commit
  • 然后在notebook界面点开自己的notebook,找到output,点击summit
  • 会显示评分界面,这里会花费一点时间进行评估

比赛解决方案1-微调Faster-RCNN

已理解部分

  • 读取train.csv为pandas的df形式,并将bbox列的坐标值划分为四列
  • WheatData:自定义的数据集读取,其中__getitem__函数需返回images和字典形式的targets

疑问部分

  • 采用的官方教程中的微调网络代码,不理解后两句
# load a model; pre-trained on COCO(以下4句为pytorch官方教程例子)
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
num_classes = 2  # 1 class (wheat) + background
# get number of input features for the classifier
in_features = model.roi_heads.box_predictor.cls_score.in_features
# replace the pre-trained head with a new one
model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)
  • 对于train部分,网络是使用的封装好的部分,不知道model(images,targets)函数的具体返回值
for images, targets, image_ids in train_data_loader:
        
        images = list(image.to(device) for image in images)
        targets = [{k: v.to(device) for k, v in t.items()} for t in targets]
        # 官方教程中写的是 model(images, targets):Returns losses and detections
        loss_dict = model(images, targets)  # Returns losses and detections

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.