Git Product home page Git Product logo

hands-on-computer-vision-with-tensorflow-2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hands-on-computer-vision-with-tensorflow-2's Issues

Error in Chapter05 ch5_nb1_yolo_inference.ipynb

boxes, scores, classes, nums = yolo(input_img)


logging.info('detections:')
for i in range(nums[0]):
    print('\t{}, {}, {}'.format(class_names[int(classes[0][i])],
                                       np.array(scores[0][i]),
                                       np.array(boxes[0][i])))

prediction_img = draw_outputs(img.numpy(), (boxes, scores, classes, nums), class_names)
plt.figure(figsize=(10, 20))
plt.imshow(prediction_img)
File "D:/PyCharm/YOLO/main.py", line 31, in <module>
    for i in range(nums[0]):
TypeError: 'Tensor' object cannot be interpreted as an integer

Training YoloV3

When training a tf 2.0 YoloV3 model Chapter 5 mentions training using VGG16 or other pretrained NN as a backbone after the head is deactivated. How do you format the y_true value i.e. (batch_size, grid, grid, anchors, (x1, y1, x2, y2, obj, cls)). Batch size is obvious but I wanted to see an example of how the rest would look and how I should format the data to use it in a model.fit operation, for example. I have annotated the images and have the x and y values for the bounding boxes and obviously the class, but I'm not sure how to supply obj value ( and all the other values when transitioning from the backbone to the YoloV3 head). Is obj (objectness) always going to be 1 for y_true since there is always an object in the bounding box for y_true? Is the class simply going to be the corresponding text label used in the coco.names file or some other format. Is there a way to view a full example of the proposed implemention i.e VGG then YoloV3 for example.

loss= nan on running nb5 & nb6 from Chapter6

I have been trying to debug this for a few days to no avail.
I have been running the notebooks as they are.
I'm getting
Epoch 0/90: loss = nan; v-loss = nan; acc = 0.389; v-acc = 0.366; mIoU = 0.020; v-mIoU = 0.019
as output from training and can't figure out what is the problem

Unable to prepare cityscape-dataset

Hi,
I have the same issue as previous "Unable to prepare cityscape-dataset #8" on Jun 29, 2019.

I have verified the environment has been se by:
import os
print(os.environ['CITYSCAPES_DATASET'])
it retuned
C:\Users\c5911\tensorflow_datasets\cityscapes.

However, two scripts
!csCreateTrainIdLabelImgs
or
!csViewer (ran under Jupyter notebook)
still returned:
ERROR: Did not find any files. Please consult the README.

I ran csViewer at prompt command, it also showed "The data was not found".

Under "C:\Users\c5911\tensorflow_datasets\cityscapes", there are two sub folders, getFine and leftImg8bit.

Anything could be wrong?

Thanks.

ground truth images

what is the shape of ground truth numpy color map for each image ? chapter 6 "preparing data for smart car apps".

Unable to prepare cityscape-dataset

Hi,

running the script (Mac, Jupyter-notebook, Python 2), I am unable to prepare the dataset.
There is the message "ERROR: Did not find any files. Please consult the README.", which I can not interpret.
Running the script step by step on the terminal, there is the same problem.
Has anyone an idea how to solve this?

Searching the internet, I only found this link:
mcordts/cityscapesScripts#73
However, their solution does not work for me.

Unfortunately, without this data, I can not further work on the chapter of this nice book.

With kind regards

Ch6. nb5 build and train: fcn8s_model.fit, ValueError: Shapes (None, 512, 512, 19) and (None, 512, 512, 1) are incompatible

Hi
I am running ch6. nb5 build and train.
At fcn8s_model.fit, I have a ValueError: Shapes (None, 512, 512, 19) and (None, 512, 512, 1) are incompatible (after "C:\Users\c5911\anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py:1134 assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))").
fcn8s_model.summary() showed
conv2d_transpose_2 (Conv2DTrans (None, 512, 512, 19) 92435 add_1[0][0]

Total params: 14,983,177
Trainable params: 14,983,177
Non-trainable params: 0

Why were there incompatible shape?

Thanks,
Gary

P.S.: I changed: visual_val_dataset = cityscapes_input_fn(
root_folder=CITYSCAPES_FOLDER, resize_to=image_size, batch_size=num_show,
shuffle=True, num_epochs=1, augment=False, seed=random_seed, blurred=False) #blurred changed from "True" to "False".

how to use the trained model

Hello!

I ran your notebook for chapter8 and I would like to use the trained model for new videos. I am aware this may sound like a super idiotic question, but would you help me using the trained model? how do i save it for later use? and then how would i 'run' it on new videos?

Thanks for your help, and apologies for the basic question,

Veronica.

YOLO V3 of Chapter05

I have downloaded weight file (yolov3.weights) and tried to convert it following the instructions. But convert.py program did not produce yolov3.tf. Instead, the program produced the following files:

yolov3.tf.index (24KB),
yolov3.tf.data-00000-of-00002 (62KB), and
yolov3.tf.data-00001-of-00002 (237MB).

Each number within the parenthesis is the size of each file.

I tested the program using the docker (tensorflow:latest-gpu) on Ubuntu 18.04.

Just in case, I attach the screen capture of the log that is written by convert.py.

screen_capture_of_convert_weight.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.