profile
viewpoint
Max Frei maxfrei750 University of Duisburg-Essen deepparticle.net

maxfrei750/DeepParticleNet 6

A deep neural network for particle size and shape analysis.

maxfrei750/FibeR-CNN 2

Fiber analysis via deep learning.

dracula/thunderbird 1

🧛🏻‍♂️ Dark theme for Thunderbird

maxfrei750/CommandLineProgressBar 1

Progressbar for the matlab command line, which also supports parfor loops.

maxfrei750/synthPIC4Matlab 1

Synthetic Particle Image Creator (synthPIC) for MATLAB.

maxfrei750/cocoapi 0

Clone of COCO API - Dataset @ http://cocodataset.org/ - with changes to support Windows build and python3

maxfrei750/DeepLabv3FineTuning 0

Tutorial on fine tuning DeepLabv3 segmentation network for your own segmentation task in PyTorch.

delete branch dracula/thunderbird

delete branch : main

delete time in 9 days

create barnchdracula/thunderbird

branch : master

created branch time in 9 days

fork linbinbin92/FibeR-CNN

Fiber analysis via deep learning.

fork in 12 days

PublicEvent

fork starkzc/DeepParticleNet

A deep neural network for particle size and shape analysis.

fork in 24 days

startedmaxfrei750/DeepParticleNet

started time in 25 days

startedmaxfrei750/DeepParticleNet

started time in 25 days

issue closedmaxfrei750/FibeR-CNN

AttributeError: Cannot find field 'pred_keypoints' in the given Instances!

Hello I was trying to run the demo but it shows the following error:

code:

  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/demo/demo.py", line 50, in <module>
    demo()
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/demo/demo.py", line 42, in demo
    outputs = predictor(image)
  File "/Users/fan/Downloads/detectron2/detectron2/engine/defaults.py", line 223, in __call__
    predictions = self.model([inputs])[0]
  File "/Users/fan/opt/anaconda3/envs/fiberAnalysis/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/fan/Downloads/detectron2/detectron2/modeling/meta_arch/rcnn.py", line 149, in forward
    return self.inference(batched_inputs)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/model.py", line 50, in inference
    results = self._postprocess2(results)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/model.py", line 62, in _postprocess2
    instances = perform_keypoint_pruning(
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/postprocessing.py", line 43, in perform_keypoint_pruning
    keypoint_sets = instances.pred_keypoints
  File "/Users/fan/Downloads/detectron2/detectron2/structures/instances.py", line 65, in __getattr__
    raise AttributeError("Cannot find field '{}' in the given Instances!".format(name))
AttributeError: Cannot find field 'pred_keypoints' in the given Instances!

Process finished with exit code 1

My environment is built on Mac, but I can run the official demo correctly by cpu only. Please help me look into this!

closed time in 2 months

evan4C

issue commentmaxfrei750/FibeR-CNN

AttributeError: Cannot find field 'pred_keypoints' in the given Instances!

Thanks a lot for your prompt replies! It works fine after I changed the detectron2 version!

Although the accuracy is poor when I changed the demo image to my test image, where a lot of fibers are tangled. I'll make out if it can be improved by my own dataset.

evan4C

comment created time in 2 months

issue commentmaxfrei750/FibeR-CNN

AttributeError: Cannot find field 'pred_keypoints' in the given Instances!

  1. Sure, I followed the official installation tutorial.
  2. Actually, I also ran this demo on the CPU by adding one line code after the Load config block.
# Load config.
    config = get_fibercnn_config()
    config.merge_from_file(config_filename)

    config.MODEL.DEVICE = 'cpu'
  1. It seems nothing changed when I disabled keypoint pruning like this:
POSTPROCESSING:
    KEYPOINT_PRUNING:
      ENABLED: false
  1. I am using the default test image.

And by the way, when I first ran the demo without any modification, I got the following error:

Traceback (most recent call last):
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/demo/demo.py", line 50, in <module>
    demo()
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/demo/demo.py", line 36, in demo
    predictor = get_predictor(config)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/evaluation/utilities.py", line 28, in get_predictor
    predictor = DefaultPredictor(config)
  File "/Users/fan/Downloads/detectron2/detectron2/engine/defaults.py", line 188, in __init__
    self.model = build_model(self.cfg)
  File "/Users/fan/Downloads/detectron2/detectron2/modeling/meta_arch/build.py", line 21, in build_model
    model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/model.py", line 16, in __init__
    super().__init__(cfg)
  File "/Users/fan/Downloads/detectron2/detectron2/config/config.py", line 181, in wrapped
    explicit_args = _get_args_from_config(from_config_func, *args, **kwargs)
  File "/Users/fan/Downloads/detectron2/detectron2/config/config.py", line 236, in _get_args_from_config
    ret = from_config_func(*args, **kwargs)
  File "/Users/fan/Downloads/detectron2/detectron2/modeling/meta_arch/rcnn.py", line 79, in from_config
    "roi_heads": build_roi_heads(cfg, backbone.output_shape()),
  File "/Users/fan/Downloads/detectron2/detectron2/modeling/roi_heads/roi_heads.py", line 43, in build_roi_heads
    return ROI_HEADS_REGISTRY.get(name)(cfg, input_shape)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/roi_head.py", line 25, in __init__
    self._init_fiber_roi_heads(cfg)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/roi_head.py", line 29, in _init_fiber_roi_heads
    self._init_fiber_width_head(cfg)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/roi_head.py", line 37, in _init_fiber_width_head
    pooler_scales = [1.0 / self.feature_strides[k] for k in self.in_features]
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/roi_head.py", line 37, in <listcomp>
    pooler_scales = [1.0 / self.feature_strides[k] for k in self.in_features]
  File "/Users/fan/opt/anaconda3/envs/fiberAnalysis/lib/python3.8/site-packages/torch/nn/modules/module.py", line 778, in __getattr__
    raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
torch.nn.modules.module.ModuleAttributeError: 'FiberROIHeads' object has no attribute 'feature_strides'

And then I solved this by adding the following two lines in the roi_head.py.

 self.feature_strides = {k: v.stride for k, v in input_shape.items()}
 self.feature_channels = {k: v.channels for k, v in input_shape.items()}

After that, the first error happened and I have no idea how to handle it.

evan4C

comment created time in 2 months

issue openedmaxfrei750/FibeR-CNN

AttributeError: Cannot find field 'pred_keypoints' in the given Instances!

Hello I was trying to run the demo but it shows the following error:

code:

  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/demo/demo.py", line 50, in <module>
    demo()
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/demo/demo.py", line 42, in demo
    outputs = predictor(image)
  File "/Users/fan/Downloads/detectron2/detectron2/engine/defaults.py", line 223, in __call__
    predictions = self.model([inputs])[0]
  File "/Users/fan/opt/anaconda3/envs/fiberAnalysis/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/fan/Downloads/detectron2/detectron2/modeling/meta_arch/rcnn.py", line 149, in forward
    return self.inference(batched_inputs)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/model.py", line 50, in inference
    results = self._postprocess2(results)
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/model.py", line 62, in _postprocess2
    instances = perform_keypoint_pruning(
  File "/Users/fan/Documents/GitHub/DeepLearning/FibeR-CNN/fibercnn/modeling/postprocessing.py", line 43, in perform_keypoint_pruning
    keypoint_sets = instances.pred_keypoints
  File "/Users/fan/Downloads/detectron2/detectron2/structures/instances.py", line 65, in __getattr__
    raise AttributeError("Cannot find field '{}' in the given Instances!".format(name))
AttributeError: Cannot find field 'pred_keypoints' in the given Instances!

Process finished with exit code 1

My environment is built on Mac, but I can run the official demo correctly by cpu only. Please help me look into this!

created time in 2 months

startedmaxfrei750/FibeR-CNN

started time in 2 months

startedmjeronimo/reflectance

started time in 3 months

created repositorytsipkens/web-tfer-pma

Javascript/HTML code to evaluate the transfer function for particle mass analyzers, including the centrifugal particle mass analyzer (CPMA) and aerosol particle mass analyzer (APM).

created time in 3 months

PublicEvent
more