Giter Club home page Giter Club logo

hdr's People

Contributors

jin-s13 avatar menghao666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hdr's Issues

[Load Seg model][RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted]

Dear author,
I have encountered an error when I try to call the segmentation network. I sincerely need your help, thank you!

import sys
sys.path.insert(0,'/mnt/workspace/project/2022AW/09/HDR/')
import numpy as np
import cv2
from utils.preprocessing import process_bbox, generate_patch_image
from PIL import Image
from mmseg.apis import inference_segmentor, init_segmentor
import matplotlib.pyplot as plt
%matplotlib inline


# segmentor
seg_cfg_file = "./configs/segformer/segformer_mit-b5_256x256_interhand_1101.py"
seg_model = init_segmentor(
    config=seg_cfg_file,
    checkpoint='./demo_work_dirs/Interhand_seg/iter_237500.pth',
)

Error

/mnt/workspace/project/2022AW/09/HDR/mmseg/models/backbones/mit.py:311: UserWarning: DeprecationWarning: pretrained is a deprecated, please use "init_cfg" instead
  warnings.warn('DeprecationWarning: pretrained is a deprecated, '
Use load_from_local loader
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-6-db1a521dfe39> in <module>
      3 seg_model = init_segmentor(
      4     config=seg_cfg_file,
----> 5     checkpoint='./demo_work_dirs/Interhand_seg/iter_237500.pth',
      6 )

/mnt/workspace/project/2022AW/09/HDR/mmseg/apis/inference.py in init_segmentor(config, checkpoint, device)
     33     model = build_segmentor(config.model, test_cfg=config.get('test_cfg'))
     34     if checkpoint is not None:
---> 35         checkpoint = load_checkpoint(model, checkpoint, map_location='cpu')
     36         model.CLASSES = checkpoint['meta']['CLASSES']
     37         model.PALETTE = checkpoint['meta']['PALETTE']

/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in load_checkpoint(model, filename, map_location, strict, logger, revise_keys)
    525         dict or OrderedDict: The loaded checkpoint.
    526     """
--> 527     checkpoint = _load_checkpoint(filename, map_location, logger)
    528     # OrderedDict is a subclass of dict
    529     if not isinstance(checkpoint, dict):

/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in _load_checkpoint(filename, map_location, logger)
    464            information, which depends on the checkpoint.
    465     """
--> 466     return CheckpointLoader.load_checkpoint(filename, map_location, logger)
    467 
    468 

/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in load_checkpoint(cls, filename, map_location, logger)
    242         class_name = checkpoint_loader.__name__
    243         mmcv.print_log(f'Use {class_name} loader', logger)
--> 244         return checkpoint_loader(filename, map_location)
    245 
    246 

/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in load_from_local(filename, map_location)
    259     if not osp.isfile(filename):
    260         raise IOError(f'{filename} is not a checkpoint file')
--> 261     checkpoint = torch.load(filename, map_location=map_location)
    262     return checkpoint
    263 

/home/pai/lib/python3.6/site-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
    598             # reset back to the original position.
    599             orig_position = opened_file.tell()
--> 600             with _open_zipfile_reader(opened_file) as opened_zipfile:
    601                 if _is_torchscript_zip(opened_zipfile):
    602                     warnings.warn("'torch.load' received a zip file that looks like a TorchScript archive"

/home/pai/lib/python3.6/site-packages/torch/serialization.py in __init__(self, name_or_buffer)
    240 class _open_zipfile_reader(_opener):
    241     def __init__(self, name_or_buffer) -> None:
--> 242         super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
    243 
    244 

RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted

On the issue of poor performance in replacing test images

I am replacing Tzionas_ Dataset-02-1-rgb-100.png took a picture of my own crossed hands, but the effect was not good after running. May I ask if it is related to Tzionas_ Dataset-02-1-joints_ 2D_ Is GT-100.txt related to this file? Please provide guidance.

Training and testing scripts

Hi,

Thank you for producing such amazing work for the community. Can we get the training and testing scripts soon?

Thank you!

About Hand Amodal Segmentation Module

I wonder whether segmentation module was trained on the whole interhand2.6m dataset including both one hand and two hands. I run this demo using data of interhand2.6m and get some results below. The segmentation seems nice while the prediction should be None about right hand.
image
image

training code

Thank you for your great work and look forward to the release of your training code!

Whether the pre-trained model is the model of the results in the paper

Whether the pre-trained model is the model of the results in the paper

Thank you for open sourcing the code, it's a really interesting job.

Thanks for open sourcing Google Drive pretrained models.

Does this pre-training model correspond to the experimental results in the paper? Or just a demo model, not the SOTA model in the paper?

Thanks!

About demo file

Thank you for your interesting research.

I implemented the demo file you provided about the interhand 2.6m dataset, and the result was not good as below.

image
image

I wonder if you can tell me the path of the image to see the result well when I put in the image.

UnboundLocalError: local variable 'x' referenced before assignment

Hi,I'm a student and very interested in your "3D Interacting Hand Pose Estimation by Hand De-occlusion and Removal" paper.

i'm getting error on running demo.py

(hdr_hope) C:\HDR>python demo/demo.py
load checkpoint from local path: ./demo_work_dirs/Interhand_seg/iter_237500.pth => loading checkpoint './demo_work_dirs/TDR_fintune/checkpoints\ckpt_iter_138000.pth.tar' => loading checkpoint './demo_work_dirs/All_train_SingleRightHand\checkpoints\ckpt_iter_261000.pth.tar' img.shape= torch.Size([1, 3, 256, 256]) Traceback (most recent call last): File "demo/demo.py", line 163, in <module> seg_result = inference_segmentor(seg_model, rgb.cuda()) File "C:\HDR\mmseg\apis\inference.py", line 168, in inference_segmentor seg_logits = model.encode_decode(img, None) File "C:\HDR\mmseg\models\segmentors\encoder_decoder.py", line 77, in encode_decode x = self.extract_feat(img) File "C:\HDR\mmseg\models\segmentors\encoder_decoder.py", line 73, in extract_feat return x UnboundLocalError: local variable 'x' referenced before assignment

i think maybe the problem is in "extract_feat" so i also post it on here

def extract_feat(self, img): """Extract features from images.""" # print(self.backbone(img)) # print(img) try: x = self.backbone(img) except : print("img.shape=", img.shape) if self.with_neck: x = self.neck(self.backbone(img))

About your SegFormer

Thank you for the good research.

According to the paper, you said you pre-train SegFormer, but did you use only two hand images except one hand image on the Interhand 2.6M dataset?

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.