kinhong / OpenLabeler

OpenLabeler is an open source desktop application for annotating objects for AI appplications
Apache License 2.0
115 stars 11 forks source link

Inference not working #5

Closed PushkarChatterji closed 2 years ago

PushkarChatterji commented 5 years ago

Hi, I have installed OpenLabeler as per instructions (my directory structure is different from the recommended one) and got it running to label my image data set (I just have 1 class)...

I had labeled a portion of this dataset and fine-tuned a model from the tensorflow model zoo which gave me pretty good results when I use that model to run inference in my own python script. However, when I use that model in OpenLabeler to continue to annotate more images from the same dataset, it does not detect ANY object.

Any tips on how to get this to work would be great!

kinhong commented 5 years ago

@PushkarChatterji - please ensure you've followed the "Inference" section of the readme carefully. You could also send me the application logs (under <userhome>/.openlabeler/logs, and/or put your model somewhere in the cloud so that I can debug further.

nasruddiin commented 5 years ago

Can I run the docker container in the cloud .. instead of at my local machine? Capture

kinhong commented 5 years ago

Can I run the docker container in the cloud .. instead of at my local machine? @nasruddiin - Not at this point. Training support is still experimental.

PushkarChatterji commented 5 years ago

@kinhong ,

Here is the application log:

`2019-10-21 16:45:05 INFO com.easymobo.openlabeler.OpenLabeler: OpenLabeler 1.1.2 2019-10-21 16:45:06 SEVERE com.easymobo.openlabeler.tensorflow.ObjectDetector: Unable to update null java.lang.IllegalArgumentException: NodeDef mentions attr 'half_pixel_centers' not in Op<name=ResizeBilinear; signature=images:T, size:int32 -> resized_images:float; attr=T:type,allowed=[DT_INT8, DT_UINT8, DT_INT16, DT_UINT16, DT_INT32, DT_INT64, DT_BFLOAT16, DT_HALF, DT_FLOAT, DT_DOUBLE]; attr=align_corners:bool,default=false>; NodeDef: {{node Preprocessor/ResizeImage/resize/ResizeBilinear}} = ResizeBilinear[T=DT_FLOAT, _output_shapes=[[1,300,300,3]], align_corners=false, half_pixel_centers=false](Preprocessor/ResizeImage/resize/ExpandDims, Preprocessor/ResizeImage/stack). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). at org.tensorflow.SavedModelBundle.load(Native Method) at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27) at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32) at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95) at com.easymobo.openlabeler.tensorflow.ObjectDetector.update(ObjectDetector.java:125) at com.easymobo.openlabeler.tensorflow.ObjectDetector.watch(ObjectDetector.java:105) at com.easymobo.openlabeler.tensorflow.ObjectDetector.init(ObjectDetector.java:75) at com.easymobo.openlabeler.ui.TagGroup.lambda$new$10(TagGroup.java:174) at java.base/java.lang.Thread.run(Thread.java:834)

2019-10-21 16:46:02 SEVERE com.easymobo.openlabeler.tensorflow.ObjectDetector: Unable to update null java.lang.IllegalArgumentException: NodeDef mentions attr 'half_pixel_centers' not in Op<name=ResizeBilinear; signature=images:T, size:int32 -> resized_images:float; attr=T:type,allowed=[DT_INT8, DT_UINT8, DT_INT16, DT_UINT16, DT_INT32, DT_INT64, DT_BFLOAT16, DT_HALF, DT_FLOAT, DT_DOUBLE]; attr=align_corners:bool,default=false>; NodeDef: {{node Preprocessor/ResizeImage/resize/ResizeBilinear}} = ResizeBilinear[T=DT_FLOAT, _output_shapes=[[1,300,300,3]], align_corners=false, half_pixel_centers=false](Preprocessor/ResizeImage/resize/ExpandDims, Preprocessor/ResizeImage/stack). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). at org.tensorflow.SavedModelBundle.load(Native Method) at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:27) at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:32) at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:95) at com.easymobo.openlabeler.tensorflow.ObjectDetector.update(ObjectDetector.java:125) at com.easymobo.openlabeler.tensorflow.ObjectDetector.watch(ObjectDetector.java:105) at com.easymobo.openlabeler.tensorflow.ObjectDetector.lambda$init$0(ObjectDetector.java:77) at javafx.base/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360) at javafx.base/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80) at javafx.base/javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104) at javafx.base/javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111) at javafx.base/javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:145) at com.easymobo.openlabeler.preference.PreferenceUtil$StringPrefProperty.set(PreferenceUtil.java:68) at com.easymobo.openlabeler.preference.PreferenceUtil$StringPrefProperty.set(PreferenceUtil.java:51) at com.easymobo.openlabeler.preference.Settings.setTFSavedModelDir(Settings.java:217) at com.easymobo.openlabeler.preference.InferencePane.save(InferencePane.java:114) at com.easymobo.openlabeler.preference.PreferencePane.lambda$showAndWait$1(PreferencePane.java:86) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at com.easymobo.openlabeler.preference.PreferencePane.lambda$showAndWait$2(PreferencePane.java:86) at java.base/java.util.Optional.ifPresent(Optional.java:183) at com.easymobo.openlabeler.preference.PreferencePane.showAndWait(PreferencePane.java:84) at com.easymobo.openlabeler.OpenLabelerController.onPreference(OpenLabelerController.java:313) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:76) at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:273) at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:83) at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1782) at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1670) at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.base/javafx.event.Event.fireEvent(Event.java:198) at javafx.controls/javafx.scene.control.MenuItem.fire(MenuItem.java:465) at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1380) at javafx.controls/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(ContextMenuContent.java:1333) at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.base/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3851) at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579) at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849) at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295) at java.base/java.security.AccessController.doPrivileged(Native Method) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433) at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556) at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942) at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277) at java.base/java.lang.Thread.run(Thread.java:834)

2019-10-21 16:46:02 SEVERE com.easymobo.openlabeler.tensorflow.TFTrainer: No label map items 2019-10-21 16:46:44 SEVERE com.easymobo.openlabeler.tensorflow.TFTrainer: No label map items `

PushkarChatterji commented 5 years ago

@kinhong

Looks like its a TF version miss-match. I am used TF-1.14.0 to fine-tune the model I am trying to run for inference...

kinhong commented 4 years ago

@kinhong

Looks like its a TF version miss-match. I am used TF-1.14.0 to fine-tune the model I am trying to run for inference...

@PushkarChatterji - In release v1.2.0, I have upgraded to TensorFlow 1.15.0. Please check if it helps. Otherwise, please post a small model that could demonstrate the issue so that I could debug further.