Coder Social home page Coder Social logo

test mode not working about 3d-sis HOT 3 CLOSED

sekunde avatar sekunde commented on August 21, 2024
test mode not working

from 3d-sis.

Comments (3)

Sekunde avatar Sekunde commented on August 21, 2024

can you share the config file you use?

from 3d-sis.

sjytker avatar sjytker commented on August 21, 2024

I download scannetv2_checkpoint.zip and unzip it to rpn_class_mask_5/checkpoints/.
I run this script python main.py --gpu=2 --mode=test --step=805146 and occurs the error.

cfg files rpn_class_mask_5 as follow:
TRAIN:
RPN_NMS_THRESH: 0.5
RPN_PRE_NMS_TOP_N: 1000
RPN_POST_NMS_TOP_N: 500

TEST:
RPN_PRE_NMS_TOP_N: 400
RPN_POST_NMS_TOP_N: 200
RPN_NMS_THRESH: 0.1

RPN_BATCHSIZE: 64
RPN_FG_FRACTION: 0.5
RPN_POSITIVE_OVERLAP: 0.35
RPN_NEGATIVE_OVERLAP: 0.15

CLASS_BATCH_SIZE: 16
FG_FRACTION: 0.5
FG_THRESH: 0.5
BG_THRESH: 0.2
BG_THRESH_LO: 0.0
USE_GT: True

VAL_TIME: 3.0
LEARNING_RATE: 0.001
TRAIN_FILELIST: experiments/filelists/ScanNet/v1/train.txt
VAL_FILELIST: experiments/filelists/ScanNet/v1/val_chunk.txt
TRAINVAL_FILELIST: experiments/filelists/ScanNet/v1/trainval.txt
TEST_FILELIST: experiments/filelists/ScanNet/v1/test.txt

SNAPSHOT_KEPT: 0
STEPSIZE: [500000, 600000]
WEIGHT_DECAY: 0.0005

ALLOW_BORDER: 0
VAL_SAVE_DIR: results/ScanNet/rpn_class_mask_5/val/
TEST_SAVE_DIR: results/ScanNet/rpn_class_mask_5/test/

ROI_THRESH: 0.9
CLASS_THRESH: 0.5
MAP_THRESH: 0.50

KEEP_THRESH: 1.0
LABEL_MAP: datagen/fileLists/nyu40labels_scannet.csv
TRUNCATED: 3.0

NUM_ANCHORS_LEVEL1: 3
NUM_ANCHORS_LEVEL2: 0
NUM_ANCHORS_LEVEL3: 0
ANCHORS_TYPE_LEVEL1: 'scannet14_3.txt'
ANCHORS_TYPE_LEVEL2: 'scannet14_11.txt'
ANCHORS_TYPE_LEVEL3: ''
FILTER_ANCHOR_LEVEL1: ''
FILTER_ANCHOR_LEVEL2: ''
FILTER_ANCHOR_LEVEL3: ''

BATCH_SIZE: 1
RPN_CHANNELS: 256
CLASS_POOLING_SIZE: 4
NET: ScanNet_Backbone
MASK_BACKBONE: MaskBackbone
VOXEL_SIZE: 0.046875

FIX == FALSE in the first 10 epoches training

back bone

LOAD_BACKBONE: True
USE_BACKBONE: True
FIX_BACKBONE: False

#RPN
LOAD_RPN: True
USE_RPN: True
FIX_RPN: False

#Classification
LOAD_CLASS: True
USE_CLASS: True
FIX_CLASS: False

mask

USE_MASK: False

#-----------------------

enet

----------------------

USE_IMAGES: True
ONLY_IMAGES: False
USE_IMAGES_GT: False

NUM_IMAGES: 5
BASE_IMAGE_PATH: '/mnt/dataset/3D-SIS/scannetv2_test_data/'

IMAGE_TYPE: 'color'
IMAGE_EXT: '.jpg'
NUM_IMAGE_CHANNELS: 128
IMAGE_SHAPE: [328, 256]
DEPTH_SHAPE: [41, 32]

COLOR_MEAN: [0.496342, 0.466664, 0.440796]
COLOR_STD: [0.277856, 0.28623, 0.291129]
INTRINSIC : [[37.01983, 0, 20, 0],
[0, 38.52470, 15.5, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]]

PRETRAINED_ENET_PATH: /mnt/dataset/3D-SIS/scannetv2_enet.pth
FIX_ENET: True

from 3d-sis.

Sekunde avatar Sekunde commented on August 21, 2024

The error is because in the checkpoint, we saved mask_backbone, whereas when loading the model, it is not defined. I guess if you set USE_MASK to True, it should be fine. If you don't want mask, you can only load the non-mask-backbone weights.

https://github.com/Sekunde/3D-SIS/blob/master/lib/model/trainval.py#L91
Here is where we load weights for test mode, you can replace this line of code with following code so not to load the mask backbone weights:

model_dict = net.state_dict()
pretrained_dict = {k: v for k, v in pretrained_dict.items() if ('mask_backbone' not in k)}
model_dict.update(pretrained_dict)
net.load_state_dict(model_dict)

from 3d-sis.

Related Issues (20)

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.