Posts

Post not yet marked as solved
0 Replies
361 Views
I'm having a problem with the one shot object detector. The model does not return a single prediction.My setup:I'm trying to detect two different kinds of colorimetric test strips (4mm width, 10cm height, negletible thickness). I have thousands of photos which show these test strips in a 2D setting (just a photo of them laying on a table from above). So I think the context is really 2D and the one shot detector should work for this scenario.I tried to train the model in several ways, but I don't get any prediction back, only empty results.I haven't found much documentation, I only watched the WWDC session. So in particular I don't know what kind of size restrictions apply to it or what a optimal object size in relation to the image size should be.Any help appreciated.Here is what I did:train = tc.image_analysis.load_images('./train/mini') train['label'] = train['path'].element_slice(13,-9) >>> train Columns: path str image Image label str Rows: 2 Data: +---------------------------+-----------------------+-------+ | path | image | label | +---------------------------+-----------------------+-------+ | ./train/mini/aaamini.jpeg | Height: 681 Width: 26 | aaa | | ./train/mini/bbmini.jpeg | Height: 707 Width: 27 | bb | +---------------------------+-----------------------+-------+ [2 rows x 3 columns] model = tc.one_shot_object_detector.create(train, 'label') model Class : OneShotObjectDetector Model summary ------------- Number of classes : 2 Input image shape : (3, 416, 416) Synthetic data summary ---------------------- Number of synthetically generated examples : 1902 Number of synthetically generated bounding boxes : 1902 Training summary ---------------- Training time : 2h 33m 49s Training iterations : 7000 Training epochs : 117 Final loss (specific to model) : 1.3897 test = tc.image_analysis.load_images('./test') test Columns: path str image Image Rows: 20 Data: +-------------------------------+-------------------------+ | path | image | +-------------------------------+-------------------------+ | ./test/1... | Height: 1008 Width: 756 | ... +-------------------------------+-------------------------+ [20 rows x 2 columns] result = model.predict(test) Predicting 1/20 Predicting 20/20 >>> result dtype: list Rows: 20 [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
Posted
by _nikwest_.
Last updated
.