Python Forum
Using .pb saved model for object detection
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using .pb saved model for object detection
#1
I am using this guy's code: https://tensorflow-object-detection-api-...model.html in order to make object detection using images and a saved .pb model. I cannot post the code from this website because it is copyrighted. The code I am using is under the paragraph: Putting everything together. I face an error on this line:

Error:
Running inference for ('workspace/training_demo/images/test_images/', [], ['image_1.jpg', 'image_2.jpg'])... Traceback (most recent call last): File "/home/someone/.local/lib/python3.9/site-packages/PIL/Image.py", line 2957, in open fp.seek(0) AttributeError: 'tuple' object has no attribute 'seek' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/someone/Desktop/TensorFlow/final_code.py", line 30, in <module> image_np = load_image_into_numpy_array(image_path) File "/home/someone/Desktop/TensorFlow/final_code.py", line 23, in load_image_into_numpy_array return np.array(Image.open(path)) File "/home/someone/.local/lib/python3.9/site-packages/PIL/Image.py", line 2959, in open fp = io.BytesIO(fp.read()) AttributeError: 'tuple' object has no attribute 'read'
I searched on google/stackoverflow and I found this candidate solution: https://stackoverflow.com/questions/2071...ibute-read which didn't help.... Any ideas?
Reply
#2
Someone???
Reply
#3
Can a moderator move this thread under: " General Coding Help" since it is general python3 problem...?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  model.fit and model.predict errors hatflyer 6 1,341 Nov-10-2023, 01:39 AM
Last Post: hatflyer
  (OpenCV) Help to improve code for object detection and finding center of it saoko 0 1,209 May-14-2022, 05:34 PM
Last Post: saoko
  bytes object saved as .mp4 jttolleson 10 5,904 Feb-25-2022, 02:42 PM
Last Post: jttolleson
  Improves performance on socket multi-threaded servers for object detection pennant 1 1,908 Aug-31-2021, 08:43 AM
Last Post: Larz60+
  FileNotFoundError: [Errno 2] No such file or directory: 'model/doc2vec.model/Articles Anldra12 10 5,831 Jun-11-2021, 04:48 PM
Last Post: snippsat
  Object detection on ground via the use of geo/sat UAV images hobbyist 2 2,106 Jan-23-2021, 11:57 PM
Last Post: hobbyist
  Why can't numpy array be restored to a saved value? pjfarley3 1 1,724 Nov-25-2020, 07:40 AM
Last Post: pjfarley3
  Only getting last record saved...Why Milfredo 10 4,397 Sep-10-2020, 03:00 AM
Last Post: Milfredo
  Running scripts and location of saved interpreted user-defined classes and functions leodavinci1990 3 2,543 Aug-25-2020, 03:43 AM
Last Post: micseydel
  How to add audio to Tensorflow Object Detection API? kitkatz 1 2,283 Jan-05-2020, 09:37 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020