facebookresearch / CutLER

Code release for "Cut and Learn for Unsupervised Object Detection and Instance Segmentation" and "VideoCutLER: Surprisingly Simple Unsupervised Video Instance Segmentation"
Other
913 stars 90 forks source link

errors occur when running cutler/demo/demo.py #27

Closed lukkaal closed 1 year ago

lukkaal commented 1 year ago

hey! Thanks for ur work! I came across a problem when I try to run the demo.py in the "cutler/demo" file. I download the detectron2 with Linux instruction (torch 1.10/ cuda 11.3) and the detectron2 version is 0.6. the errors can be described as below: when I follwed the instruction to run the demo.py of "cutler"

Traceback (most recent call last): File "demo/demo.py", line 23, in from predictor import VisualizationDemo File "/root/data/CUTLER_LUKA/CutLER/cutler/demo/predictor.py", line 12, in from engine.defaults import DefaultPredictor File "/root/data/CUTLER_LUKA/CutLER/cutler/./engine/init.py", line 7, in from .defaults import * File "/root/data/CUTLER_LUKA/CutLER/cutler/./engine/defaults.py", line 41, in from modeling import build_model File "/root/data/CUTLER_LUKA/CutLER/cutler/./modeling/init.py", line 3, in from .roi_heads import ( File "/root/data/CUTLER_LUKA/CutLER/cutler/./modeling/roi_heads/init.py", line 3, in from .roi_heads import ( File "/root/data/CUTLER_LUKA/CutLER/cutler/./modeling/roi_heads/roi_heads.py", line 25, in from .fast_rcnn import FastRCNNOutputLayers File "/root/data/CUTLER_LUKA/CutLER/cutler/./modeling/roi_heads/fast_rcnn.py", line 11, in from detectron2.data.detection_utils import get_fed_loss_cls_weights _ImportError: cannot import name 'get_fed_loss_cls_weights' from 'detectron2.data.detection_utils' (/opt/conda/envs/CUTLER/lib/python3.8/site-packages/detectron2/data/detectionutils.py)

frank-xwang commented 1 year ago

Hi, have you followed the instructions in CutLER/INSTALL to install all the required packages? It seems like the error occurred because the model was unable to import the function "get_fed_loss_cls_weights" from the "detectron2/data/detection_utils.py" file, which should work correctly if you have installed detectron2 properly.

frank-xwang commented 1 year ago

Closing it. Please feel free to reopen it if you have further questions.